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.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 Amazon Web Services service.

This operation returns paginated results.

Synopsis

Creating a Request

data ListPolicies Source #

See: newListPolicies smart constructor.

Constructors

ListPolicies' 

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.

  • 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
ToJSON ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.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

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 #

Generic ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Associated Types

type Rep ListPolicies :: Type -> Type #

Read ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Show ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

NFData ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Methods

rnf :: ListPolicies -> () #

Eq ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Hashable ListPolicies Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

type AWSResponse 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" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "ListPolicies'" '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 "filter'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PolicyType))))

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

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: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_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_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_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
Generic ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Associated Types

type Rep ListPoliciesResponse :: Type -> Type #

Read ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Show ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

NFData ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

Methods

rnf :: ListPoliciesResponse -> () #

Eq ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

type Rep ListPoliciesResponse Source # 
Instance details

Defined in Amazonka.Organizations.ListPolicies

type Rep ListPoliciesResponse = D1 ('MetaData "ListPoliciesResponse" "Amazonka.Organizations.ListPolicies" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" '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:

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.