goal_assignments
Creates, updates, deletes, gets or lists a goal_assignments resource.
Overview
| Name | goal_assignments |
| Type | Resource |
| Id | azure.resilience_management.goal_assignments |
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. |
errorDetails | object | Details of any errors encountered during the operation. |
goalAssignmentType | string | The type of goal assignment. Required. "Resiliency" (Resiliency) |
goalTemplateId | string | Arm id of the goal template. Required. |
provisioningState | string | Provisioning state. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted) |
serviceLevelResources | array | List of service level resources. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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. |
errorDetails | object | Details of any errors encountered during the operation. |
goalAssignmentType | string | The type of goal assignment. Required. "Resiliency" (Resiliency) |
goalTemplateId | string | Arm id of the goal template. Required. |
provisioningState | string | Provisioning state. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted) |
serviceLevelResources | array | List of service level resources. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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, goal_assignment_name | Get a GoalAssignment. | |
list | select | service_group_name | $skipToken, $top | List GoalAssignment resources by tenant. |
create_or_update | insert | service_group_name, goal_assignment_name | Create a GoalAssignment. | |
update | update | service_group_name, goal_assignment_name | Update a GoalAssignment. | |
create_or_update | replace | service_group_name, goal_assignment_name | Create a GoalAssignment. | |
delete | delete | service_group_name, goal_assignment_name | Delete a GoalAssignment. | |
update_goal_resources | exec | service_group_name, goal_assignment_name, resources | Action to exclude a resource from goal assignment. | |
refresh_goal_resources | exec | service_group_name, goal_assignment_name | Refreshes the goal resources under a goal assignment. This operation scans for new resources under the scope of the assignment. | |
recommend_capacity | exec | service_group_name, goal_assignment_name, resourceIds | Recommends capacity improvements for resources under the goal assignments scope. Returns AI-powered capacity assessments and recommendations. |
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 |
|---|---|---|
goal_assignment_name | string | The name of the GoalAssignment. 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 GoalAssignment.
SELECT
id,
name,
errorDetails,
goalAssignmentType,
goalTemplateId,
provisioningState,
serviceLevelResources,
systemData,
type
FROM azure.resilience_management.goal_assignments
WHERE service_group_name = '{{ service_group_name }}' -- required
AND goal_assignment_name = '{{ goal_assignment_name }}' -- required
;
List GoalAssignment resources by tenant.
SELECT
id,
name,
errorDetails,
goalAssignmentType,
goalTemplateId,
provisioningState,
serviceLevelResources,
systemData,
type
FROM azure.resilience_management.goal_assignments
WHERE service_group_name = '{{ service_group_name }}' -- required
AND $skipToken = '{{ $skipToken }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
Create a GoalAssignment.
INSERT INTO azure.resilience_management.goal_assignments (
properties,
service_group_name,
goal_assignment_name
)
SELECT
'{{ properties }}',
'{{ service_group_name }}',
'{{ goal_assignment_name }}'
;
# Description fields are for documentation purposes
- name: goal_assignments
props:
- name: service_group_name
value: "{{ service_group_name }}"
description: Required parameter for the goal_assignments resource.
- name: goal_assignment_name
value: "{{ goal_assignment_name }}"
description: Required parameter for the goal_assignments resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
goalTemplateId: "{{ goalTemplateId }}"
goalAssignmentType: "{{ goalAssignmentType }}"
serviceLevelResources:
- serviceLevelIndicatorResourceId: "{{ serviceLevelIndicatorResourceId }}"
serviceLevelObjectiveResourceId: "{{ serviceLevelObjectiveResourceId }}"
provisioningState: "{{ provisioningState }}"
errorDetails:
code: "{{ code }}"
message: "{{ message }}"
target: "{{ target }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
target: "{{ target }}"
details: "{{ details }}"
additionalInfo: "{{ additionalInfo }}"
additionalInfo:
- type: "{{ type }}"
info: "{{ info }}"
UPDATE examples
- update
Update a GoalAssignment.
UPDATE azure.resilience_management.goal_assignments
SET
properties = '{{ properties }}'
WHERE
service_group_name = '{{ service_group_name }}' --required
AND goal_assignment_name = '{{ goal_assignment_name }}' --required;
REPLACE examples
- create_or_update
Create a GoalAssignment.
REPLACE azure.resilience_management.goal_assignments
SET
properties = '{{ properties }}'
WHERE
service_group_name = '{{ service_group_name }}' --required
AND goal_assignment_name = '{{ goal_assignment_name }}' --required;
DELETE examples
- delete
Delete a GoalAssignment.
DELETE FROM azure.resilience_management.goal_assignments
WHERE service_group_name = '{{ service_group_name }}' --required
AND goal_assignment_name = '{{ goal_assignment_name }}' --required
;
Lifecycle Methods
- update_goal_resources
- refresh_goal_resources
- recommend_capacity
Action to exclude a resource from goal assignment.
EXEC azure.resilience_management.goal_assignments.update_goal_resources
@service_group_name='{{ service_group_name }}' --required,
@goal_assignment_name='{{ goal_assignment_name }}' --required
@@json=
'{
"resources": "{{ resources }}"
}'
;
Refreshes the goal resources under a goal assignment. This operation scans for new resources under the scope of the assignment.
EXEC azure.resilience_management.goal_assignments.refresh_goal_resources
@service_group_name='{{ service_group_name }}' --required,
@goal_assignment_name='{{ goal_assignment_name }}' --required
;
Recommends capacity improvements for resources under the goal assignments scope. Returns AI-powered capacity assessments and recommendations.
EXEC azure.resilience_management.goal_assignments.recommend_capacity
@service_group_name='{{ service_group_name }}' --required,
@goal_assignment_name='{{ goal_assignment_name }}' --required
@@json=
'{
"resourceIds": "{{ resourceIds }}"
}'
;