Skip to main content

instance_sql_ha_states

Creates, updates, deletes, gets or lists an instance_sql_ha_states resource.

Overview

Nameinstance_sql_ha_states
TypeResource
Idaws.ec2.instance_sql_ha_states

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ha_statusstringThe SQL Server High Availability status of the instance. Valid values are: processing - The SQL Server High Availability status for the SQL Server High Availability instance is being updated. active - The SQL Server High Availability instance is an active node in an SQL Server High Availability cluster. standby - The SQL Server High Availability instance is a standby failover node in an SQL Server High Availability cluster. invalid - An error occurred due to misconfigured permissions, or unable to dertemine SQL Server High Availability status for the SQL Server High Availability instance.
instance_idstringThe ID of the SQL Server High Availability instance.
last_updated_timestringThe date and time when the instance's SQL Server High Availability status was last updated, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ).
processing_statusstringA brief description of the SQL Server High Availability status. If the instance is in the invalid High Availability status, this parameter includes the error message.
sql_server_credentialsstringThe ARN of the Secrets Manager secret containing the SQL Server access credentials for the SQL Server High Availability instance. If not specified, deafult local user credentials will be used by the Amazon Web Services Systems Manager agent.
sql_server_license_usagestringThe license type for the SQL Server license. Valid values include: full - The SQL Server High Availability instance is using a full SQL Server license. waived - The SQL Server High Availability instance is waived from the SQL Server license.
tagsstringThe tags assigned to the SQL Server High Availability instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_instance_sql_ha_statesselectregionInstanceId, NextToken, MaxResults, Filter, DryRunDescribes the SQL Server High Availability states for Amazon EC2 instances that are enabled for Amazon EC2 High Availability for SQL Server monitoring.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
FilterarrayOne or more filters to apply to the results. Supported filters include: tag:<key> - The tag key and value pair assigned to the instance. For example, to find all instances tagged with Owner:TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The tag key assigned to the instance. haStatus - The SQL Server High Availability status of the SQL Server High Availability instance (processing | active | standby | invalid). sqlServerLicenseUsage - The license type for the SQL Server license (full | waived).
InstanceIdarrayThe IDs of the SQL Server High Availability instances to describe. If omitted, the API returns SQL Server High Availability states for all SQL Server High Availability instances.
MaxResultsintegerThe maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value.
NextTokenstringThe token to use to retrieve the next page of results.

SELECT examples

Describes the SQL Server High Availability states for Amazon EC2 instances that are enabled for Amazon EC2 High Availability for SQL Server monitoring.

SELECT
ha_status,
instance_id,
last_updated_time,
processing_status,
sql_server_credentials,
sql_server_license_usage,
tags
FROM aws.ec2.instance_sql_ha_states
WHERE region = '{{ region }}' -- required
AND InstanceId = '{{ InstanceId }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
;