libZSservicesZSamazonka-organizationsZSamazonka-organizations
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Organizations.ListPolicies

Description

Retrieves the list of all policies in an organization of a specified type.

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 AWS service.

This operation returns paginated results.

Synopsis

Creating a Request

data ListPolicies Source #

See: newListPolicies smart constructor.

Constructors

ListPolicies' 

Fields

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

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

  • filter' :: PolicyType

    Specifies the type of policy that you want to include in the response. You must specify one of the following values:

Instances

Instances details
Eq ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Read ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Show ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Generic ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Associated Types

type Rep ListPolicies :: Type -> Type #

NFData ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Methods

rnf :: ListPolicies -> () #

Hashable ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

ToJSON ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

AWSPager ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

AWSRequest ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Associated Types

type AWSResponse ListPolicies #

ToHeaders ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

ToPath ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

ToQuery ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

type Rep ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

type Rep ListPolicies = D1 ('MetaData "ListPolicies" "Amazonka.Organizations.ListPolicies" "libZSservicesZSamazonka-organizationsZSamazonka-organizations" 'False) (C1 ('MetaCons "ListPolicies'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "filter'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PolicyType))))
type AWSResponse ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

newListPolicies Source #

Create a value of ListPolicies 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:nextToken:ListPolicies', listPolicies_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.

$sel:maxResults:ListPolicies', listPolicies_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.

$sel:filter':ListPolicies', listPolicies_filter - Specifies the type of policy that you want to include in the response. You must specify one of the following values:

Request Lenses

listPolicies_nextToken :: Lens' ListPolicies (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.

listPolicies_maxResults :: Lens' ListPolicies (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.

listPolicies_filter :: Lens' ListPolicies PolicyType Source #

Specifies the type of policy that you want to include in the response. You must specify one of the following values:

Destructuring the Response

data ListPoliciesResponse Source #

See: newListPoliciesResponse smart constructor.

Constructors

ListPoliciesResponse' 

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]

    A list of policies that match the filter criteria in the request. The output list doesn't include the policy contents. To see the content for a policy, see DescribePolicy.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Read ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Show ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Generic ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Associated Types

type Rep ListPoliciesResponse :: Type -> Type #

NFData ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Methods

rnf :: ListPoliciesResponse -> () #

type Rep ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

type Rep ListPoliciesResponse = D1 ('MetaData "ListPoliciesResponse" "Amazonka.Organizations.ListPolicies" "libZSservicesZSamazonka-organizationsZSamazonka-organizations" 'False) (C1 ('MetaCons "ListPoliciesResponse'" '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))))

newListPoliciesResponse Source #

Create a value of ListPoliciesResponse 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:nextToken:ListPolicies', listPoliciesResponse_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:ListPoliciesResponse', listPoliciesResponse_policies - A list of policies that match the filter criteria in the request. The output list doesn't include the policy contents. To see the content for a policy, see DescribePolicy.

$sel:httpStatus:ListPoliciesResponse', listPoliciesResponse_httpStatus - The response's http status code.

Response Lenses

listPoliciesResponse_nextToken :: Lens' ListPoliciesResponse (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.

listPoliciesResponse_policies :: Lens' ListPoliciesResponse (Maybe [PolicySummary]) Source #

A list of policies that match the filter criteria in the request. The output list doesn't include the policy contents. To see the content for a policy, see DescribePolicy.