Lists the organization enrollment configurations that are stored directly on accounts, organizational units (OUs), and the organization root.
Only the management account or a delegated administrator can perform this action.
Parameters:
-
target_type
(Optional[OrganizationTargetType], default:
None
)
–
The target type to use to filter the results. If you specify OrganizationalUnit, the results also include configurations stored on the organization root. If you don't specify a target type, the operation returns configurations for every target type.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of organization enrollment configurations to return in a single response. If you don't specify a value, the default is 1,000.
-
next_token
(Optional[NextToken], default:
None
)
–
The token to use to retrieve the next page of results.
Raises:
Source code in docs_src/capo_compute_optimizer_automation/_services/compute_optimizer_automation.py
| def list_organization_enrollment_configurations(
self,
*,
config_overrides: Optional[ComputeOptimizerAutomationClientConfig] = None,
target_type: Optional[
"capo_compute_optimizer_automation.types.organization_target_type.OrganizationTargetType"
] = None,
max_results: Optional[int] = None,
next_token: Optional[
"capo_compute_optimizer_automation.types.next_token.NextToken"
] = None,
) -> "capo_compute_optimizer_automation.types.list_organization_enrollment_configurations_response.ListOrganizationEnrollmentConfigurationsResponse":
"""<p> Lists the organization enrollment configurations that are stored directly on accounts, organizational units (OUs), and the organization root. </p> <note> <p>Only the management account or a delegated administrator can perform this action.</p> </note>
Args:
target_type: <p> The target type to use to filter the results. If you specify <code>OrganizationalUnit</code>, the results also include configurations stored on the organization root. If you don't specify a target type, the operation returns configurations for every target type. </p>
max_results: <p> The maximum number of organization enrollment configurations to return in a single response. If you don't specify a value, the default is 1,000. </p>
next_token: <p> The token to use to retrieve the next page of results. </p>
Raises:
capo_compute_optimizer_automation.errors.access_denied_exception.AccessDeniedException: <p> You do not have sufficient permissions to perform this action. </p>
capo_compute_optimizer_automation.errors.forbidden_exception.ForbiddenException: <p> You are not authorized to perform this action. </p>
capo_compute_optimizer_automation.errors.internal_server_exception.InternalServerException: <p> An internal error occurred while processing the request. </p>
capo_compute_optimizer_automation.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p> One or more parameter values are not valid. </p>
capo_compute_optimizer_automation.errors.opt_in_required_exception.OptInRequiredException: <p> The account must be opted in to Compute Optimizer Automation before performing this action. </p>
capo_compute_optimizer_automation.errors.service_unavailable_exception.ServiceUnavailableException: <p> The service is temporarily unavailable. </p>
capo_compute_optimizer_automation.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
capo_compute_optimizer_automation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_compute_optimizer_automation.types.list_organization_enrollment_configurations_request.ListOrganizationEnrollmentConfigurationsRequest]",
) -> OperationResponse[
"capo_compute_optimizer_automation.types.list_organization_enrollment_configurations_response.ListOrganizationEnrollmentConfigurationsResponse"
]:
if req.options.protocol == "awsJson1_0":
import capo_compute_optimizer_automation._operations.compute_optimizer_automation_service.aws_json1_0.list_organization_enrollment_configurations
output, http_response = (
capo_compute_optimizer_automation._operations.compute_optimizer_automation_service.aws_json1_0.list_organization_enrollment_configurations.list_organization_enrollment_configurations(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_compute_optimizer_automation._operations.compute_optimizer_automation_service.rpcv2_cbor.list_organization_enrollment_configurations
output, http_response = (
capo_compute_optimizer_automation._operations.compute_optimizer_automation_service.rpcv2_cbor.list_organization_enrollment_configurations.list_organization_enrollment_configurations(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListOrganizationEnrollmentConfigurations"),
)
input_: capo_compute_optimizer_automation.types.list_organization_enrollment_configurations_request.ListOrganizationEnrollmentConfigurationsRequest = {}
if target_type is not None:
input_["target_type"] = target_type
if max_results is not None:
input_["max_results"] = max_results
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
|