Skip to content

Commit

Permalink
Adding hybridmetadata proxy resource to expose hybrid meta data on vm…
Browse files Browse the repository at this point in the history
…s.. (#2981)

* adding hybridmetadata proxy resource

* udpates

* updates

* modeling identity same as the default

* updates

* updates
  • Loading branch information
subbartt authored Mar 3, 2021
1 parent c3a43b3 commit d905e74
Show file tree
Hide file tree
Showing 5 changed files with 402 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,237 @@
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata/{metadataName}": {
"put": {
"tags": [
"HybridIdentityMetadata"
],
"operationId": "HybridIdentityMetadata_Create",
"description": "Create Or Update HybridIdentityMetadata.",
"summary": "Implements HybridIdentityMetadata PUT method.",
"x-ms-examples": {
"CreateHybridIdentityMetadata": {
"$ref": "./examples/CreateHybridIdentityMetadata.json"
}
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/resourceGroupName"
},
{
"in": "path",
"name": "virtualMachineName",
"required": true,
"type": "string",
"description": "Name of the vm."
},
{
"in": "path",
"name": "metadataName",
"required": true,
"type": "string",
"description": "Name of the hybridIdentityMetadata."
},
{
"$ref": "#/parameters/api-version"
},
{
"in": "body",
"name": "body",
"description": "Request payload.",
"schema": {
"$ref": "#/definitions/HybridIdentityMetadata"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HybridIdentityMetadata"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"HybridIdentityMetadata"
],
"operationId": "HybridIdentityMetadata_Get",
"summary": "Gets HybridIdentityMetadata.",
"description": "Implements HybridIdentityMetadata GET method.",
"x-ms-examples": {
"GetHybridIdentityMetadata": {
"$ref": "./examples/GetHybridIdentityMetadata.json"
}
},
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/resourceGroupName"
},
{
"in": "path",
"name": "virtualMachineName",
"required": true,
"type": "string",
"description": "Name of the vm."
},
{
"in": "path",
"name": "metadataName",
"required": true,
"type": "string",
"description": "Name of the HybridIdentityMetadata."
},
{
"$ref": "#/parameters/api-version"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HybridIdentityMetadata"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"HybridIdentityMetadata"
],
"operationId": "HybridIdentityMetadata_Delete",
"summary": "Deletes an HybridIdentityMetadata.",
"description": "Implements HybridIdentityMetadata DELETE method.",
"x-ms-examples": {
"DeleteHybridIdentityMetadata": {
"$ref": "./examples/DeleteHybridIdentityMetadata.json"
}
},
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/resourceGroupName"
},
{
"in": "path",
"name": "virtualMachineName",
"required": true,
"type": "string",
"description": "Name of the vm."
},
{
"in": "path",
"name": "metadataName",
"required": true,
"type": "string",
"description": "Name of the HybridIdentityMetadata."
},
{
"$ref": "#/parameters/api-version"
}
],
"responses": {
"200": {
"description": "Success"
},
"204": {
"description": "No Content"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata": {
"get": {
"tags": [
"HybridIdentityMetadata"
],
"operationId": "HybridIdentityMetadata_ListByVm",
"summary": "Implements GET HybridIdentityMetadata in a vm.",
"description": "Returns the list of HybridIdentityMetadata of the given vm.",
"x-ms-examples": {
"HybridIdentityMetadataListByVm": {
"$ref": "./examples/HybridIdentityMetadata_ListByVm.json"
}
},
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/resourceGroupName"
},
{
"in": "path",
"name": "virtualMachineName",
"required": true,
"type": "string",
"description": "Name of the vm."
},
{
"$ref": "#/parameters/api-version"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HybridIdentityMetadataList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -3736,6 +3967,74 @@
"modelAsString": true
}
},
"HybridIdentityMetadataList": {
"description": "List of HybridIdentityMetadata.",
"properties": {
"nextLink": {
"description": "Url to follow for getting next page of HybridIdentityMetadata.",
"type": "string"
},
"value": {
"description": "Array of HybridIdentityMetadata",
"type": "array",
"items": {
"$ref": "#/definitions/HybridIdentityMetadata"
}
}
},
"required": [
"value"
]
},
"HybridIdentityMetadata": {
"description": "Defines the HybridIdentityMetadata.",
"required": [
"properties"
],
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource",
"description": "The resource model definition for an Azure Resource Manager proxy resource. It will have everything other than required location and tags."
}
],
"properties": {
"properties": {
"x-ms-client-flatten": true,
"description": "Resource properties.",
"$ref": "#/definitions/HybridIdentityMetadataProperties"
},
"systemData": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
"description": "The system data."
}
},
"x-ms-azure-resource": true
},
"HybridIdentityMetadataProperties": {
"description": "Defines the resource properties.",
"type": "object",
"properties": {
"vmId": {
"description": "Gets or sets the Vm Id.",
"type": "string"
},
"publicKey": {
"description": "Gets or sets the Public Key.",
"type": "string"
},
"identity": {
"$ref": "#/definitions/Identity",
"description": "The identity of the resource.",
"readOnly": true
},
"provisioningState": {
"description": "Gets or sets the provisioning state.",
"type": "string",
"readOnly": true
}
}
},
"Identity": {
"type": "object",
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"api-version": "2020-10-01-preview",
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "testrg",
"virtualMachineName": "ContosoVm",
"metadataName": "default",
"body": {
"properties": {
"vmId": "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c",
"publicKey": "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VitualMachines/ContosoVm/hybridIdentityMetadatas/default",
"name": "testItem",
"type": "Microsoft.ConnectedVMwarevSphere/VitualMachines/hybridIdentityMetadatas",
"properties": {
"vmId": "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c",
"publicKey": "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2",
"identity": {
"principalId": "7b5129bc-8642-4a6a-95f8-63400ca6ec4d",
"tenantId": "ec46ca82-5d4a-4e3e-b4b7-e27f9318645d",
"type": "SystemAssigned"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2020-10-01-preview",
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "testrg",
"virtualMachineName": "ContosoVm",
"metadataName": "default"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"api-version": "2020-10-01-preview",
"subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b",
"resourceGroupName": "testrg",
"virtualMachineName": "ContosoVm",
"metadataName": "default"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VitualMachines/ContosoVm/hybridIdentityMetadatas/default",
"name": "testItem",
"type": "Microsoft.ConnectedVMwarevSphere/VitualMachines/hybridIdentityMetadatas",
"properties": {
"vmId": "f8b82dff-38ef-4220-99ef-d3a3f86ddc6c",
"publicKey": "8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2",
"identity": {
"principalId": "7b5129bc-8642-4a6a-95f8-63400ca6ec4d",
"tenantId": "ec46ca82-5d4a-4e3e-b4b7-e27f9318645d",
"type": "SystemAssigned"
}
}
}
}
}
}
Loading

0 comments on commit d905e74

Please sign in to comment.