drills
Creates, updates, deletes, gets or lists a drills resource.
Overview
| Name | drills |
| Type | Resource |
| Id | azure.resilience_management.drills |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
attentionReason | object | Attention reason if the ReadinessState is 'NeedsAttention'. |
chaosResourceProperties | object | Chaos Resource properties. |
drillAssetProperties | object | Properties for internal resources that are created for the Drill. |
drillType | string | The discriminator for the Drill object hierarchy. Required. Known values are: "Zonal" and "Regional". |
errorDetails | object | Error details associated with the resource. |
executionReadinessState | string | Readiness state of the Drill. Known values are: "Ready" and "NeedsAttention". (Ready, NeedsAttention) |
executionState | string | Execution state of the Drill. Whether it is currently running or not. Known values are: "NotRunning", "Running", and "Paused". (NotRunning, Running, Paused) |
identity | object | The managed service identities assigned to this resource. |
lastResyncReadinessCheckTime | string (date-time) | Last resync and readiness check time. |
lastRunProperties | object | Last run properties. |
lastSyncTime | string (date-time) | Last sync time. |
managedOnBehalfOfConfiguration | object | Managed RG v2 properties. |
monitoringProperties | object | Monitoring properties of the Drill. |
provisioningState | string | Status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted) |
rbacSetupMode | string | RBAC setup mode. Known values are: "AutomatedCustomRole", "AutomatedBuiltinRoles", and "Manual". (AutomatedCustomRole, AutomatedBuiltinRoles, Manual) |
recoveryPlanProperties | object | ROPlan properties. |
serviceGroupId | string | Parent SG resource. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemMetadata | object | Internal System Metadata, to be used by internal components only. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
attentionReason | object | Attention reason if the ReadinessState is 'NeedsAttention'. |
chaosResourceProperties | object | Chaos Resource properties. |
drillAssetProperties | object | Properties for internal resources that are created for the Drill. |
drillType | string | The discriminator for the Drill object hierarchy. Required. Known values are: "Zonal" and "Regional". |
errorDetails | object | Error details associated with the resource. |
executionReadinessState | string | Readiness state of the Drill. Known values are: "Ready" and "NeedsAttention". (Ready, NeedsAttention) |
executionState | string | Execution state of the Drill. Whether it is currently running or not. Known values are: "NotRunning", "Running", and "Paused". (NotRunning, Running, Paused) |
identity | object | The managed service identities assigned to this resource. |
lastResyncReadinessCheckTime | string (date-time) | Last resync and readiness check time. |
lastRunProperties | object | Last run properties. |
lastSyncTime | string (date-time) | Last sync time. |
managedOnBehalfOfConfiguration | object | Managed RG v2 properties. |
monitoringProperties | object | Monitoring properties of the Drill. |
provisioningState | string | Status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted) |
rbacSetupMode | string | RBAC setup mode. Known values are: "AutomatedCustomRole", "AutomatedBuiltinRoles", and "Manual". (AutomatedCustomRole, AutomatedBuiltinRoles, Manual) |
recoveryPlanProperties | object | ROPlan properties. |
serviceGroupId | string | Parent SG resource. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemMetadata | object | Internal System Metadata, to be used by internal components only. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_group_name, drill_name | Get a Drill. | |
list | select | service_group_name | $skipToken, $top | List Drill resources by tenant. |
create | insert | service_group_name, drill_name | Create a Drill. | |
update | update | service_group_name, drill_name | Update a Drill. | |
delete | delete | service_group_name, drill_name | Delete a Drill. | |
validate_for_execution | exec | service_group_name, drill_name, operation-id | This returns eligible resource to be faulted or failed over. | |
start | exec | service_group_name, drill_name, operation-id, mode | This starts a new running instance of the Drill. | |
end | exec | service_group_name, drill_name, operation-id, attestation, attestationNotes | This ends the currently running instance of the Drill. | |
add_or_update_resources | exec | service_group_name, drill_name, operation-id, faultDurationInMin | This enables the user to include, exclude or update resources from their Drill. | |
resync_readiness_check | exec | service_group_name, drill_name, operation-id | This triggers detection of any drifts from the desired state of Resources and RBAC. |
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 |
|---|---|---|
drill_name | string | The name of the Drill. Required. |
operation-id | string | A GUID that represents the Long Running OperationId. Required. |
service_group_name | string | The name of the service group. Required. |
$skipToken | string | Skip over when retrieving results. Default value is None. |
$top | integer | Number of elements to return when retrieving results. Default value is None. |
SELECT examples
- get
- list
Get a Drill.
SELECT
id,
name,
attentionReason,
chaosResourceProperties,
drillAssetProperties,
drillType,
errorDetails,
executionReadinessState,
executionState,
identity,
lastResyncReadinessCheckTime,
lastRunProperties,
lastSyncTime,
managedOnBehalfOfConfiguration,
monitoringProperties,
provisioningState,
rbacSetupMode,
recoveryPlanProperties,
serviceGroupId,
systemData,
systemMetadata,
type
FROM azure.resilience_management.drills
WHERE service_group_name = '{{ service_group_name }}' -- required
AND drill_name = '{{ drill_name }}' -- required
;
List Drill resources by tenant.
SELECT
id,
name,
attentionReason,
chaosResourceProperties,
drillAssetProperties,
drillType,
errorDetails,
executionReadinessState,
executionState,
identity,
lastResyncReadinessCheckTime,
lastRunProperties,
lastSyncTime,
managedOnBehalfOfConfiguration,
monitoringProperties,
provisioningState,
rbacSetupMode,
recoveryPlanProperties,
serviceGroupId,
systemData,
systemMetadata,
type
FROM azure.resilience_management.drills
WHERE service_group_name = '{{ service_group_name }}' -- required
AND $skipToken = '{{ $skipToken }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create
- Manifest
Create a Drill.
INSERT INTO azure.resilience_management.drills (
properties,
identity,
service_group_name,
drill_name
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ service_group_name }}',
'{{ drill_name }}'
RETURNING
id,
name,
identity,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: drills
props:
- name: service_group_name
value: "{{ service_group_name }}"
description: Required parameter for the drills resource.
- name: drill_name
value: "{{ drill_name }}"
description: Required parameter for the drills resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
provisioningState: "{{ provisioningState }}"
serviceGroupId: "{{ serviceGroupId }}"
recoveryPlanProperties:
identity:
type: "{{ type }}"
userAssignedIdentity: "{{ userAssignedIdentity }}"
recoveryPlanId: "{{ recoveryPlanId }}"
recoveryPlanResourceExcludedCount: {{ recoveryPlanResourceExcludedCount }}
drillAssetProperties:
subscription: "{{ subscription }}"
region: "{{ region }}"
resourceGroup: "{{ resourceGroup }}"
chaosResourceProperties:
identity:
type: "{{ type }}"
userAssignedIdentity: "{{ userAssignedIdentity }}"
chaosResourceIdentityForFaults:
type: "{{ type }}"
userAssignedIdentity: "{{ userAssignedIdentity }}"
chaosResourceId: "{{ chaosResourceId }}"
faultDurationInMin: {{ faultDurationInMin }}
executionState: "{{ executionState }}"
executionReadinessState: "{{ executionReadinessState }}"
rbacSetupMode: "{{ rbacSetupMode }}"
attentionReason:
drillRbacOnChaosResource: "{{ drillRbacOnChaosResource }}"
rbacNeededForDrillOnChaosResource:
- "{{ rbacNeededForDrillOnChaosResource }}"
drillRbacOnRecoveryPlan: "{{ drillRbacOnRecoveryPlan }}"
rbacNeededForDrillOnRecoveryPlan:
- "{{ rbacNeededForDrillOnRecoveryPlan }}"
roReadiness: "{{ roReadiness }}"
rbacOnTargetResources: "{{ rbacOnTargetResources }}"
runbookFaultRbacOnTargets: "{{ runbookFaultRbacOnTargets }}"
chaosResource: "{{ chaosResource }}"
chaosResourceCreationFailureReasons:
- "{{ chaosResourceCreationFailureReasons }}"
recoveryPlanAndDrillResourcesState: "{{ recoveryPlanAndDrillResourcesState }}"
serviceGroupAndDrillResourcesState: "{{ serviceGroupAndDrillResourcesState }}"
drillUserMsi: "{{ drillUserMsi }}"
chaosResourceUserMsi: "{{ chaosResourceUserMsi }}"
includedResourceInDrill: "{{ includedResourceInDrill }}"
drillRbacOnMonitoringResources: "{{ drillRbacOnMonitoringResources }}"
drillMonitoringErrors:
- code: "{{ code }}"
message: "{{ message }}"
recommendations: "{{ recommendations }}"
drillMonitoringResources: "{{ drillMonitoringResources }}"
monitoringRbacOnDrillResources: "{{ monitoringRbacOnDrillResources }}"
rbacNeededForDrillOnDrillMonitoringResources:
- "{{ rbacNeededForDrillOnDrillMonitoringResources }}"
rbacNeededForDrillOnDrillResources:
- "{{ rbacNeededForDrillOnDrillResources }}"
missingRequiredResourceProviders:
- "{{ missingRequiredResourceProviders }}"
systemMetadata:
initialConfig: "{{ initialConfig }}"
resourceTypeCategories:
- "{{ resourceTypeCategories }}"
lastRunProperties:
lastRunTime: "{{ lastRunTime }}"
lastRunState: "{{ lastRunState }}"
lastRunDuration: "{{ lastRunDuration }}"
lastRunAttestation: "{{ lastRunAttestation }}"
lastSyncTime: "{{ lastSyncTime }}"
lastResyncReadinessCheckTime: "{{ lastResyncReadinessCheckTime }}"
managedOnBehalfOfConfiguration:
moboBrokerResources:
- id: "{{ id }}"
drillType: "{{ drillType }}"
monitoringProperties:
identity:
type: "{{ type }}"
userAssignedIdentity: "{{ userAssignedIdentity }}"
logAnalyticsWorkspaceId: "{{ logAnalyticsWorkspaceId }}"
rawMetricsDataCollectionRuleId: "{{ rawMetricsDataCollectionRuleId }}"
serviceGroupMetricsDataCollectionRuleId: "{{ serviceGroupMetricsDataCollectionRuleId }}"
dataCollectionEndpointId: "{{ dataCollectionEndpointId }}"
errorDetails:
code: "{{ code }}"
message: "{{ message }}"
target: "{{ target }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
target: "{{ target }}"
details: "{{ details }}"
additionalInfo: "{{ additionalInfo }}"
additionalInfo:
- type: "{{ type }}"
info: "{{ info }}"
- name: identity
description: |
The managed service identities assigned to this resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
UPDATE examples
- update
Update a Drill.
UPDATE azure.resilience_management.drills
SET
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
service_group_name = '{{ service_group_name }}' --required
AND drill_name = '{{ drill_name }}' --required;
DELETE examples
- delete
Delete a Drill.
DELETE FROM azure.resilience_management.drills
WHERE service_group_name = '{{ service_group_name }}' --required
AND drill_name = '{{ drill_name }}' --required
;
Lifecycle Methods
- validate_for_execution
- start
- end
- add_or_update_resources
- resync_readiness_check
This returns eligible resource to be faulted or failed over.
EXEC azure.resilience_management.drills.validate_for_execution
@service_group_name='{{ service_group_name }}' --required,
@drill_name='{{ drill_name }}' --required,
@operation-id='{{ operation-id }}' --required
@@json=
'{
"validateForExecutionProperties": "{{ validateForExecutionProperties }}"
}'
;
This starts a new running instance of the Drill.
EXEC azure.resilience_management.drills.start
@service_group_name='{{ service_group_name }}' --required,
@drill_name='{{ drill_name }}' --required,
@operation-id='{{ operation-id }}' --required
@@json=
'{
"mode": "{{ mode }}"
}'
;
This ends the currently running instance of the Drill.
EXEC azure.resilience_management.drills.end
@service_group_name='{{ service_group_name }}' --required,
@drill_name='{{ drill_name }}' --required,
@operation-id='{{ operation-id }}' --required
@@json=
'{
"attestation": "{{ attestation }}",
"attestationNotes": "{{ attestationNotes }}"
}'
;
This enables the user to include, exclude or update resources from their Drill.
EXEC azure.resilience_management.drills.add_or_update_resources
@service_group_name='{{ service_group_name }}' --required,
@drill_name='{{ drill_name }}' --required,
@operation-id='{{ operation-id }}' --required
@@json=
'{
"faultDurationInMin": {{ faultDurationInMin }},
"resourceLists": "{{ resourceLists }}",
"forceInclusionAndUpdate": "{{ forceInclusionAndUpdate }}"
}'
;
This triggers detection of any drifts from the desired state of Resources and RBAC.
EXEC azure.resilience_management.drills.resync_readiness_check
@service_group_name='{{ service_group_name }}' --required,
@drill_name='{{ drill_name }}' --required,
@operation-id='{{ operation-id }}' --required
;