From c3cc3db7a1bc332d08dbda2dd76d49e67971d9da Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Mon, 25 Apr 2022 18:49:28 +0530 Subject: [PATCH 1/7] Adding monitors spec and examples Adding monitors spec and examples --- .../preview/2021-12-01-preview/monitors.json | 1068 +++++++++++++++++ .../2021-12-01-preview/operations.json | 76 ++ 2 files changed, 1144 insertions(+) create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/operations.json diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json new file mode 100644 index 000000000000..a7039af85ae6 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json @@ -0,0 +1,1068 @@ +{ + "swagger": "2.0", + "info": { + "title": "Workloads Client", + "description": "The workload monitor Client.", + "version": "2021-12-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/monitors": { + "get": { + "tags": [ + "Monitors" + ], + "operationId": "monitors_List", + "summary": "Gets a list of SAP monitors in the specified subscription.", + "description": "Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP monitor.", + "x-ms-examples": { + "List all SAP Monitors in a subscription": { + "$ref": "./examples/workloadmonitor/monitors_List.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MonitorListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors": { + "get": { + "tags": [ + "Monitors" + ], + "operationId": "monitors_ListByResourceGroup", + "summary": "Gets a list of SAP monitors", + "description": "Gets a list of SAP monitors in the specified resource group.", + "x-ms-examples": { + "List all SAP Monitors in a resource group": { + "$ref": "./examples/workloadmonitor/monitors_ListByRG.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MonitorListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}": { + "get": { + "tags": [ + "Monitors" + ], + "operationId": "monitors_Get", + "summary": "Gets properties of a SAP monitor.", + "description": "Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.", + "x-ms-examples": { + "Get properties of a SAP monitor": { + "$ref": "./examples/workloadmonitor/monitors_Get.json" + } + }, + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Monitor" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Monitors" + ], + "operationId": "monitors_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "summary": "Creates a SAP monitor.", + "description": "Creates a SAP monitor for the specified subscription, resource group, and resource name.", + "x-ms-examples": { + "Create a SAP Monitor": { + "$ref": "./examples/workloadmonitor/monitors_Create.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + }, + { + "$ref": "#/parameters/MonitorParameter" + } + ], + "responses": { + "200": { + "description": "Created Monitor", + "schema": { + "$ref": "#/definitions/Monitor" + } + }, + "201": { + "description": "Creating Monitor", + "schema": { + "$ref": "#/definitions/Monitor" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Monitors" + ], + "operationId": "monitors_Delete", + "x-ms-long-running-operation": true, + "summary": "Deletes a SAP monitor.", + "description": "Deletes a SAP monitor with the specified subscription, resource group, and monitor name.", + "x-ms-examples": { + "Deletes a SAP monitor": { + "$ref": "./examples/workloadmonitor/monitors_Delete.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + } + ], + "responses": { + "200": { + "description": "Delete Monitor", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationStatusResult" + } + }, + "202": { + "description": "Deleting Monitor" + }, + "204": { + "description": "No Monitor to delete" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Monitors" + ], + "operationId": "monitors_Update", + "summary": "Patches the Tags field of a SAP monitor.", + "description": "Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name.", + "x-ms-examples": { + "Update Tags field of a SAP monitor": { + "$ref": "./examples/workloadmonitor/monitors_PatchTags.json" + }, + "Delete Tags field of a SAP monitor": { + "$ref": "./examples/workloadmonitor/monitors_PatchTags_Delete.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Monitor" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/providerInstances": { + "get": { + "tags": [ + "ProviderInstances" + ], + "operationId": "ProviderInstances_List", + "summary": "Gets a list of provider instances in the specified SAP monitor.", + "description": "Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each provider instances.", + "x-ms-examples": { + "List all SAP Monitors providers in a subscription": { + "$ref": "./examples/workloadmonitor/ProviderInstances_List.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProviderInstanceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/providerInstances/{providerInstanceName}": { + "get": { + "tags": [ + "ProviderInstances" + ], + "operationId": "ProviderInstances_Get", + "summary": "Gets properties of a provider instance.", + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "description": "Gets properties of a provider instance for the specified subscription, resource group, Monitor name, and resource name.", + "x-ms-examples": { + "Get properties of a SAP monitor Hana provider": { + "$ref": "./examples/workloadmonitor/ProviderInstances_Get.json" + }, + "Get properties of a SAP monitor NetWeaver provider": { + "$ref": "./examples/workloadmonitor/NetWeaverProviderInstances_Get.json" + }, + "Get properties of a OS provider": { + "$ref": "./examples/workloadmonitor/PrometheusOSProviderInstances_Get.json" + }, + "Get properties of a Db2 provider": { + "$ref": "./examples/workloadmonitor/Db2ProviderInstances_Get.json" + } + }, + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + }, + { + "$ref": "#/parameters/ProviderInstanceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProviderInstance" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "ProviderInstances" + ], + "operationId": "ProviderInstances_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "summary": "Creates a provider instance.", + "description": "Creates a provider instance for the specified subscription, resource group, Monitor name, and resource name.", + "x-ms-examples": { + "Create a SAP Monitor Hana provider": { + "$ref": "./examples/workloadmonitor/ProviderInstances_Create.json" + }, + "Create a SAP Monitor NetWeaver provider": { + "$ref": "./examples/workloadmonitor/NetWeaverProviderInstances_Create.json" + }, + "Create a OS provider": { + "$ref": "./examples/workloadmonitor/PrometheusOSProviderInstances_Create.json" + }, + "Create a Db2 provider": { + "$ref": "./examples/workloadmonitor/Db2ProviderInstances_Create.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + }, + { + "$ref": "#/parameters/ProviderInstanceNameParameter" + }, + { + "$ref": "#/parameters/ProviderInstanceParameter" + } + ], + "responses": { + "200": { + "description": "Created provider instance", + "schema": { + "$ref": "#/definitions/ProviderInstance" + } + }, + "201": { + "description": "Creating provider instance", + "schema": { + "$ref": "#/definitions/ProviderInstance" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "ProviderInstances" + ], + "operationId": "ProviderInstances_Delete", + "x-ms-long-running-operation": true, + "summary": "Deletes a provider instance.", + "description": "Deletes a provider instance for the specified subscription, resource group, Monitor name, and resource name.", + "x-ms-examples": { + "Deletes a SAP monitor provider": { + "$ref": "./examples/workloadmonitor/ProviderInstances_Delete.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/monitorNameParameter" + }, + { + "$ref": "#/parameters/ProviderInstanceNameParameter" + } + ], + "responses": { + "200": { + "description": "Deleted provider instance", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationStatusResult" + } + }, + "202": { + "description": "Deleting provider instance" + }, + "204": { + "description": "No provider instance to delete" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "OperationsDisplayDefinition": { + "description": "Defines the workload operation.", + "required": [ + "description", + "operation", + "provider", + "resource" + ], + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Defines the workload provider." + }, + "resource": { + "type": "string", + "description": "Defines the workload resource." + }, + "operation": { + "type": "string", + "description": "Defines the workload operation." + }, + "description": { + "type": "string", + "description": "Describes the workload operation." + } + } + }, + "OperationsDefinition": { + "required": [ + "display", + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation." + }, + "isDataAction": { + "type": "boolean", + "description": "Indicates whether the operation applies to data-plane." + }, + "origin": { + "enum": [ + "NotSpecified", + "User", + "System" + ], + "type": "string", + "description": "Defines the workload operation origin.", + "x-ms-enum": { + "name": "OperationProperties", + "modelAsString": true + } + }, + "display": { + "description": "Display information of the operation.", + "allOf": [ + { + "$ref": "#/definitions/OperationsDisplayDefinition" + } + ] + }, + "actionType": { + "enum": [ + "NotSpecified", + "Internal" + ], + "x-ms-enum": { + "name": "WorkloadMonitorActionType", + "modelAsString": true + }, + "description": "Defines the action type of workload operation.", + "type": "string" + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Defines the workload operation properties." + } + }, + "description": "Properties of an Operation." + }, + "OperationsContent": { + "type": "object", + "description": "Defines the workload operation content.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "description": "Operations content.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/OperationsDefinition" + } + }, + "x-ms-azure-resource": true + }, + "OperationsDefinitionArrayResponseWithContinuation": { + "type": "object", + "description": "Defines the workload operation definition response.", + "properties": { + "value": { + "description": "Defines the workload operation definition response properties.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationsDefinition" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "The URL to get to the next set of results, if there are any.", + "type": "string" + } + } + }, + "Error": { + "description": "Standard error object.", + "type": "object", + "properties": { + "code": { + "description": "Server-defined set of error codes.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Human-readable representation of the error.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Target of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Array of details about specific errors that led to this reported error.", + "type": "array", + "items": { + "$ref": "#/definitions/Error" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "innerError": { + "description": "Object containing more specific information than the current object about the error.", + "type": "object", + "properties": { + "innerError": { + "$ref": "#/definitions/Error" + } + }, + "readOnly": true + } + } + }, + "ManagedRGConfiguration": { + "description": "Managed resource group configuration", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Managed resource group name" + } + } + }, + "Tags": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags field of the resource." + } + }, + "description": "Tags field of the resource." + }, + "MonitorListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Monitor" + }, + "description": "The list of SAP monitors." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of SAP monitors." + } + }, + "description": "The response from the List SAP monitors operation." + }, + "Monitor": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/MonitorProperties", + "description": "SAP monitor properties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "description": "SAP monitor info on Azure (ARM properties and SAP monitor properties)" + }, + "MonitorProperties": { + "type": "object", + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "enum": [ + "Accepted", + "Creating", + "Updating", + "Failed", + "Succeeded", + "Deleting", + "Migrating" + ], + "x-ms-enum": { + "name": "WorkloadMonitorProvisioningState", + "modelAsString": true + }, + "description": "State of provisioning of the monitor." + }, + "errors": { + "description": "Defines the SAP monitor errors.", + "allOf": [ + { + "$ref": "#/definitions/Error" + } + ], + "readOnly": true + }, + "appLocation": { + "type": "string", + "description": "The monitor resources will be deployed in the monitoring region. The subnet region should be same as the monitoring region." + }, + "routingPreference": { + "type": "string", + "description": "Sets the routing preference of the monitor. By default only RFC1918 traffic is routed to the customer VNET.", + "enum": [ + "Default", + "RouteAll" + ], + "x-ms-enum": { + "name": "RoutingPreference", + "modelAsString": true + } + }, + "managedResourceGroupConfiguration": { + "description": "Managed resource group configuration", + "$ref": "#/definitions/ManagedRGConfiguration" + }, + "logAnalyticsWorkspaceArmId": { + "type": "string", + "description": "The ARM ID of the Log Analytics Workspace that is used for monitoring." + }, + "monitorSubnet": { + "type": "string", + "description": "The subnet which the SAP monitor will be deployed in" + }, + "msiArmId": { + "readOnly": true, + "type": "string", + "description": "The ARM ID of the MSI used for monitoring." + } + }, + "description": "Describes the properties of a SAP monitor." + }, + "ProviderInstanceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderInstance" + }, + "description": "The list of provider instances." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of provider instances." + } + }, + "description": "The response from the List provider instances operation." + }, + "ProviderInstance": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ProviderInstanceProperties", + "description": "Provider Instance properties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ], + "description": "A provider instance associated with monitor." + }, + "HanaDbProviderInstanceProperties": { + "description": "Gets or sets the provider properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProviderSpecificProperties" + } + ], + "properties": { + "hostname": { + "description": "Gets or sets the target virtual machine size.", + "type": "string" + }, + "dbName": { + "description": "Gets or sets the hana database name.", + "type": "string" + }, + "sqlPort": { + "description": "Gets or sets the database sql port.", + "type": "string" + }, + "dbUsername": { + "description": "Gets or sets the database user name.", + "type": "string" + }, + "dbPassword": { + "description": "Gets or sets the database password.", + "type": "string", + "x-ms-secret": true + } + }, + "x-ms-discriminator-value": "SapHana" + }, + "SapNetWeaverProviderInstanceProperties": { + "description": "Gets or sets the provider properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProviderSpecificProperties" + } + ], + "properties": { + "sapSid": { + "description": "Gets or sets the SAP System Identifier", + "type": "string" + }, + "sapHostname": { + "description": "Gets or sets the target virtual machine IP Address/FQDN.", + "type": "string" + }, + "sapInstanceNr": { + "description": "Gets or sets the instance number of SAP NetWeaver.", + "type": "string" + }, + "sapHostFileEntries": { + "description": "Gets or sets the list of HostFile Entries", + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-ms-discriminator-value": "SapNetWeaver" + }, + "PrometheusOSProviderInstanceProperties": { + "description": "Gets or sets the PrometheusOS provider properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProviderSpecificProperties" + } + ], + "properties": { + "prometheusUrl": { + "description": "URL of the Node Exporter endpoint", + "type": "string" + } + }, + "x-ms-discriminator-value": "PrometheusOS" + }, + "DB2ProviderInstanceProperties": { + "description": "Gets or sets the DB2 provider properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProviderSpecificProperties" + } + ], + "properties": { + "hostname": { + "description": "Gets or sets the target virtual machine name.", + "type": "string" + }, + "dbName": { + "description": "Gets or sets the db2 database name.", + "type": "string" + }, + "dbPort": { + "description": "Gets or sets the db2 database sql port.", + "type": "string" + }, + "dbUsername": { + "description": "Gets or sets the db2 database user name.", + "type": "string" + }, + "dbPassword": { + "description": "Gets or sets the db2 database password.", + "type": "string", + "x-ms-secret": true + }, + "sapSid": { + "description": "Gets or sets the SAP System Identifier", + "type": "string" + } + }, + "x-ms-discriminator-value": "Db2" + }, + "ProviderSpecificProperties": { + "description": "Gets or sets the provider specific properties.", + "type": "object", + "required": [ + "providerType" + ], + "properties": { + "providerType": { + "description": "The provider type. For example, the value can be SapHana.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + } + }, + "discriminator": "providerType" + }, + "ProviderInstanceProperties": { + "type": "object", + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "enum": [ + "Accepted", + "Creating", + "Updating", + "Failed", + "Succeeded", + "Deleting", + "Migrating" + ], + "x-ms-enum": { + "name": "WorkloadMonitorProvisioningState", + "modelAsString": true + }, + "description": "State of provisioning of the provider instance" + }, + "errors": { + "description": "Defines the provider instance errors.", + "allOf": [ + { + "$ref": "#/definitions/Error" + } + ], + "readOnly": true + }, + "providerSettings": { + "description": "Defines the provider instance errors.", + "$ref": "#/definitions/ProviderSpecificProperties" + } + }, + "description": "Describes the properties of a provider instance." + } + }, + "parameters": { + "monitorNameParameter": { + "name": "monitorName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the SAP monitor resource.", + "x-ms-parameter-location": "method" + }, + "ProviderInstanceNameParameter": { + "name": "providerInstanceName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the provider instance.", + "x-ms-parameter-location": "method" + }, + "TagsParameter": { + "name": "tagsParameter", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Tags" + }, + "description": "Request body that only contains the new Tags field", + "x-ms-parameter-location": "method" + }, + "MonitorParameter": { + "name": "MonitorParameter", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Monitor" + }, + "description": "Request body representing a SAP Monitor", + "x-ms-parameter-location": "method" + }, + "ProviderInstanceParameter": { + "name": "providerInstanceParameter", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ProviderInstance" + }, + "description": "Request body representing a provider instance", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/operations.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/operations.json new file mode 100644 index 000000000000..cf22fe2000fc --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/operations.json @@ -0,0 +1,76 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-12-01-preview", + "title": "Workloads Client", + "description": "Workloads client provides access to various workload operations" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Workloads/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all the available API operations under this PR", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Resource provider error response about the failure.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Operations": { + "$ref": "./examples/Operations_List.json" + } + } + } + } + }, + "definitions": {}, + "parameters": {} +} From 2d9f36e4cfdf8a3b44a8c123c56cddbcebd30600 Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Tue, 26 Apr 2022 11:15:40 +0530 Subject: [PATCH 2/7] All Monitors spec and examples All Monitors spec and examples --- .../2021-12-01-preview/commonTypes.json | 41 ++++++++ .../examples/Operations_List.json | 91 ++++++++++++++++++ .../Db2ProviderInstances_Create.json | 68 +++++++++++++ .../Db2ProviderInstances_Get.json | 37 ++++++++ .../NetWeaverProviderInstances_Create.json | 70 ++++++++++++++ .../NetWeaverProviderInstances_Get.json | 38 ++++++++ .../PrometheusOSProviderInstances_Create.json | 55 +++++++++++ .../PrometheusOSProviderInstances_Get.json | 33 +++++++ .../ProviderInstances_Create.json | 65 +++++++++++++ .../ProviderInstances_Delete.json | 23 +++++ .../ProviderInstances_Get.json | 36 +++++++ .../ProviderInstances_List.json | 60 ++++++++++++ .../workloadmonitor/monitors_Create.json | 95 +++++++++++++++++++ .../workloadmonitor/monitors_Delete.json | 22 +++++ .../workloadmonitor/monitors_Get.json | 49 ++++++++++ .../workloadmonitor/monitors_List.json | 72 ++++++++++++++ .../workloadmonitor/monitors_ListByRG.json | 73 ++++++++++++++ .../workloadmonitor/monitors_PatchTags.json | 54 +++++++++++ .../monitors_PatchTags_Delete.json | 52 ++++++++++ .../workloads/resource-manager/readme.az.md | 16 ++++ .../workloads/resource-manager/readme.cli.md | 1 + .../resource-manager/readme.csharp.md | 14 +++ .../workloads/resource-manager/readme.go.md | 11 +++ .../workloads/resource-manager/readme.md | 81 ++++++++++++++++ .../resource-manager/readme.python.md | 18 ++++ .../resource-manager/readme.typescript.md | 14 +++ 26 files changed, 1189 insertions(+) create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Operations_List.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Delete.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_List.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_ListByRG.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json create mode 100644 specification/workloads/resource-manager/readme.az.md create mode 100644 specification/workloads/resource-manager/readme.cli.md create mode 100644 specification/workloads/resource-manager/readme.csharp.md create mode 100644 specification/workloads/resource-manager/readme.go.md create mode 100644 specification/workloads/resource-manager/readme.md create mode 100644 specification/workloads/resource-manager/readme.python.md create mode 100644 specification/workloads/resource-manager/readme.typescript.md diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json new file mode 100644 index 000000000000..48d9bb62e095 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json @@ -0,0 +1,41 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-12-01-preview", + "title": "Workloads Client", + "description": "Workloads client provides access to various workload operations" + }, + "paths": {}, + "definitions": { + "ManagedServiceIdentityType": { + "description": "Type of managed service identity (only None, UserAssigned types are allowed).", + "enum": [ + "None", + "UserAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedServiceIdentityType", + "modelAsString": true + } + }, + "UserAssignedServiceIdentity": { + "description": "Managed service identity (user assigned identities)", + "type": "object", + "properties": { + "type": { + "description": "Type of manage identity", + "$ref": "#/definitions/ManagedServiceIdentityType" + }, + "userAssignedIdentities": { + "description": "User assigned identities dictionary", + "$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/UserAssignedIdentities" + } + }, + "required": [ + "type" + ] + } + }, + "parameters": {} +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Operations_List.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Operations_List.json new file mode 100644 index 000000000000..e2ae8f64922b --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Operations_List.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Workloads/phpWorkloads/Write", + "isDataAction": false, + "display": { + "provider": "Microsoft.Workloads", + "resource": "phpWorkloads", + "operation": "Creates or updates the phpWorkloads", + "description": "Set phpWorkloads" + } + }, + { + "name": "Microsoft.Workloads/phpWorkloads/Delete", + "isDataAction": false, + "display": { + "provider": "Microsoft.Workloads", + "resource": "phpWorkloads", + "operation": "Deletes the phpWorkloads", + "description": "Delete phpWorkloads" + } + }, + { + "name": "Microsoft.Workloads/phpWorkloads/Read", + "isDataAction": false, + "display": { + "provider": "Microsoft.Workloads", + "resource": "phpWorkloads", + "operation": "Reads the phpWorkloads", + "description": "Read phpWorkloads" + } + }, + { + "name": "Microsoft.Workloads/phpWorkloads/wordpressInstances/Write", + "isDataAction": false, + "display": { + "provider": "Microsoft.Workloads", + "resource": "wordpressInstances", + "operation": "Creates or updates the wordpressInstances", + "description": "Set wordpressInstances" + } + }, + { + "name": "Microsoft.Workloads/phpWorkloads/wordpressInstances/Delete", + "isDataAction": false, + "display": { + "provider": "Microsoft.Workloads", + "resource": "wordpressInstances", + "operation": "Deletes the wordpressInstances", + "description": "Delete wordpressInstances" + } + }, + { + "name": "Microsoft.Workloads/phpWorkloads/wordpressInstances/Read", + "isDataAction": false, + "display": { + "provider": "Microsoft.Workloads", + "resource": "wordpressInstances", + "operation": "Reads the wordpressInstances", + "description": "Read wordpressInstances" + } + }, + { + "name": "Microsoft.Workloads/monitors/Read", + "display": { + "provider": "Microsoft.Workloads", + "resource": "Microsoft.Workloads/monitors", + "operation": "Read", + "description": "Reads the Monitor workload." + } + }, + { + "name": "Microsoft.Workloads/monitors/Write", + "display": { + "provider": "Microsoft.Workloads", + "resource": "Microsoft.Workloads/monitors", + "operation": "Read", + "description": "Creates or updates a Monitor workload." + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json new file mode 100644 index 000000000000..335d5aa9c6dc --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance", + "providerInstanceParameter": { + "properties": { + "providerSettings": { + "providerType": "Db2", + "sapSid": "SID", + "hostname": "hostname", + "dbUsername": "username", + "dbName": "dbName", + "dbPassword": "password", + "dbPort": "dbPort" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "Db2", + "sapSid": "SID", + "hostname": "vmname.azure.com", + "dbUsername": "Db2OPA", + "dbName": "OPA", + "dbPort": "5912" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "Db2", + "sapSid": "SID", + "hostname": "vmname.azure.com", + "dbUsername": "Db2OPA", + "dbName": "OPA", + "dbPort": "5912" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json new file mode 100644 index 000000000000..514e49506881 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "Db2", + "sapSid": "SID", + "hostname": "vmname.azure.com", + "dbUsername": "Db2OPA", + "dbName": "OPA", + "dbPort": "5912" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json new file mode 100644 index 000000000000..5faf6c0f74bf --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance", + "providerInstanceParameter": { + "properties": { + "providerSettings": { + "providerType": "SapNetWeaver", + "sapSid": "SID", + "sapHostname": "name", + "sapInstanceNr": "00", + "sapHostFileEntries": [ + "127.0.0.1 name fqdn" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapNetWeaver", + "sapSid": "SID", + "sapHostname": "name", + "sapInstanceNr": "00", + "sapHostFileEntries": [ + "127.0.0.1 name fqdn" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapNetWeaver", + "sapSid": "SID", + "sapHostname": "name", + "sapInstanceNr": "00", + "sapHostFileEntries": [ + "127.0.0.1 name fqdn" + ] + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json new file mode 100644 index 000000000000..997e3a8b3552 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapNetWeaver", + "sapSid": "SID", + "sapHostname": "name", + "sapInstanceNr": "00", + "sapHostFileEntries": [ + "127.0.0.1 name fqdn" + ] + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json new file mode 100644 index 000000000000..79595c5cddc2 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance", + "providerInstanceParameter": { + "properties": { + "providerSettings": { + "providerType": "PrometheusOS", + "prometheusUrl": "http://192.168.0.0:9090/metrics" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusOS", + "prometheusUrl": "http://192.168.0.0:9090/metrics" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusOS", + "prometheusUrl": "http://192.168.0.0:9090/metrics" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json new file mode 100644 index 000000000000..24b73081490e --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusOS", + "prometheusUrl": "http://192.168.0.0:9090/metrics" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json new file mode 100644 index 000000000000..96361dcc7c47 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance", + "providerInstanceParameter": { + "properties": { + "providerSettings": { + "providerType": "SapHana", + "hostname": "name", + "dbName": "db", + "sqlPort": "0000", + "dbUsername": "user", + "dbPassword": "****" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapHana", + "hostname": "name", + "dbName": "db", + "sqlPort": "0000", + "dbUsername": "user" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapHana", + "hostname": "name", + "dbName": "db", + "sqlPort": "0000", + "dbUsername": "user" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json new file mode 100644 index 000000000000..34e4bb8b59cd --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/operations/locations/westus/1e4193c3-206e-4916-b124-1da16175eb0f", + "name": "1e4193c3-206e-4916-b124-1da16175eb0f", + "status": "Succeeded", + "startTime": "2021-08-19T03:36:07.000Z", + "endTime": "2021-08-19T03:38:07.000Z", + "error": null + } + }, + "202": {}, + "204": {} + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json new file mode 100644 index 000000000000..415201c64539 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapHana", + "hostname": "name", + "dbName": "db", + "sqlPort": "0000", + "dbUsername": "user" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json new file mode 100644 index 000000000000..623845fb9405 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance1", + "name": "myProviderInstance1", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapHana", + "hostname": "name", + "dbName": "db", + "sqlPort": "0000", + "dbUsername": "user" + } + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance1", + "name": "myProviderInstance2", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "SapNetWeaver", + "sapSid": "SID", + "sapHostname": "name", + "sapInstanceNr": "00", + "sapHostFileEntries": [ + "127.0.0.1 name fqdn" + ] + } + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance1", + "name": "myProviderInstance3", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusOS", + "prometheusUrl": "http://192.168.0.0:9090/metrics" + } + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Create.json new file mode 100644 index 000000000000..5da6c51e7a0d --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Create.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "MonitorParameter": { + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "appLocation": "westus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor", + "name": "mySapMonitor", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor", + "name": "mySapMonitor", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Delete.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Delete.json new file mode 100644 index 000000000000..90f99b180655 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Delete.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/operations/locations/westus/1e4193c3-206e-4916-b124-1da16175eb0f", + "name": "1e4193c3-206e-4916-b124-1da16175eb0f", + "status": "Succeeded", + "startTime": "2021-08-19T03:36:07.000Z", + "endTime": "2021-08-19T03:38:07.000Z", + "error": null + } + }, + "202": {}, + "204": {} + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Get.json new file mode 100644 index 000000000000..2efec9c61b90 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor", + "name": "mySapMonitor1", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_List.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_List.json new file mode 100644 index 000000000000..9b9740858c13 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_List.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor1", + "name": "mySapMonitor1", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg1" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor2", + "name": "mySapMonitor2", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "westus", + "routingPreference": "Default", + "managedResourceGroupConfiguration": { + "name": "myManagedRg2" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_ListByRG.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_ListByRG.json new file mode 100644 index 000000000000..294c18d50ec5 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_ListByRG.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "example-rg" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Workloads/monitors/mySapMonitor1", + "name": "mySapMonitor1", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg1" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/example-rg/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Workloads/workloads/mySapMonitor2", + "name": "mySapMonitor2", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "westus", + "routingPreference": "Default", + "managedResourceGroupConfiguration": { + "name": "myManagedRg2" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/example-rg/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags.json new file mode 100644 index 000000000000..54aef7c4b83c --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "tagsParameter": { + "tags": { + "testkey": "testvalue" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor", + "name": "mySapMonitor", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "testkey": "testvalue" + }, + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json new file mode 100644 index 000000000000..aee9dec3eeaa --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "tagsParameter": { + "tags": {} + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor", + "name": "mySapMonitor", + "type": "Microsoft.Workloads/workloads", + "location": "westus", + "tags": { + "testkey": "testvalue" + }, + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "errors": [ + { + "code": "0000", + "message": "Error message", + "target": "", + "details": "Error details", + "innerError": "Error stack trace" + } + ], + "appLocation": "eastus", + "routingPreference": "RouteAll", + "managedResourceGroupConfiguration": { + "name": "myManagedRg" + }, + "logAnalyticsWorkspaceArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace", + "monitorSubnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet", + "msiArmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/readme.az.md b/specification/workloads/resource-manager/readme.az.md new file mode 100644 index 000000000000..fc0df08f2e7c --- /dev/null +++ b/specification/workloads/resource-manager/readme.az.md @@ -0,0 +1,16 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: workloads + namespace: azure.mgmt.workloads + package-name: azure-mgmt-workloads +az-output-folder: $(azure-cli-extension-folder)/src/workloads +python-sdk-output-folder: "$(az-output-folder)/azext_workloads/vendored_sdks/workloads" +# add additional configuration here specific for Azure CLI +# refer to the faq.md for more details +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/readme.cli.md b/specification/workloads/resource-manager/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/workloads/resource-manager/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file diff --git a/specification/workloads/resource-manager/readme.csharp.md b/specification/workloads/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..5f80a9585901 --- /dev/null +++ b/specification/workloads/resource-manager/readme.csharp.md @@ -0,0 +1,14 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Workloads + payload-flattening-threshold: 1 + output-folder: $(csharp-sdks-folder)/workloads/Microsoft.Workloads/src/Generated + clear-output-folder: true +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/readme.go.md b/specification/workloads/resource-manager/readme.go.md new file mode 100644 index 000000000000..fc2f85552c7c --- /dev/null +++ b/specification/workloads/resource-manager/readme.go.md @@ -0,0 +1,11 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/workloads/armworkloads +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/readme.md b/specification/workloads/resource-manager/readme.md new file mode 100644 index 000000000000..92837063abbc --- /dev/null +++ b/specification/workloads/resource-manager/readme.md @@ -0,0 +1,81 @@ +# workloads + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for workloads. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the workloads. + +```yaml +openapi-type: arm +openapi-subtype: rpaas +tag: package-2021-12-01-preview +``` + +### Tag: package-2021-12-01-preview + +These settings apply only when `--tag=package-2021-12-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-12-01-preview' +input-file: + - Microsoft.Workloads/preview/2021-12-01-preview/operations.json + - Microsoft.Workloads/preview/2021-12-01-preview/monitors.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go-track2 + - repo: azure-sdk-for-js + - repo: azure-sdk-for-net + - repo: azure-resource-manager-schemas + - repo: azure-cli-extensions +``` + +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) diff --git a/specification/workloads/resource-manager/readme.python.md b/specification/workloads/resource-manager/readme.python.md new file mode 100644 index 000000000000..1ea1d5cfe8a4 --- /dev/null +++ b/specification/workloads/resource-manager/readme.python.md @@ -0,0 +1,18 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-workloads +namespace: azure.mgmt.workloads +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/workloads/azure-mgmt-workloads/azure/mgmt/workloads +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/readme.typescript.md b/specification/workloads/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..1894b3465d6b --- /dev/null +++ b/specification/workloads/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-workloads" + output-folder: "$(typescript-sdks-folder)/sdk/workloads/arm-workloads" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +``` From 4837ab981a7620aab865b695ed49e5ba11fa0641 Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Tue, 26 Apr 2022 14:13:23 +0530 Subject: [PATCH 3/7] Delete commonTypes.json --- .../2021-12-01-preview/commonTypes.json | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json deleted file mode 100644 index 48d9bb62e095..000000000000 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/commonTypes.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-12-01-preview", - "title": "Workloads Client", - "description": "Workloads client provides access to various workload operations" - }, - "paths": {}, - "definitions": { - "ManagedServiceIdentityType": { - "description": "Type of managed service identity (only None, UserAssigned types are allowed).", - "enum": [ - "None", - "UserAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "ManagedServiceIdentityType", - "modelAsString": true - } - }, - "UserAssignedServiceIdentity": { - "description": "Managed service identity (user assigned identities)", - "type": "object", - "properties": { - "type": { - "description": "Type of manage identity", - "$ref": "#/definitions/ManagedServiceIdentityType" - }, - "userAssignedIdentities": { - "description": "User assigned identities dictionary", - "$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/UserAssignedIdentities" - } - }, - "required": [ - "type" - ] - } - }, - "parameters": {} -} From 61aff7c0725188a093e1c3fc0b274284e4b21a53 Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Tue, 26 Apr 2022 17:15:01 +0530 Subject: [PATCH 4/7] Added new providers Added new providers --- .../Db2ProviderInstances_Create.json | 7 +- .../Db2ProviderInstances_Get.json | 3 +- .../MsSqlServerProviderInstance_Create.json | 66 ++++++++++ .../MsSqlServerProviderInstance_Get.json | 37 ++++++ .../NetWeaverProviderInstances_Create.json | 22 +++- .../NetWeaverProviderInstances_Get.json | 7 +- ...heusHaClusterProviderInstances_Create.json | 64 +++++++++ ...metheusHaClusterProviderInstances_Get.json | 36 ++++++ .../ProviderInstances_Create.json | 18 ++- .../ProviderInstances_Get.json | 6 +- .../ProviderInstances_List.json | 43 +++++- .../preview/2021-12-01-preview/monitors.json | 122 ++++++++++++++++++ 12 files changed, 418 insertions(+), 13 deletions(-) create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json index 335d5aa9c6dc..7c7f99489111 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json @@ -14,6 +14,7 @@ "dbUsername": "username", "dbName": "dbName", "dbPassword": "password", + "dbPasswordUri": "", "dbPort": "dbPort" } } @@ -41,7 +42,8 @@ "hostname": "vmname.azure.com", "dbUsername": "Db2OPA", "dbName": "OPA", - "dbPort": "5912" + "dbPort": "5912", + "dbPasswordUri": "" } } } @@ -59,7 +61,8 @@ "hostname": "vmname.azure.com", "dbUsername": "Db2OPA", "dbName": "OPA", - "dbPort": "5912" + "dbPort": "5912", + "dbPasswordUri": "" } } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json index 514e49506881..e811df3e4fcc 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json @@ -28,7 +28,8 @@ "hostname": "vmname.azure.com", "dbUsername": "Db2OPA", "dbName": "OPA", - "dbPort": "5912" + "dbPort": "5912", + "dbPasswordUri": "" } } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json new file mode 100644 index 000000000000..7cb800ee0981 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance", + "providerInstanceParameter": { + "properties": { + "providerSettings": { + "providerType": "MsSqlServer", + "dbUsername": "user", + "dbPassword": "****", + "dbPasswordKeyVaultUri": "", + "dbPort": "5912", + "hostname": "hostname", + "sapSid": "sid" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "MsSqlServer", + "dbUsername": "user", + "dbPort": "5912", + "hostname": "hostname", + "sapSid": "sid" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "MsSqlServer", + "dbUsername": "user", + "dbPort": "5912", + "hostname": "hostname", + "sapSid": "sid" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json new file mode 100644 index 000000000000..486f8b914ba8 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "MsSqlServer", + "dbUsername": "user", + "dbPort": "5912", + "hostname": "hostname", + "dbPasswordKeyVaultUri": "", + "sapSid": "sid" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json index 5faf6c0f74bf..85dcc57bc99d 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json @@ -14,7 +14,13 @@ "sapInstanceNr": "00", "sapHostFileEntries": [ "127.0.0.1 name fqdn" - ] + ], + "sapUsername": "username", + "sapPassword": "****", + "sapPasswordUri": "", + "sapPortNumber": "1234", + "sapClientId": "111", + "sapSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } @@ -42,7 +48,12 @@ "sapInstanceNr": "00", "sapHostFileEntries": [ "127.0.0.1 name fqdn" - ] + ], + "sapUsername": "username", + "sapPasswordUri": "", + "sapPortNumber": "1234", + "sapClientId": "111", + "sapSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } @@ -61,7 +72,12 @@ "sapInstanceNr": "00", "sapHostFileEntries": [ "127.0.0.1 name fqdn" - ] + ], + "sapUsername": "username", + "sapPasswordUri": "", + "sapPortNumber": "1234", + "sapClientId": "111", + "sapSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json index 997e3a8b3552..d8e3c1e9522e 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json @@ -29,7 +29,12 @@ "sapInstanceNr": "00", "sapHostFileEntries": [ "127.0.0.1 name fqdn" - ] + ], + "sapUsername": "username", + "sapPasswordUri": "", + "sapPortNumber": "1234", + "sapClientId": "111", + "sapSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json new file mode 100644 index 000000000000..3d85ad16eb02 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance", + "providerInstanceParameter": { + "properties": { + "providerSettings": { + "providerType": "PrometheusHaCluster", + "prometheusUrl": "http://192.168.0.0:9090/metrics", + "hostname": "hostname", + "sid": "sid", + "clusterName": "clusterName" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusHaCluster", + "prometheusUrl": "http://192.168.0.0:9090/metrics", + "hostname": "hostname", + "sid": "sid", + "clusterName": "clusterName" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusHaCluster", + "prometheusUrl": "http://192.168.0.0:9090/metrics", + "hostname": "hostname", + "sid": "sid", + "clusterName": "clusterName" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json new file mode 100644 index 000000000000..c5b76011e480 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "mySapMonitor", + "providerInstanceName": "myProviderInstance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance", + "name": "myProviderInstance", + "type": "Microsoft.Workloads/workloads/providerInstances", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusHaCluster", + "prometheusUrl": "http://192.168.0.0:9090/metrics", + "hostname": "hostname", + "sid": "sid", + "clusterName": "clusterName" + } + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json index 96361dcc7c47..6ef86dc9b00f 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json @@ -12,8 +12,12 @@ "hostname": "name", "dbName": "db", "sqlPort": "0000", + "instanceNumber": "00", "dbUsername": "user", - "dbPassword": "****" + "dbPassword": "****", + "dbPasswordUri": "", + "dbSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename", + "sslHostNameInCertificate": "xyz.domain.com" } } } @@ -39,7 +43,11 @@ "hostname": "name", "dbName": "db", "sqlPort": "0000", - "dbUsername": "user" + "instanceNumber": "00", + "dbUsername": "user", + "dbPasswordUri": "", + "sslHostNameInCertificate": "xyz.domain.com", + "dbSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } @@ -56,7 +64,11 @@ "hostname": "name", "dbName": "db", "sqlPort": "0000", - "dbUsername": "user" + "instanceNumber": "00", + "dbUsername": "user", + "dbPasswordUri": "", + "sslHostNameInCertificate": "xyz.domain.com", + "dbSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json index 415201c64539..848f7c453f0d 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json @@ -27,7 +27,11 @@ "hostname": "name", "dbName": "db", "sqlPort": "0000", - "dbUsername": "user" + "instanceNumber": "00", + "dbUsername": "user", + "dbPasswordUri": "", + "sslHostNameInCertificate": "xyz.domain.com", + "dbSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json index 623845fb9405..59cea1143fcf 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json @@ -20,7 +20,11 @@ "hostname": "name", "dbName": "db", "sqlPort": "0000", - "dbUsername": "user" + "instanceNumber": "00", + "dbUsername": "user", + "dbPasswordUri": "", + "sslHostNameInCertificate": "xyz.domain.com", + "dbSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" } } }, @@ -37,7 +41,27 @@ "sapInstanceNr": "00", "sapHostFileEntries": [ "127.0.0.1 name fqdn" - ] + ], + "sapUsername": "username", + "sapPasswordUri": "", + "sapPortNumber": "1234", + "sapClientId": "111", + "sapSslCertificateUri": "https://storageaccount.blob.core.windows.net/containername/filename" + } + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance1", + "name": "myProviderInstance4", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "MsSqlServer", + "dbUsername": "user", + "dbPort": "5912", + "hostname": "hostname", + "sapSid": "sid" } } }, @@ -52,6 +76,21 @@ "prometheusUrl": "http://192.168.0.0:9090/metrics" } } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/workloads/mySapMonitor/providerInstances/myProviderInstance1", + "name": "myProviderInstance3", + "type": "Microsoft.Workloads/workloads/providerInstances", + "properties": { + "provisioningState": "Succeeded", + "providerSettings": { + "providerType": "PrometheusHaCluster", + "prometheusUrl": "http://192.168.0.0:9090/metrics", + "hostname": "hostname", + "sid": "sid", + "clusterName": "clusterName" + } + } } ] } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json index a7039af85ae6..f85111f993dc 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json @@ -374,6 +374,12 @@ }, "Get properties of a Db2 provider": { "$ref": "./examples/workloadmonitor/Db2ProviderInstances_Get.json" + }, + "Get properties of a MsSqlServer provider": { + "$ref": "./examples/workloadmonitor/MsSqlServerProviderInstance_Get.json" + }, + "Get properties of a PrometheusHaCluster provider": { + "$ref": "./examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json" } }, "produces": [ @@ -434,6 +440,12 @@ }, "Create a Db2 provider": { "$ref": "./examples/workloadmonitor/Db2ProviderInstances_Create.json" + }, + "Create a MsSqlServer provider": { + "$ref": "./examples/workloadmonitor/MsSqlServerProviderInstance_Create.json" + }, + "Create a PrometheusHaCluster provider": { + "$ref": "./examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json" } }, "parameters": [ @@ -865,6 +877,10 @@ "description": "Gets or sets the database sql port.", "type": "string" }, + "instanceNumber": { + "description": "Gets or sets the database instance number.", + "type": "string" + }, "dbUsername": { "description": "Gets or sets the database user name.", "type": "string" @@ -873,6 +889,18 @@ "description": "Gets or sets the database password.", "type": "string", "x-ms-secret": true + }, + "dbPasswordUri": { + "description": "Gets or sets the key vault URI to secret with the database password.", + "type": "string" + }, + "dbSslCertificateUri": { + "description": "Gets or sets the blob URI to SSL certificate for the DB.", + "type": "string" + }, + "sslHostNameInCertificate": { + "description": "Gets or sets the hostname(s) in the SSL certificate.", + "type": "string" } }, "x-ms-discriminator-value": "SapHana" @@ -904,6 +932,31 @@ "items": { "type": "string" } + }, + "sapUsername": { + "description": "Gets or sets the SAP user name.", + "type": "string" + }, + "sapPassword": { + "description": "Sets the SAP password.", + "type": "string", + "x-ms-secret": true + }, + "sapPasswordUri": { + "description": "Gets or sets the key vault URI to secret with the SAP password.", + "type": "string" + }, + "sapClientId": { + "description": "Gets or sets the SAP Client ID.", + "type": "string" + }, + "sapPortNumber": { + "description": "Gets or sets the SAP HTTP port number.", + "type": "string" + }, + "sapSslCertificateUri": { + "description": "Gets or sets the blob URI to SSL certificate for the SAP system.", + "type": "string" } }, "x-ms-discriminator-value": "SapNetWeaver" @@ -954,6 +1007,10 @@ "type": "string", "x-ms-secret": true }, + "dbPasswordUri": { + "description": "Gets or sets the key vault URI to secret with the database password.", + "type": "string" + }, "sapSid": { "description": "Gets or sets the SAP System Identifier", "type": "string" @@ -961,6 +1018,71 @@ }, "x-ms-discriminator-value": "Db2" }, + "PrometheusHaClusterProviderInstanceProperties": { + "description": "Gets or sets the PrometheusHaCluster provider properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProviderSpecificProperties" + } + ], + "properties": { + "prometheusUrl": { + "description": "URL of the Node Exporter endpoint.", + "type": "string" + }, + "hostname": { + "description": "Gets or sets the target machine name.", + "type": "string" + }, + "sid": { + "description": "Gets or sets the cluster sid.", + "type": "string" + }, + "clusterName": { + "description": "Gets or sets the clusterName.", + "type": "string" + } + }, + "x-ms-discriminator-value": "PrometheusHaCluster" + }, + "MsSqlServerProviderInstanceProperties": { + "description": "Gets or sets the SQL server provider properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProviderSpecificProperties" + } + ], + "properties": { + "hostname": { + "description": "Gets or sets the SQL server host name.", + "type": "string" + }, + "dbPort": { + "description": "Gets or sets the database sql port.", + "type": "string" + }, + "dbUsername": { + "description": "Gets or sets the database user name.", + "type": "string" + }, + "dbPassword": { + "description": "Gets or sets the database password.", + "type": "string", + "x-ms-secret": true + }, + "dbPasswordKeyVaultUri": { + "description": "Gets or sets the key vault URI to secret with the database password.", + "type": "string" + }, + "sapSid": { + "description": "Gets or sets the SAP System Identifier", + "type": "string" + } + }, + "x-ms-discriminator-value": "MsSqlServer" + }, "ProviderSpecificProperties": { "description": "Gets or sets the provider specific properties.", "type": "object", From c781ca4758baa0f7db850b235866f5152721924a Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Wed, 27 Apr 2022 12:54:52 +0530 Subject: [PATCH 5/7] Updating with recent monitors spec changes in private repo Updating with recent monitors spec changes in private repo --- .../workloadmonitor/MsSqlServerProviderInstance_Create.json | 2 +- .../workloadmonitor/MsSqlServerProviderInstance_Get.json | 2 +- .../preview/2021-12-01-preview/monitors.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json index 7cb800ee0981..897fb68efa44 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json @@ -11,7 +11,7 @@ "providerType": "MsSqlServer", "dbUsername": "user", "dbPassword": "****", - "dbPasswordKeyVaultUri": "", + "dbPasswordUri": "", "dbPort": "5912", "hostname": "hostname", "sapSid": "sid" diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json index 486f8b914ba8..5024f56af088 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json @@ -27,7 +27,7 @@ "dbUsername": "user", "dbPort": "5912", "hostname": "hostname", - "dbPasswordKeyVaultUri": "", + "dbPasswordUri": "", "sapSid": "sid" } } diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json index f85111f993dc..3b0d64f93dd9 100644 --- a/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json +++ b/specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/monitors.json @@ -1072,7 +1072,7 @@ "type": "string", "x-ms-secret": true }, - "dbPasswordKeyVaultUri": { + "dbPasswordUri": { "description": "Gets or sets the key vault URI to secret with the database password.", "type": "string" }, From c35c2dfd0c20a0bf91afca0de3e4ddaf27049ad8 Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Wed, 4 May 2022 12:35:40 +0530 Subject: [PATCH 6/7] Changes for Go sdk Changes for Go sdk --- .../workloads/resource-manager/readme.go.md | 23 +++++++++++++++++++ .../workloads/resource-manager/readme.md | 3 +++ 2 files changed, 26 insertions(+) diff --git a/specification/workloads/resource-manager/readme.go.md b/specification/workloads/resource-manager/readme.go.md index fc2f85552c7c..be4f3b677b66 100644 --- a/specification/workloads/resource-manager/readme.go.md +++ b/specification/workloads/resource-manager/readme.go.md @@ -2,10 +2,33 @@ These settings apply only when `--go` is specified on the command line. +``` yaml $(go) && !$(track2) +go: + license-header: MICROSOFT_MIT_NO_VERSION + namespace: workloads + clear-output-folder: true +``` + ```yaml $(go) && $(track2) azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION module-name: sdk/resourcemanager/workloads/armworkloads module: github.com/Azure/azure-sdk-for-go/$(module-name) output-folder: $(go-sdk-folder)/$(module-name) +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2021-12-01-preview +``` + +### Tag: package-2021-12-01-preview and go + +These settings apply only when `--tag=package-2021-12-01-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2021-12-01-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2021-12-01-preview/$(namespace) ``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/readme.md b/specification/workloads/resource-manager/readme.md index 92837063abbc..f690e06824fc 100644 --- a/specification/workloads/resource-manager/readme.md +++ b/specification/workloads/resource-manager/readme.md @@ -36,6 +36,8 @@ These settings apply only when `--tag=package-2021-12-01-preview` is specified o ```yaml $(tag) == 'package-2021-12-01-preview' input-file: + - Microsoft.Workloads/preview/2021-12-01-preview/phpWorkloads.json + - Microsoft.Workloads/preview/2021-12-01-preview/SAPVirtualInstance.json - Microsoft.Workloads/preview/2021-12-01-preview/operations.json - Microsoft.Workloads/preview/2021-12-01-preview/monitors.json ``` @@ -53,6 +55,7 @@ This is not used by Autorest itself. swagger-to-sdk: - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-java + - repo: azure-sdk-for-go - repo: azure-sdk-for-go-track2 - repo: azure-sdk-for-js - repo: azure-sdk-for-net From 9f95dad3e6f541b7adff3f28441e193e027b6169 Mon Sep 17 00:00:00 2001 From: Suhani Shrivastava Date: Wed, 4 May 2022 12:49:20 +0530 Subject: [PATCH 7/7] Update readme.md --- specification/workloads/resource-manager/readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/workloads/resource-manager/readme.md b/specification/workloads/resource-manager/readme.md index f690e06824fc..3ab2a63d9592 100644 --- a/specification/workloads/resource-manager/readme.md +++ b/specification/workloads/resource-manager/readme.md @@ -36,8 +36,6 @@ These settings apply only when `--tag=package-2021-12-01-preview` is specified o ```yaml $(tag) == 'package-2021-12-01-preview' input-file: - - Microsoft.Workloads/preview/2021-12-01-preview/phpWorkloads.json - - Microsoft.Workloads/preview/2021-12-01-preview/SAPVirtualInstance.json - Microsoft.Workloads/preview/2021-12-01-preview/operations.json - Microsoft.Workloads/preview/2021-12-01-preview/monitors.json ```