A bővítmény lekérésének művelete.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}?api-version=2024-03-01
With optional parameters:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}?$expand={$expand}&api-version=2024-03-01
URI-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
resourceGroupName
|
path |
True
|
string
|
Az erőforráscsoport neve.
|
subscriptionId
|
path |
True
|
string
|
Az előfizetés hitelesítő adatai, amelyek egyedileg azonosítják a Microsoft Azure-előfizetést. Az előfizetés-azonosító az URI részét képezi minden szolgáltatáshíváshoz.
|
vmScaleSetName
|
path |
True
|
string
|
A bővítményt tartalmazó virtuálisgép-méretezési csoport neve.
|
vmssExtensionName
|
path |
True
|
string
|
A virtuálisgép-méretezési csoport bővítményének neve.
|
api-version
|
query |
True
|
string
|
Ügyfél API-verziója.
|
$expand
|
query |
|
string
|
A műveletre alkalmazandó kibontási kifejezés.
|
Válaszok
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
felhasználói fiók megszemélyesítése
|
Példák
VirtualMachineScaleSetExtension_Get_MaximumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/aaaaaaaaaaaaaaaaaaaaaaaa/extensions/aaaaaaaaaaaaaaaaaaaa?$expand=aaaaaaa&api-version=2024-03-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python virtual_machine_scale_set_extension_get_maximum_set_gen.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.virtual_machine_scale_set_extensions.get(
resource_group_name="rgcompute",
vm_scale_set_name="aaaaaaaaaaaaaaaaaaaaaaaa",
vmss_extension_name="aaaaaaaaaaaaaaaaaaaa",
)
print(response)
# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json
func ExampleVirtualMachineScaleSetExtensionsClient_Get_virtualMachineScaleSetExtensionGetMaximumSetGen() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewVirtualMachineScaleSetExtensionsClient().Get(ctx, "rgcompute", "aaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaa", &armcompute.VirtualMachineScaleSetExtensionsClientGetOptions{Expand: to.Ptr("aaaaaaa")})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualMachineScaleSetExtension = armcompute.VirtualMachineScaleSetExtension{
// ID: to.Ptr("aaaaaaaa"),
// Name: to.Ptr("{extension-name}"),
// Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"),
// Properties: &armcompute.VirtualMachineScaleSetExtensionProperties{
// Type: to.Ptr("{extension-Type}"),
// AutoUpgradeMinorVersion: to.Ptr(true),
// EnableAutomaticUpgrade: to.Ptr(true),
// ForceUpdateTag: to.Ptr("aaaaaaaaa"),
// ProtectedSettings: map[string]any{
// },
// ProvisionAfterExtensions: []*string{
// to.Ptr("aa")},
// ProvisioningState: to.Ptr("Succeeded"),
// Publisher: to.Ptr("{extension-Publisher}"),
// Settings: map[string]any{
// },
// SuppressFailures: to.Ptr(true),
// TypeHandlerVersion: to.Ptr("{handler-version}"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to The operation to get the extension.
*
* @summary The operation to get the extension.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MaximumSet_Gen.json
*/
async function virtualMachineScaleSetExtensionGetMaximumSetGen() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "rgcompute";
const vmScaleSetName = "aaaaaaaaaaaaaaaaaaaaaaaa";
const vmssExtensionName = "aaaaaaaaaaaaaaaaaaaa";
const expand = "aaaaaaa";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.virtualMachineScaleSetExtensions.get(
resourceGroupName,
vmScaleSetName,
vmssExtensionName,
options,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"name": "{extension-name}",
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "{extension-Publisher}",
"type": "{extension-Type}",
"typeHandlerVersion": "{handler-version}",
"settings": {},
"forceUpdateTag": "aaaaaaaaa",
"enableAutomaticUpgrade": true,
"protectedSettings": {},
"provisioningState": "aaa",
"provisionAfterExtensions": [
"aa"
],
"suppressFailures": true
},
"type": "aaaaaaaaaaaaaaaaaaaaaaaa",
"id": "aaaaaaaa"
}
VirtualMachineScaleSetExtension_Get_MinimumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/a/extensions/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?$expand={$expand}&api-version=2024-03-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python virtual_machine_scale_set_extension_get_minimum_set_gen.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.virtual_machine_scale_set_extensions.get(
resource_group_name="rgcompute",
vm_scale_set_name="a",
vmss_extension_name="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
)
print(response)
# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MinimumSet_Gen.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MinimumSet_Gen.json
func ExampleVirtualMachineScaleSetExtensionsClient_Get_virtualMachineScaleSetExtensionGetMinimumSetGen() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewVirtualMachineScaleSetExtensionsClient().Get(ctx, "rgcompute", "a", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", &armcompute.VirtualMachineScaleSetExtensionsClientGetOptions{Expand: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualMachineScaleSetExtension = armcompute.VirtualMachineScaleSetExtension{
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to The operation to get the extension.
*
* @summary The operation to get the extension.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSetExtension_Get_MinimumSet_Gen.json
*/
async function virtualMachineScaleSetExtensionGetMinimumSetGen() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["COMPUTE_RESOURCE_GROUP"] || "rgcompute";
const vmScaleSetName = "a";
const vmssExtensionName = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.virtualMachineScaleSetExtensions.get(
resourceGroupName,
vmScaleSetName,
vmssExtensionName,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Definíciók
ApiError
Api-hiba.
Name |
Típus |
Description |
code
|
string
|
A hibakód.
|
details
|
ApiErrorBase[]
|
Az API-hiba részletei
|
innererror
|
InnerError
|
Az API belső hibája
|
message
|
string
|
A hibaüzenet.
|
target
|
string
|
Az adott hiba célja.
|
ApiErrorBase
Api-hibabázis.
Name |
Típus |
Description |
code
|
string
|
A hibakód.
|
message
|
string
|
A hibaüzenet.
|
target
|
string
|
Az adott hiba célja.
|
CloudError
Hibaválasz a Számítási szolgáltatástól.
Name |
Típus |
Description |
error
|
ApiError
|
Api-hiba.
|
InnerError
Belső hiba részletei.
Name |
Típus |
Description |
errordetail
|
string
|
A belső hibaüzenet vagy kivételkép.
|
exceptiontype
|
string
|
A kivétel típusa.
|
KeyVaultSecretReference
A Key Vault titkos kódra mutató hivatkozást ismerteti
Name |
Típus |
Description |
secretUrl
|
string
|
Az URL-cím egy titkos kódra hivatkozik egy Key Vault.
|
sourceVault
|
SubResource
|
A titkos kulcsot tartalmazó Key Vault relatív URL-címe.
|
SubResource
Name |
Típus |
Description |
id
|
string
|
Erőforrás-azonosító
|
VirtualMachineScaleSetExtension
A virtuálisgép-méretezési csoport bővítményét ismerteti.
Name |
Típus |
Description |
id
|
string
|
Erőforrás-azonosító
|
name
|
string
|
A bővítmény neve.
|
properties.autoUpgradeMinorVersion
|
boolean
|
Azt jelzi, hogy a bővítménynek egy újabb alverziót kell-e használnia, ha az üzembe helyezéskor elérhető. Az üzembe helyezés után azonban a bővítmény csak akkor frissíti az alverziókat, ha újra üzembe helyezi, még akkor sem, ha ez a tulajdonság igaz értékre van állítva.
|
properties.enableAutomaticUpgrade
|
boolean
|
Azt jelzi, hogy a bővítményt a platformnak automatikusan frissítenie kell-e, ha elérhető a bővítmény újabb verziója.
|
properties.forceUpdateTag
|
string
|
Ha egy érték meg van adva, és eltér az előző értéktől, a bővítménykezelőt akkor is frissítenie kell, ha a bővítmény konfigurációja nem változott.
|
properties.protectedSettings
|
object
|
A bővítmény tartalmazhat védettSettings vagy protectedSettingsFromKeyVault értékeket, vagy egyáltalán nem tartalmaz védett beállításokat.
|
properties.protectedSettingsFromKeyVault
|
KeyVaultSecretReference
|
A hivatkozással átadott és a Key Vaultból felhasznált bővítmények által védett beállítások
|
properties.provisionAfterExtensions
|
string[]
|
Bővítménynevek gyűjteménye, amely után ki kell építeni ezt a bővítményt.
|
properties.provisioningState
|
string
|
A kiépítési állapot, amely csak a válaszban jelenik meg.
|
properties.publisher
|
string
|
A bővítménykezelő közzétevőjének neve.
|
properties.settings
|
object
|
A Json formázta a bővítmény nyilvános beállításait.
|
properties.suppressFailures
|
boolean
|
Azt jelzi, hogy a bővítményből eredő hibák el lesznek-e tiltva (az olyan működési hibák, mint például a virtuális géphez való csatlakozás hiánya, nem lesznek letiltva, függetlenül attól, hogy milyen értékről van szó). Az alapértelmezett érték hamis.
|
properties.type
|
string
|
Megadja a bővítmény típusát; Ilyen például a "CustomScriptExtension".
|
properties.typeHandlerVersion
|
string
|
A szkriptkezelő verzióját adja meg.
|
type
|
string
|
Erőforrás típusa
|