Provides organization conformance pack deployment status for an organization.
The status is not considered successful until organization conformance pack is successfully deployed in all the member accounts with an exception of excluded accounts.
When you specify the limit and the next token, you receive a paginated response. Limit and next token are not applicable if you specify organization conformance pack names. They are only applicable, when you request all the organization conformance packs.
Parameters:
-
organization_conformance_pack_names
(Optional[OrganizationConformancePackNames], default:
None
)
–
The names of organization conformance packs for which you want status details. If you do not specify any names, Config returns details for all your organization conformance packs.
-
limit
(Optional[CosmosPageLimit], default:
None
)
–
The maximum number of OrganizationConformancePackStatuses returned on each page. If you do no specify a number, Config uses the default. The default is 100.
-
next_token
(Optional[String], default:
None
)
–
The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Raises:
-
InvalidLimitException
–
The specified limit is outside the allowable range.
-
InvalidNextTokenException
–
The specified next token is not valid. Specify the nextToken string that was returned in the previous response to get the next page of results.
-
NoSuchOrganizationConformancePackException
–
Config organization conformance pack that you passed in the filter does not exist.
For DeleteOrganizationConformancePack, you tried to delete an organization conformance pack that does not exist.
-
OrganizationAccessDeniedException
–
For PutConfigurationAggregator API, you can see this exception for the following reasons:
-
No permission to call EnableAWSServiceAccess API
-
The configuration aggregator cannot be updated because your Amazon Web Services Organization management account or the delegated administrator role changed. Delete this aggregator and create a new one with the current Amazon Web Services Organization.
-
The configuration aggregator is associated with a previous Amazon Web Services Organization and Config cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a new one with the current Amazon Web Services Organization.
-
You are not a registered delegated administrator for Config with permissions to call ListDelegatedAdministrators API. Ensure that the management account registers delagated administrator for Config service principal name before the delegated administrator creates an aggregator.
For all OrganizationConfigRule and OrganizationConformancePack APIs, Config throws an exception if APIs are called from member accounts. All APIs must be called from organization management account.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_config_service/_services/config_service.py
| def describe_organization_conformance_pack_statuses(
self,
*,
config_overrides: Optional[ConfigServiceClientConfig] = None,
organization_conformance_pack_names: Optional[
"capo_config_service.types.organization_conformance_pack_names.OrganizationConformancePackNames"
] = None,
limit: Optional[
"capo_config_service.types.cosmos_page_limit.CosmosPageLimit"
] = None,
next_token: Optional["capo_config_service.types.string.String"] = None,
) -> "capo_config_service.types.describe_organization_conformance_pack_statuses_response.DescribeOrganizationConformancePackStatusesResponse":
"""<p>Provides organization conformance pack deployment status for an organization. </p> <note> <p>The status is not considered successful until organization conformance pack is successfully deployed in all the member accounts with an exception of excluded accounts.</p> <p>When you specify the limit and the next token, you receive a paginated response. Limit and next token are not applicable if you specify organization conformance pack names. They are only applicable, when you request all the organization conformance packs.</p> </note>
Args:
organization_conformance_pack_names: <p>The names of organization conformance packs for which you want status details. If you do not specify any names, Config returns details for all your organization conformance packs. </p>
limit: <p>The maximum number of OrganizationConformancePackStatuses returned on each page. If you do no specify a number, Config uses the default. The default is 100. </p>
next_token: <p>The nextToken string returned on a previous page that you use to get the next page of results in a paginated response. </p>
Raises:
capo_config_service.errors.invalid_limit_exception.InvalidLimitException: <p>The specified limit is outside the allowable range.</p>
capo_config_service.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The specified next token is not valid. Specify the <code>nextToken</code> string that was returned in the previous response to get the next page of results.</p>
capo_config_service.errors.no_such_organization_conformance_pack_exception.NoSuchOrganizationConformancePackException: <p>Config organization conformance pack that you passed in the filter does not exist.</p> <p>For DeleteOrganizationConformancePack, you tried to delete an organization conformance pack that does not exist.</p>
capo_config_service.errors.organization_access_denied_exception.OrganizationAccessDeniedException: <p>For <code>PutConfigurationAggregator</code> API, you can see this exception for the following reasons:</p> <ul> <li> <p>No permission to call <code>EnableAWSServiceAccess</code> API</p> </li> <li> <p>The configuration aggregator cannot be updated because your Amazon Web Services Organization management account or the delegated administrator role changed. Delete this aggregator and create a new one with the current Amazon Web Services Organization.</p> </li> <li> <p>The configuration aggregator is associated with a previous Amazon Web Services Organization and Config cannot aggregate data with current Amazon Web Services Organization. Delete this aggregator and create a new one with the current Amazon Web Services Organization.</p> </li> <li> <p>You are not a registered delegated administrator for Config with permissions to call <code>ListDelegatedAdministrators</code> API. Ensure that the management account registers delagated administrator for Config service principal name before the delegated administrator creates an aggregator.</p> </li> </ul> <p>For all <code>OrganizationConfigRule</code> and <code>OrganizationConformancePack</code> APIs, Config throws an exception if APIs are called from member accounts. All APIs must be called from organization management account.</p>
capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_config_service.types.describe_organization_conformance_pack_statuses_request.DescribeOrganizationConformancePackStatusesRequest]",
) -> OperationResponse[
"capo_config_service.types.describe_organization_conformance_pack_statuses_response.DescribeOrganizationConformancePackStatusesResponse"
]:
import capo_config_service._operations.starling_dove_service.describe_organization_conformance_pack_statuses
output, http_response = (
capo_config_service._operations.starling_dove_service.describe_organization_conformance_pack_statuses.describe_organization_conformance_pack_statuses(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DescribeOrganizationConformancePackStatuses"),
)
input_: capo_config_service.types.describe_organization_conformance_pack_statuses_request.DescribeOrganizationConformancePackStatusesRequest = {}
if organization_conformance_pack_names is not None:
input_["organization_conformance_pack_names"] = (
organization_conformance_pack_names
)
if limit is not None:
input_["limit"] = limit
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|