拡張機能を取得する操作。
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 パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
|
リソース グループの名前。
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。
|
vmScaleSetName
|
path |
True
|
string
|
拡張機能を含む VM スケール セットの名前。
|
vmssExtensionName
|
path |
True
|
string
|
VM スケール セット拡張機能の名前。
|
api-version
|
query |
True
|
string
|
クライアント API のバージョン。
|
$expand
|
query |
|
string
|
操作に適用する展開式。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
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
定義
ApiError
API エラー。
名前 |
型 |
説明 |
code
|
string
|
エラー コード。
|
details
|
ApiErrorBase[]
|
Api エラーの詳細
|
innererror
|
InnerError
|
Api の内部エラー
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
特定のエラーのターゲット。
|
ApiErrorBase
API エラーベース。
名前 |
型 |
説明 |
code
|
string
|
エラー コード。
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
特定のエラーのターゲット。
|
CloudError
コンピューティング サービスからのエラー応答。
InnerError
内部エラーの詳細。
名前 |
型 |
説明 |
errordetail
|
string
|
内部エラー メッセージまたは例外ダンプ。
|
exceptiontype
|
string
|
例外の種類。
|
KeyVaultSecretReference
Key Vault シークレットへの参照について説明します
名前 |
型 |
説明 |
secretUrl
|
string
|
Key Vault内のシークレットを参照する URL。
|
sourceVault
|
SubResource
|
シークレットを含むKey Vaultの相対 URL。
|
SubResource
名前 |
型 |
説明 |
id
|
string
|
リソース ID
|
VirtualMachineScaleSetExtension
仮想マシン スケール セット拡張機能について説明します。
名前 |
型 |
説明 |
id
|
string
|
リソース ID
|
name
|
string
|
拡張機能の名前です。
|
properties.autoUpgradeMinorVersion
|
boolean
|
展開時に使用可能な場合に、拡張機能で新しいマイナー バージョンを使用する必要があるかどうかを示します。 ただし、デプロイされると、このプロパティが true に設定されていても、再デプロイされない限り、拡張機能でマイナー バージョンのアップグレードは行われません。
|
properties.enableAutomaticUpgrade
|
boolean
|
新しいバージョンの拡張機能が使用可能な場合に、プラットフォームによって拡張機能を自動的にアップグレードするかどうかを示します。
|
properties.forceUpdateTag
|
string
|
値が指定され、前の値と異なる場合、拡張機能の構成が変更されていない場合でも、拡張機能ハンドラーは強制的に更新されます。
|
properties.protectedSettings
|
object
|
拡張機能には、protectedSettings または protectedSettingsFromKeyVault を含めることができます。または、保護された設定をまったく含めなくなります。
|
properties.protectedSettingsFromKeyVault
|
KeyVaultSecretReference
|
参照渡しで渡され、キー コンテナーから使用される拡張機能で保護された設定
|
properties.provisionAfterExtensions
|
string[]
|
この拡張機能をプロビジョニングする必要がある拡張機能名のコレクション。
|
properties.provisioningState
|
string
|
プロビジョニング状態。これは応答にのみ表示されます。
|
properties.publisher
|
string
|
拡張ハンドラーの発行元の名前。
|
properties.settings
|
object
|
拡張機能の Json 形式のパブリック設定。
|
properties.suppressFailures
|
boolean
|
拡張機能に起因するエラーが抑制されるかどうかを示します (VM に接続しないなどの操作エラーは、この値に関係なく抑制されません)。 既定値は false です。
|
properties.type
|
string
|
拡張機能の種類を指定します。たとえば、"CustomScriptExtension" です。
|
properties.typeHandlerVersion
|
string
|
スクリプト ハンドラーのバージョンを指定します。
|
type
|
string
|
リソースの種類
|