Operacja pobierania rozszerzenia.
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
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
resourceGroupName
|
path |
True
|
string
|
Nazwa grupy zasobów.
|
subscriptionId
|
path |
True
|
string
|
Poświadczenia subskrypcji, które jednoznacznie identyfikują subskrypcję platformy Microsoft Azure. Identyfikator subskrypcji stanowi część identyfikatora URI dla każdego wywołania usługi.
|
vmScaleSetName
|
path |
True
|
string
|
Nazwa zestawu skalowania maszyn wirtualnych zawierająca rozszerzenie.
|
vmssExtensionName
|
path |
True
|
string
|
Nazwa rozszerzenia zestawu skalowania maszyn wirtualnych.
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API klienta.
|
$expand
|
query |
|
string
|
Wyrażenie expand, które ma być stosowane do operacji.
|
Odpowiedzi
Zabezpieczenia
azure_auth
Przepływ OAuth2 usługi Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nazwa |
Opis |
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
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
Definicje
ApiError
Błąd interfejsu API.
Nazwa |
Typ |
Opis |
code
|
string
|
Kod błędu.
|
details
|
ApiErrorBase[]
|
Szczegóły błędu interfejsu API
|
innererror
|
InnerError
|
Wewnętrzny błąd interfejsu API
|
message
|
string
|
Komunikat o błędzie.
|
target
|
string
|
Element docelowy określonego błędu.
|
ApiErrorBase
Baza błędów interfejsu API.
Nazwa |
Typ |
Opis |
code
|
string
|
Kod błędu.
|
message
|
string
|
Komunikat o błędzie.
|
target
|
string
|
Element docelowy określonego błędu.
|
CloudError
Odpowiedź na błąd z usługi Compute.
Nazwa |
Typ |
Opis |
error
|
ApiError
|
Błąd interfejsu API.
|
InnerError
Szczegóły błędu wewnętrznego.
Nazwa |
Typ |
Opis |
errordetail
|
string
|
Wewnętrzny komunikat o błędzie lub zrzut wyjątku.
|
exceptiontype
|
string
|
Typ wyjątku.
|
KeyVaultSecretReference
Opisuje odwołanie do wpisu tajnego Key Vault
Nazwa |
Typ |
Opis |
secretUrl
|
string
|
Adres URL odwołujący się do wpisu tajnego w Key Vault.
|
sourceVault
|
SubResource
|
Względny adres URL Key Vault zawierający wpis tajny.
|
SubResource
Nazwa |
Typ |
Opis |
id
|
string
|
Identyfikator zasobu
|
VirtualMachineScaleSetExtension
Opisuje rozszerzenie zestawu skalowania maszyn wirtualnych.
Nazwa |
Typ |
Opis |
id
|
string
|
Identyfikator zasobu
|
name
|
string
|
Nazwa rozszerzenia.
|
properties.autoUpgradeMinorVersion
|
boolean
|
Wskazuje, czy rozszerzenie powinno używać nowszej wersji pomocniczej, jeśli jest ona dostępna w czasie wdrażania. Po wdrożeniu rozszerzenie nie uaktualni wersji pomocniczych, chyba że zostanie ponownie wdrożone, nawet jeśli ta właściwość ma wartość true.
|
properties.enableAutomaticUpgrade
|
boolean
|
Wskazuje, czy rozszerzenie powinno zostać automatycznie uaktualnione przez platformę, jeśli jest dostępna nowsza wersja rozszerzenia.
|
properties.forceUpdateTag
|
string
|
Jeśli podano wartość i różni się od poprzedniej wartości, program obsługi rozszerzeń zostanie zmuszony do aktualizacji, nawet jeśli konfiguracja rozszerzenia nie uległa zmianie.
|
properties.protectedSettings
|
object
|
Rozszerzenie może zawierać ustawienia protectedSettings lub protectedSettingsFromKeyVault lub w ogóle nie są chronione.
|
properties.protectedSettingsFromKeyVault
|
KeyVaultSecretReference
|
Ustawienia chronione rozszerzeń, które są przekazywane przez odwołanie i używane z magazynu kluczy
|
properties.provisionAfterExtensions
|
string[]
|
Kolekcja nazw rozszerzeń, po których należy aprowizować to rozszerzenie.
|
properties.provisioningState
|
string
|
Stan aprowizacji, który pojawia się tylko w odpowiedzi.
|
properties.publisher
|
string
|
Nazwa wydawcy programu obsługi rozszerzeń.
|
properties.settings
|
object
|
Formatowane ustawienia publiczne w formacie JSON dla rozszerzenia.
|
properties.suppressFailures
|
boolean
|
Wskazuje, czy awarie wynikające z rozszerzenia zostaną pominięte (błędy operacyjne, takie jak brak nawiązywania połączenia z maszyną wirtualną, nie zostaną pominięte niezależnie od tej wartości). Wartością domyślną jest false.
|
properties.type
|
string
|
Określa typ rozszerzenia; przykładem jest "CustomScriptExtension".
|
properties.typeHandlerVersion
|
string
|
Określa wersję programu obsługi skryptów.
|
type
|
string
|
Typ zasobu
|