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

Contents

Description

Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account. This operation, along with ListChildren enables you to traverse the tree structure that makes up this root.

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

This operation returns paginated results.

Synopsis

Creating a Request

listParents Source #

Arguments

:: Text

lChildId

-> ListParents 

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

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

  • lNextToken - 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.
  • lMaxResults - (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.
  • lChildId - The unique identifier (ID) of the OU or account whose parent containers you want to list. Do not specify a root. The regex pattern for a child ID string requires one of the following: * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.

data ListParents Source #

See: listParents smart constructor.

Instances
Eq ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Data ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Methods

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

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

toConstr :: ListParents -> Constr #

dataTypeOf :: ListParents -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Show ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Generic ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Associated Types

type Rep ListParents :: Type -> Type #

Hashable ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

ToJSON ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

AWSPager ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

AWSRequest ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Associated Types

type Rs ListParents :: Type #

ToHeaders ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Methods

toHeaders :: ListParents -> [Header] #

ToPath ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

ToQuery ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

NFData ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Methods

rnf :: ListParents -> () #

type Rep ListParents Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

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

Defined in Network.AWS.Organizations.ListParents

Request Lenses

lNextToken :: Lens' ListParents (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.

lMaxResults :: Lens' ListParents (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.

lChildId :: Lens' ListParents Text Source #

The unique identifier (ID) of the OU or account whose parent containers you want to list. Do not specify a root. The regex pattern for a child ID string requires one of the following: * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.

Destructuring the Response

listParentsResponse Source #

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

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

  • lrsNextToken - 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 .
  • lrsParents - A list of parents for the specified child account or OU.
  • lrsResponseStatus - -- | The response status code.

data ListParentsResponse Source #

See: listParentsResponse smart constructor.

Instances
Eq ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Data ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Methods

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

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

toConstr :: ListParentsResponse -> Constr #

dataTypeOf :: ListParentsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Show ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Generic ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Associated Types

type Rep ListParentsResponse :: Type -> Type #

NFData ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

Methods

rnf :: ListParentsResponse -> () #

type Rep ListParentsResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListParents

type Rep ListParentsResponse = D1 (MetaData "ListParentsResponse" "Network.AWS.Organizations.ListParents" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "ListParentsResponse'" PrefixI True) (S1 (MetaSel (Just "_lrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_lrsParents") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Parent])) :*: S1 (MetaSel (Just "_lrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

lrsNextToken :: Lens' ListParentsResponse (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 .

lrsParents :: Lens' ListParentsResponse [Parent] Source #

A list of parents for the specified child account or OU.

lrsResponseStatus :: Lens' ListParentsResponse Int Source #

  • - | The response status code.