enrollment_status
Creates, updates, deletes, gets or lists an enrollment_status resource.
Overview
| Name | enrollment_status |
| Type | Resource |
| Id | aws.compute_optimizer.enrollment_status |
Fields
The following fields are returned by SELECT queries:
- get_enrollment_status
| Name | Datatype | Description |
|---|---|---|
last_updated_timestamp | string (date-time) | The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated. |
member_accounts_enrolled | boolean | Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization. |
number_of_member_accounts_opted_in | integer | The count of organization member accounts that are opted in to the service, if your account is an organization management account. |
status | string | The enrollment status of the account. (Active, Inactive, Pending, Failed) |
status_reason | string | The reason for the enrollment status of the account. For example, an account might show a status of Pending because member accounts of an organization require more time to be enrolled in the service. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_enrollment_status | select | region | 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. | |
update_enrollment_status | update | region, status | Updates the enrollment (opt in and opt out) status of an account to the Compute Optimizer service. If the account is a management account of an organization, this action can also be used to enroll member accounts of the organization. You must have the appropriate permissions to opt in to Compute Optimizer, to view its recommendations, and to opt out. For more information, see Controlling access with Amazon Web Services Identity and Access Management in the Compute Optimizer User Guide. When you opt in, Compute Optimizer automatically creates a service-linked role in your account to access its data. For more information, see Using Service-Linked Roles for Compute Optimizer in the Compute Optimizer User Guide. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_enrollment_status
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.
SELECT
last_updated_timestamp,
member_accounts_enrolled,
number_of_member_accounts_opted_in,
status,
status_reason
FROM aws.compute_optimizer.enrollment_status
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_enrollment_status
Updates the enrollment (opt in and opt out) status of an account to the Compute Optimizer service. If the account is a management account of an organization, this action can also be used to enroll member accounts of the organization. You must have the appropriate permissions to opt in to Compute Optimizer, to view its recommendations, and to opt out. For more information, see Controlling access with Amazon Web Services Identity and Access Management in the Compute Optimizer User Guide. When you opt in, Compute Optimizer automatically creates a service-linked role in your account to access its data. For more information, see Using Service-Linked Roles for Compute Optimizer in the Compute Optimizer User Guide.
UPDATE aws.compute_optimizer.enrollment_status
SET
status = '{{ status }}',
includeMemberAccounts = {{ includeMemberAccounts }}
WHERE
region = '{{ region }}' --required
AND status = '{{ status }}' --required
RETURNING
status,
status_reason;