Skip to content

get_enrollment_status async

get_enrollment_status(
    *, config_overrides: Optional[AsyncComputeOptimizerClientConfig] = None
) -> GetEnrollmentStatusResponse

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/async_compute_optimizer.py
async def get_enrollment_status(
    self, *, config_overrides: Optional[AsyncComputeOptimizerClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_compute_optimizer.types.get_enrollment_status_request.GetEnrollmentStatusRequest]",
    ) -> AsyncOperationResponse[
        "capo_compute_optimizer.types.get_enrollment_status_response.GetEnrollmentStatusResponse"
    ]:
        import capo_compute_optimizer._operations.compute_optimizer_service.get_enrollment_status

        (
            output,
            http_response,
        ) = await capo_compute_optimizer._operations.compute_optimizer_service.get_enrollment_status.async_get_enrollment_status(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output