applications
Creates, updates, deletes, gets or lists an applications resource.
Overview
| Name | applications |
| Type | Resource |
| Id | azure.service_fabric_managed_clusters.applications |
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. |
identity | object | Describes the managed identities for an Azure resource. |
location | string | The geo-location where the resource lives. |
managedIdentities | array | List of user assigned identities for the application, each mapped to a friendly name. |
parameters | object | List of application parameters with overridden values from their default values specified in the application manifest. |
provisioningState | string | The current deployment or provisioning state, which only appears in the response. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradePolicy | object | Describes the policy for a monitored application upgrade. |
version | string | The version of the application type as defined in the application manifest. This name must be the full Arm Resource ID for the referenced application type version. |
| 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. |
identity | object | Describes the managed identities for an Azure resource. |
location | string | The geo-location where the resource lives. |
managedIdentities | array | List of user assigned identities for the application, each mapped to a friendly name. |
parameters | object | List of application parameters with overridden values from their default values specified in the application manifest. |
provisioningState | string | The current deployment or provisioning state, which only appears in the response. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradePolicy | object | Describes the policy for a monitored application upgrade. |
version | string | The version of the application type as defined in the application manifest. This name must be the full Arm Resource ID for the referenced application type version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, cluster_name, application_name, subscription_id | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. | |
list | select | resource_group_name, cluster_name, subscription_id | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. | |
create_or_update | insert | resource_group_name, cluster_name, application_name, subscription_id | Create or update a Service Fabric managed application resource with the specified name. | |
update | update | resource_group_name, cluster_name, application_name, subscription_id | Updates an application resource of a given managed cluster. | |
create_or_update | replace | resource_group_name, cluster_name, application_name, subscription_id | Create or update a Service Fabric managed application resource with the specified name. | |
delete | delete | resource_group_name, cluster_name, application_name, subscription_id | Delete a Service Fabric managed application resource with the specified name. | |
read_upgrade | exec | resource_group_name, cluster_name, application_name, subscription_id | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. | |
resume_upgrade | exec | resource_group_name, cluster_name, application_name, subscription_id | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. | |
start_rollback | exec | resource_group_name, cluster_name, application_name, subscription_id | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. | |
update_upgrade | exec | resource_group_name, cluster_name, application_name, subscription_id, name, upgradeKind | Send a request to update the current application upgrade. | |
fetch_health | exec | resource_group_name, cluster_name, application_name, subscription_id | Get the status of the deployed application health. It will query the cluster to find the health of the deployed application. | |
restart_deployed_code_package | exec | resource_group_name, cluster_name, application_name, subscription_id, nodeName, serviceManifestName, codePackageName, codePackageInstanceId | Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation that should be used with immense care. |
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 |
|---|---|---|
application_name | string | The name of the application resource. Required. |
cluster_name | string | The name of the cluster resource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource.
SELECT
id,
name,
identity,
location,
managedIdentities,
parameters,
provisioningState,
systemData,
tags,
type,
upgradePolicy,
version
FROM azure.service_fabric_managed_clusters.applications
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND application_name = '{{ application_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource.
SELECT
id,
name,
identity,
location,
managedIdentities,
parameters,
provisioningState,
systemData,
tags,
type,
upgradePolicy,
version
FROM azure.service_fabric_managed_clusters.applications
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update a Service Fabric managed application resource with the specified name.
INSERT INTO azure.service_fabric_managed_clusters.applications (
properties,
tags,
identity,
location,
resource_group_name,
cluster_name,
application_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ identity }}',
'{{ location }}',
'{{ resource_group_name }}',
'{{ cluster_name }}',
'{{ application_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: applications
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the applications resource.
- name: cluster_name
value: "{{ cluster_name }}"
description: Required parameter for the applications resource.
- name: application_name
value: "{{ application_name }}"
description: Required parameter for the applications resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the applications resource.
- name: properties
description: |
The application resource properties.
value:
managedIdentities:
- name: "{{ name }}"
principalId: "{{ principalId }}"
provisioningState: "{{ provisioningState }}"
version: "{{ version }}"
parameters: "{{ parameters }}"
upgradePolicy:
applicationHealthPolicy:
considerWarningAsError: {{ considerWarningAsError }}
maxPercentUnhealthyDeployedApplications: {{ maxPercentUnhealthyDeployedApplications }}
defaultServiceTypeHealthPolicy:
maxPercentUnhealthyServices: {{ maxPercentUnhealthyServices }}
maxPercentUnhealthyPartitionsPerService: {{ maxPercentUnhealthyPartitionsPerService }}
maxPercentUnhealthyReplicasPerPartition: {{ maxPercentUnhealthyReplicasPerPartition }}
serviceTypeHealthPolicyMap: "{{ serviceTypeHealthPolicyMap }}"
forceRestart: {{ forceRestart }}
rollingUpgradeMonitoringPolicy:
failureAction: "{{ failureAction }}"
healthCheckWaitDuration: "{{ healthCheckWaitDuration }}"
healthCheckStableDuration: "{{ healthCheckStableDuration }}"
healthCheckRetryTimeout: "{{ healthCheckRetryTimeout }}"
upgradeTimeout: "{{ upgradeTimeout }}"
upgradeDomainTimeout: "{{ upgradeDomainTimeout }}"
instanceCloseDelayDuration: {{ instanceCloseDelayDuration }}
upgradeMode: "{{ upgradeMode }}"
upgradeReplicaSetCheckTimeout: {{ upgradeReplicaSetCheckTimeout }}
recreateApplication: {{ recreateApplication }}
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: identity
description: |
Describes the managed identities for an Azure resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives.
UPDATE examples
- update
Updates an application resource of a given managed cluster.
UPDATE azure.service_fabric_managed_clusters.applications
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND application_name = '{{ application_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create or update a Service Fabric managed application resource with the specified name.
REPLACE azure.service_fabric_managed_clusters.applications
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
identity = '{{ identity }}',
location = '{{ location }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND application_name = '{{ application_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete a Service Fabric managed application resource with the specified name.
DELETE FROM azure.service_fabric_managed_clusters.applications
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND application_name = '{{ application_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- read_upgrade
- resume_upgrade
- start_rollback
- update_upgrade
- fetch_health
- restart_deployed_code_package
Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade.
EXEC azure.service_fabric_managed_clusters.applications.read_upgrade
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@application_name='{{ application_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused.
EXEC azure.service_fabric_managed_clusters.applications.resume_upgrade
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@application_name='{{ application_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"upgradeDomainName": "{{ upgradeDomainName }}"
}'
;
Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version.
EXEC azure.service_fabric_managed_clusters.applications.start_rollback
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@application_name='{{ application_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Send a request to update the current application upgrade.
EXEC azure.service_fabric_managed_clusters.applications.update_upgrade
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@application_name='{{ application_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}",
"upgradeKind": "{{ upgradeKind }}",
"applicationHealthPolicy": "{{ applicationHealthPolicy }}",
"updateDescription": "{{ updateDescription }}"
}'
;
Get the status of the deployed application health. It will query the cluster to find the health of the deployed application.
EXEC azure.service_fabric_managed_clusters.applications.fetch_health
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@application_name='{{ application_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"eventsHealthStateFilter": "{{ eventsHealthStateFilter }}",
"deployedApplicationsHealthStateFilter": "{{ deployedApplicationsHealthStateFilter }}",
"servicesHealthStateFilter": "{{ servicesHealthStateFilter }}",
"excludeHealthStatistics": {{ excludeHealthStatistics }},
"timeout": {{ timeout }}
}'
;
Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation that should be used with immense care.
EXEC azure.service_fabric_managed_clusters.applications.restart_deployed_code_package
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@application_name='{{ application_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"nodeName": "{{ nodeName }}",
"serviceManifestName": "{{ serviceManifestName }}",
"codePackageName": "{{ codePackageName }}",
"codePackageInstanceId": "{{ codePackageInstanceId }}",
"servicePackageActivationId": "{{ servicePackageActivationId }}"
}'
;