Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extension API for VMScaleset VMs #7407

Merged
merged 14 commits into from
Oct 11, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -4469,6 +4469,327 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}": {
"put": {
"tags": [
"VirtualMachineScaleSetVMExtensions"
],
"operationId": "VirtualMachineScaleSetVMExtensions_CreateOrUpdate",
"description": "The operation to create or update the VMSS VM extension.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set."
},
{
"name": "instanceId",
"in": "path",
"required": true,
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "vmExtensionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine extension."
},
{
"name": "extensionParameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/VirtualMachineExtension"
},
"description": "Parameters supplied to the Create Virtual Machine Extension operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineExtension"
}
},
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/VirtualMachineExtension"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Create VirtualMachineScaleSet VM extension.": {
"$ref": "./examples/CreateOrUpdateVirtualMachineScaleSetVMExtensions.json"
}
}
},
"patch": {
"tags": [
"VirtualMachineScaleSetVMExtensions"
],
"operationId": "VirtualMachineScaleSetVMExtensions_Update",
"description": "The operation to update the VMSS VM extension.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set."
},
{
"name": "instanceId",
"in": "path",
"required": true,
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "vmExtensionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine extension."
},
{
"name": "extensionParameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/VirtualMachineExtensionUpdate"
},
"description": "Parameters supplied to the Update Virtual Machine Extension operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineExtension"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Update VirtualMachineScaleSet VM extension.": {
"$ref": "./examples/UpdateVirtualMachineScaleSetVMExtensions.json"
}
}
},
"delete": {
"tags": [
"VirtualMachineScaleSetVMExtensions"
],
"operationId": "VirtualMachineScaleSetVMExtensions_Delete",
"description": "The operation to delete the VMSS VM extension.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set."
},
{
"name": "instanceId",
"in": "path",
"required": true,
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "vmExtensionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine extension."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"202": {
"description": "Accepted"
},
"204": {
"description": "No Content"
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Delete VirtualMachineScaleSet VM extension.": {
"$ref": "./examples/DeleteVirtualMachineScaleSetVMExtensions.json"
}
}
},
"get": {
"tags": [
"VirtualMachineScaleSetVMExtensions"
],
"operationId": "VirtualMachineScaleSetVMExtensions_Get",
"description": "The operation to get the VMSS VM extension.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set."
},
{
"name": "instanceId",
"in": "path",
"required": true,
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "vmExtensionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine extension."
},
{
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineExtension"
}
sds6 marked this conversation as resolved.
Show resolved Hide resolved
}
},
"x-ms-examples": {
"Get VirtualMachineScaleSet VM extension.": {
"$ref": "./examples/GetVirtualMachineScaleSetVMExtensions.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions": {
"get": {
"tags": [
"VirtualMachineScaleSetVMExtensions"
],
"operationId": "VirtualMachineScaleSetVMExtensions_List",
"description": "The operation to get all extensions of an instance in Virtual Machine Scaleset.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set."
},
{
"name": "instanceId",
"in": "path",
"required": true,
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineExtensionsListResult"
}
}
},
"x-ms-examples": {
"List extensions in Vmss instance.": {
"$ref": "./examples/ListVirtualMachineScaleSetVMExtensions.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage": {
"post": {
"tags": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmScaleSetName": "myvmScaleSet",
"instanceId": "0",
"vmExtensionName":"myVMExtension",
"api-version": "2019-07-01",
"extensionParameters": {
"location": "westus",
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "extPublisher",
"type": "extType",
"typeHandlerVersion": "1.2",
"settings": { "UserName": "xyz@microsoft.com" }
}
}
},
"responses": {
"201": {
"body": {
"name": "myVMExtension",
"location": "westus",
"type":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions",
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Creating",
"publisher": "extPublisher",
"type": "extType",
"typeHandlerVersion": "1.2",
"settings": {"UserName":"xyz@microsoft.com"}
}
}
},
"200": {
"body": {
"name": "myVMExtension",
"location": "westus",
"type":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions",
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Creating",
"publisher": "extPublisher",
"type": "extType",
"typeHandlerVersion": "1.2",
"settings": {"UserName":"xyz@microsoft.com"}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmScaleSetName": "myvmScaleSet",
"instanceId": "0",
"vmExtensionName":"myVMExtension",
"api-version": "2019-07-01"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Loading