describeOrganizationConformancePacks method

Future<DescribeOrganizationConformancePacksResponse> describeOrganizationConformancePacks({
  1. int? limit,
  2. String? nextToken,
  3. List<String>? organizationConformancePackNames,
})

Returns a list of organization conformance packs.

Limit and next token are not applicable if you specify organization conformance packs names. They are only applicable, when you request all the organization conformance packs.

For accounts within an organization

If you deploy an organizational rule or conformance pack in an organization administrator account, and then establish a delegated administrator and deploy an organizational rule or conformance pack in the delegated administrator account, you won't be able to see the organizational rule or conformance pack in the organization administrator account from the delegated administrator account or see the organizational rule or conformance pack in the delegated administrator account from organization administrator account. The DescribeOrganizationConfigRules and DescribeOrganizationConformancePacks APIs can only see and interact with the organization-related resource that were deployed from within the account calling those APIs.

May throw InvalidLimitException. May throw InvalidNextTokenException. May throw NoSuchOrganizationConformancePackException. May throw OrganizationAccessDeniedException.

Parameter limit : The maximum number of organization config packs returned on each page. If you do no specify a number, Config uses the default. The default is 100.

Parameter nextToken : The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Parameter organizationConformancePackNames : The name that you assign to an organization conformance pack.

Implementation

Future<DescribeOrganizationConformancePacksResponse>
    describeOrganizationConformancePacks({
  int? limit,
  String? nextToken,
  List<String>? organizationConformancePackNames,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DescribeOrganizationConformancePacks'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
      if (organizationConformancePackNames != null)
        'OrganizationConformancePackNames': organizationConformancePackNames,
    },
  );

  return DescribeOrganizationConformancePacksResponse.fromJson(
      jsonResponse.body);
}