amazonka-organizations-2.0: Amazon Organizations SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Organizations.ListPoliciesForTarget

Description

Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account. You must specify the policy type that you want included in the returned list.

Always check the NextToken response parameter for a null value when calling a List* operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display.

This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.

This operation returns paginated results.

Synopsis

Creating a Request

data ListPoliciesForTarget Source #

See: newListPoliciesForTarget smart constructor.

Constructors

ListPoliciesForTarget' 

Fields

  • maxResults :: Maybe Natural

    The total number of results that you want included on each page of 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.

  • nextToken :: Maybe Text

    The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value of the previous call's NextToken response to indicate where the output should continue from.

  • targetId :: Text

    The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list.

    The regex pattern for a target ID string requires one of the following:

    • Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
    • Account - A string that consists of exactly 12 digits.
    • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
  • filter' :: PolicyType

    The type of policy that you want to include in the returned list. You must specify one of the following values:

Instances

Instances details
ToJSON ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

ToHeaders ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

ToPath ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

ToQuery ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

AWSPager ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

AWSRequest ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Associated Types

type AWSResponse ListPoliciesForTarget #

Generic ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Associated Types

type Rep ListPoliciesForTarget :: Type -> Type #

Read ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Show ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

NFData ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Methods

rnf :: ListPoliciesForTarget -> () #

Eq ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Hashable ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

type AWSResponse ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

type Rep ListPoliciesForTarget Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

type Rep ListPoliciesForTarget = D1 ('MetaData "ListPoliciesForTarget" "Amazonka.Organizations.ListPoliciesForTarget" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "ListPoliciesForTarget'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "targetId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "filter'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PolicyType))))

newListPoliciesForTarget Source #

Create a value of ListPoliciesForTarget with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:maxResults:ListPoliciesForTarget', listPoliciesForTarget_maxResults - The total number of results that you want included on each page of 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.

ListPoliciesForTarget, listPoliciesForTarget_nextToken - The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value of the previous call's NextToken response to indicate where the output should continue from.

ListPoliciesForTarget, listPoliciesForTarget_targetId - The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list.

The regex pattern for a target ID string requires one of the following:

  • Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
  • Account - A string that consists of exactly 12 digits.
  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

$sel:filter':ListPoliciesForTarget', listPoliciesForTarget_filter - The type of policy that you want to include in the returned list. You must specify one of the following values:

Request Lenses

listPoliciesForTarget_maxResults :: Lens' ListPoliciesForTarget (Maybe Natural) Source #

The total number of results that you want included on each page of 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.

listPoliciesForTarget_nextToken :: Lens' ListPoliciesForTarget (Maybe Text) Source #

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value of the previous call's NextToken response to indicate where the output should continue from.

listPoliciesForTarget_targetId :: Lens' ListPoliciesForTarget Text Source #

The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list.

The regex pattern for a target ID string requires one of the following:

  • Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
  • Account - A string that consists of exactly 12 digits.
  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

listPoliciesForTarget_filter :: Lens' ListPoliciesForTarget PolicyType Source #

The type of policy that you want to include in the returned list. You must specify one of the following values:

Destructuring the Response

data ListPoliciesForTargetResponse Source #

See: newListPoliciesForTargetResponse smart constructor.

Constructors

ListPoliciesForTargetResponse' 

Fields

  • nextToken :: Maybe Text

    If present, indicates that more output is 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.

  • policies :: Maybe [PolicySummary]

    The list of policies that match the criteria in the request.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListPoliciesForTargetResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Associated Types

type Rep ListPoliciesForTargetResponse :: Type -> Type #

Read ListPoliciesForTargetResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Show ListPoliciesForTargetResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

NFData ListPoliciesForTargetResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

Eq ListPoliciesForTargetResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

type Rep ListPoliciesForTargetResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPoliciesForTarget

type Rep ListPoliciesForTargetResponse = D1 ('MetaData "ListPoliciesForTargetResponse" "Amazonka.Organizations.ListPoliciesForTarget" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "ListPoliciesForTargetResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "policies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [PolicySummary])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListPoliciesForTargetResponse Source #

Create a value of ListPoliciesForTargetResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ListPoliciesForTarget, listPoliciesForTargetResponse_nextToken - If present, indicates that more output is 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.

$sel:policies:ListPoliciesForTargetResponse', listPoliciesForTargetResponse_policies - The list of policies that match the criteria in the request.

$sel:httpStatus:ListPoliciesForTargetResponse', listPoliciesForTargetResponse_httpStatus - The response's http status code.

Response Lenses

listPoliciesForTargetResponse_nextToken :: Lens' ListPoliciesForTargetResponse (Maybe Text) Source #

If present, indicates that more output is 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.

listPoliciesForTargetResponse_policies :: Lens' ListPoliciesForTargetResponse (Maybe [PolicySummary]) Source #

The list of policies that match the criteria in the request.