Pobiera listę wszystkich wersji obrazów maszyny wirtualnej dla określonej strefy krawędzi
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages?api-version=2024-03-01
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
edgeZone
|
path |
True
|
string
|
Nazwa strefy krawędzi.
|
location
|
path |
True
|
string
|
Nazwa obsługiwanego regionu świadczenia usługi Azure.
|
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.
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API klienta.
|
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
VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/5ece5940-d962-4dad-a98f-ca9ac0f021a5/providers/Microsoft.Compute/locations/WestUS/edgeZones/microsoftlosangeles1/vmimages?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_images_edge_zone_list_by_edge_zone_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="5ece5940-d962-4dad-a98f-ca9ac0f021a5",
)
response = client.virtual_machine_images.list_by_edge_zone(
location="WestUS",
edge_zone="microsoftlosangeles1",
)
print(response)
# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_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/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/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json
func ExampleVirtualMachineImagesClient_ListByEdgeZone_virtualMachineImagesEdgeZoneListByEdgeZoneMaximumSetGen() {
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.NewVirtualMachineImagesClient().ListByEdgeZone(ctx, "WestUS", "microsoftlosangeles1", 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.VMImagesInEdgeZoneListResult = armcompute.VMImagesInEdgeZoneListResult{
// Value: []*armcompute.VirtualMachineImageResource{
// {
// ID: to.Ptr("/Subscriptions/5ece5940-d962-4dad-a98f-ca9ac0f021a5/Providers/Microsoft.Compute/Locations/westus/Publishers/CANONICAL/ArtifactTypes/VMImage/Offers/UBUNTUSERVER/Skus/18_04-LTS-GEN2/Versions/18.04.202107200"),
// Name: to.Ptr("18.04.202107200"),
// ExtendedLocation: &armcompute.ExtendedLocation{
// Name: to.Ptr("microsoftlosangeles1"),
// Type: to.Ptr(armcompute.ExtendedLocationTypesEdgeZone),
// },
// Location: to.Ptr("WestUS"),
// }},
// }
}
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 Gets a list of all virtual machine image versions for the specified edge zone
*
* @summary Gets a list of all virtual machine image versions for the specified edge zone
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json
*/
async function virtualMachineImagesEdgeZoneListByEdgeZoneMaximumSetGen() {
const subscriptionId =
process.env["COMPUTE_SUBSCRIPTION_ID"] || "5ece5940-d962-4dad-a98f-ca9ac0f021a5";
const location = "WestUS";
const edgeZone = "microsoftlosangeles1";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.virtualMachineImages.listByEdgeZone(location, edgeZone);
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
{
"value": [
{
"name": "18.04.202107200",
"location": "WestUS",
"extendedLocation": {
"name": "microsoftlosangeles1",
"type": "EdgeZone"
},
"id": "/Subscriptions/5ece5940-d962-4dad-a98f-ca9ac0f021a5/Providers/Microsoft.Compute/Locations/westus/Publishers/CANONICAL/ArtifactTypes/VMImage/Offers/UBUNTUSERVER/Skus/18_04-LTS-GEN2/Versions/18.04.202107200"
}
]
}
VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/5ece5940-d962-4dad-a98f-ca9ac0f021a5/providers/Microsoft.Compute/locations/WestUS/edgeZones/microsoftlosangeles1/vmimages?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_images_edge_zone_list_by_edge_zone_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="5ece5940-d962-4dad-a98f-ca9ac0f021a5",
)
response = client.virtual_machine_images.list_by_edge_zone(
location="WestUS",
edge_zone="microsoftlosangeles1",
)
print(response)
# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_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/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json
func ExampleVirtualMachineImagesClient_ListByEdgeZone_virtualMachineImagesEdgeZoneListByEdgeZoneMinimumSetGen() {
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.NewVirtualMachineImagesClient().ListByEdgeZone(ctx, "WestUS", "microsoftlosangeles1", 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.VMImagesInEdgeZoneListResult = armcompute.VMImagesInEdgeZoneListResult{
// Value: []*armcompute.VirtualMachineImageResource{
// },
// }
}
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 Gets a list of all virtual machine image versions for the specified edge zone
*
* @summary Gets a list of all virtual machine image versions for the specified edge zone
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json
*/
async function virtualMachineImagesEdgeZoneListByEdgeZoneMinimumSetGen() {
const subscriptionId =
process.env["COMPUTE_SUBSCRIPTION_ID"] || "5ece5940-d962-4dad-a98f-ca9ac0f021a5";
const location = "WestUS";
const edgeZone = "microsoftlosangeles1";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.virtualMachineImages.listByEdgeZone(location, edgeZone);
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
{
"value": []
}
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ź o błędzie z usługi Compute.
Nazwa |
Typ |
Opis |
error
|
ApiError
|
Błąd interfejsu API.
|
ExtendedLocation
Typ złożony lokalizacji rozszerzonej.
Nazwa |
Typ |
Opis |
name
|
string
|
Nazwa lokalizacji rozszerzonej.
|
type
|
ExtendedLocationTypes
|
Typ lokalizacji rozszerzonej.
|
ExtendedLocationTypes
Typ lokalizacji rozszerzonej.
Nazwa |
Typ |
Opis |
EdgeZone
|
string
|
|
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.
|
VirtualMachineImageResource
Informacje o zasobie obrazu maszyny wirtualnej.
VmImagesInEdgeZoneListResult
Odpowiedź operacji List VmImages w przeglądarce EdgeZone.
Nazwa |
Typ |
Opis |
nextLink
|
string
|
Identyfikator URI do pobrania następnej strony vmImages w strefie EdgeZone. Wywołaj metodę ListNext() za pomocą tego identyfikatora URI, aby pobrać następną stronę vmImages.
|
value
|
VirtualMachineImageResource[]
|
Lista obrazów vmImages w strefie EdgeZone
|