Returns the enrollment (opt in) status of an account to the Compute Optimizer service.
If the account is the management account of an organization, this action also confirms the enrollment status of member accounts of the organization. Use the GetEnrollmentStatusesForOrganization action to get detailed information about the enrollment status of member accounts of an organization.
Raises:
Source code in docs_src/capo_compute_optimizer/_services/compute_optimizer.py
| def get_enrollment_status(
self, *, config_overrides: Optional[ComputeOptimizerClientConfig] = None
) -> "capo_compute_optimizer.types.get_enrollment_status_response.GetEnrollmentStatusResponse":
"""<p>Returns the enrollment (opt in) status of an account to the Compute Optimizer service.</p> <p>If the account is the management account of an organization, this action also confirms the enrollment status of member accounts of the organization. Use the <a>GetEnrollmentStatusesForOrganization</a> action to get detailed information about the enrollment status of member accounts of an organization.</p>
Raises:
capo_compute_optimizer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_compute_optimizer.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Try your call again.</p>
capo_compute_optimizer.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value supplied for the input parameter is out of range or not valid.</p>
capo_compute_optimizer.errors.missing_authentication_token.MissingAuthenticationToken: <p>The request must contain either a valid (registered) Amazon Web Services access key ID or X.509 certificate.</p>
capo_compute_optimizer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed due to a temporary failure of the server.</p>
capo_compute_optimizer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_compute_optimizer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_compute_optimizer.types.get_enrollment_status_request.GetEnrollmentStatusRequest]",
) -> OperationResponse[
"capo_compute_optimizer.types.get_enrollment_status_response.GetEnrollmentStatusResponse"
]:
import capo_compute_optimizer._operations.compute_optimizer_service.get_enrollment_status
output, http_response = (
capo_compute_optimizer._operations.compute_optimizer_service.get_enrollment_status.get_enrollment_status(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetEnrollmentStatus")
)
input_: capo_compute_optimizer.types.get_enrollment_status_request.GetEnrollmentStatusRequest = {}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|