Skip to main content

goal_assignments

Creates, updates, deletes, gets or lists a goal_assignments resource.

Overview​

Namegoal_assignments
TypeResource
Idazure.resilience_management.goal_assignments

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
errorDetailsobjectDetails of any errors encountered during the operation.
goalAssignmentTypestringThe type of goal assignment. Required. "Resiliency" (Resiliency)
goalTemplateIdstringArm id of the goal template. Required.
provisioningStatestringProvisioning state. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted)
serviceLevelResourcesarrayList of service level resources.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_group_name, goal_assignment_nameGet a GoalAssignment.
listselectservice_group_name$skipToken, $topList GoalAssignment resources by tenant.
create_or_updateinsertservice_group_name, goal_assignment_nameCreate a GoalAssignment.
updateupdateservice_group_name, goal_assignment_nameUpdate a GoalAssignment.
create_or_updatereplaceservice_group_name, goal_assignment_nameCreate a GoalAssignment.
deletedeleteservice_group_name, goal_assignment_nameDelete a GoalAssignment.
update_goal_resourcesexecservice_group_name, goal_assignment_name, resourcesAction to exclude a resource from goal assignment.
refresh_goal_resourcesexecservice_group_name, goal_assignment_nameRefreshes the goal resources under a goal assignment. This operation scans for new resources under the scope of the assignment.
recommend_capacityexecservice_group_name, goal_assignment_name, resourceIdsRecommends 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.

NameDatatypeDescription
goal_assignment_namestringThe name of the GoalAssignment. Required.
service_group_namestringThe name of the service group. Required.
$skipTokenstringSkip over when retrieving results. Default value is None.
$topintegerNumber of elements to return when retrieving results. Default value is None.

SELECT examples​

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
;

INSERT examples​

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 }}'
;

UPDATE examples​

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 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 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​

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 }}"
}'
;