Tworzenie lub aktualizowanie galerii obrazów udostępnionych.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}?api-version=2025-12-03
Parametry identyfikatora URI
| Nazwa |
W |
Wymagane |
Typ |
Opis |
|
galleryName
|
path |
True
|
string
pattern: ^[^_\W][\w-._]{0,79}(?
|
Nazwa Shared Image Gallery.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
Identyfikator subskrypcji docelowej.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Wersja interfejsu API do użycia dla tej operacji.
|
Treść żądania
| Nazwa |
Wymagane |
Typ |
Opis |
|
location
|
True
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
identity
|
|
GalleryIdentity
|
Tożsamość galerii, jeśli została skonfigurowana.
|
|
properties.description
|
|
string
|
Opis tego zasobu galerii obrazów udostępnionych. Ta właściwość jest aktualizowalna.
|
|
properties.identifier
|
|
GalleryIdentifier
|
Opisuje unikatową nazwę galerii.
|
|
properties.sharingProfile
|
|
SharingProfile
|
Profil udostępniania galerii w subskrypcji lub dzierżawie
|
|
properties.softDeletePolicy
|
|
SoftDeletePolicy
|
Zawiera informacje o zasadach usuwania nietrwałego galerii.
|
|
tags
|
|
object
|
Tagi zasobów.
|
Odpowiedzi
| Nazwa |
Typ |
Opis |
|
200 OK
|
Gallery
|
Operacja aktualizacji zasobu "Galeria" powiodła się
|
|
201 Created
|
Gallery
|
Operacja tworzenia zasobu "Galeria" powiodła się
Nagłówki
- Location: string
- Retry-After: integer
|
|
202 Accepted
|
Gallery
|
Żądanie zostało zaakceptowane do przetwarzania, ale przetwarzanie nie zostało jeszcze ukończone.
Nagłówki
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
CloudError
|
Nieoczekiwana odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 w usłudze Azure Active Directory.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
| Nazwa |
Opis |
|
user_impersonation
|
podszywaj się pod konto użytkownika
|
Przykłady
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-12-03
{
"location": "West US",
"properties": {
"description": "This is the gallery description.",
"sharingProfile": {
"permissions": "Community",
"communityGalleryInfo": {
"publisherUri": "uri",
"publisherContact": "pir@microsoft.com",
"eula": "eula",
"publicNamePrefix": "PirPublic"
}
}
}
}
import com.azure.resourcemanager.compute.fluent.models.GalleryInner;
import com.azure.resourcemanager.compute.models.CommunityGalleryInfo;
import com.azure.resourcemanager.compute.models.GallerySharingPermissionTypes;
import com.azure.resourcemanager.compute.models.SharingProfile;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Galleries CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-12-03/galleryExamples/CommunityGallery_Create.json
*/
/**
* Sample code: Create a community gallery.
*
* @param manager Entry point to ComputeManager.
*/
public static void createACommunityGallery(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getGalleries().createOrUpdate("myResourceGroup", "myGalleryName",
new GalleryInner().withLocation("West US").withDescription("This is the gallery description.")
.withSharingProfile(new SharingProfile().withPermissions(GallerySharingPermissionTypes.COMMUNITY)
.withCommunityGalleryInfo(new CommunityGalleryInfo().withPublisherUri("uri")
.withPublisherContact("pir@microsoft.com").withEula("eula").withPublicNamePrefix("PirPublic"))),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python community_gallery_create.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.galleries.begin_create_or_update(
resource_group_name="myResourceGroup",
gallery_name="myGalleryName",
gallery={
"location": "West US",
"properties": {
"description": "This is the gallery description.",
"sharingProfile": {
"communityGalleryInfo": {
"eula": "eula",
"publicNamePrefix": "PirPublic",
"publisherContact": "pir@microsoft.com",
"publisherUri": "uri",
},
"permissions": "Community",
},
},
},
).result()
print(response)
# x-ms-original-file: 2025-12-03/galleryExamples/CommunityGallery_Create.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/v8"
)
// Generated from example definition: 2025-12-03/galleryExamples/CommunityGallery_Create.json
func ExampleGalleriesClient_BeginCreateOrUpdate_createACommunityGallery() {
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)
}
poller, err := clientFactory.NewGalleriesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myGalleryName", armcompute.Gallery{
Location: to.Ptr("West US"),
Properties: &armcompute.GalleryProperties{
Description: to.Ptr("This is the gallery description."),
SharingProfile: &armcompute.SharingProfile{
Permissions: to.Ptr(armcompute.GallerySharingPermissionTypesCommunity),
CommunityGalleryInfo: &armcompute.CommunityGalleryInfo{
PublisherURI: to.Ptr("uri"),
PublisherContact: to.Ptr("pir@microsoft.com"),
Eula: to.Ptr("eula"),
PublicNamePrefix: to.Ptr("PirPublic"),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armcompute.GalleriesClientCreateOrUpdateResponse{
// Gallery: armcompute.Gallery{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName"),
// Properties: &armcompute.GalleryProperties{
// Description: to.Ptr("This is the gallery description."),
// Identifier: &armcompute.GalleryIdentifier{
// UniqueName: to.Ptr("{subscription-id}-MYGALLERYNAME"),
// },
// ProvisioningState: to.Ptr(armcompute.GalleryProvisioningStateUpdating),
// SharingProfile: &armcompute.SharingProfile{
// Permissions: to.Ptr(armcompute.GallerySharingPermissionTypesCommunity),
// CommunityGalleryInfo: &armcompute.CommunityGalleryInfo{
// PublisherURI: to.Ptr("uri"),
// PublisherContact: to.Ptr("pir@microsoft.com"),
// Eula: to.Ptr("eula"),
// PublicNamePrefix: to.Ptr("PirPublic"),
// },
// },
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("myGalleryName"),
// },
// }
}
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 create or update a Shared Image Gallery.
*
* @summary create or update a Shared Image Gallery.
* x-ms-original-file: 2025-12-03/galleryExamples/CommunityGallery_Create.json
*/
async function createACommunityGallery() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.galleries.createOrUpdate("myResourceGroup", "myGalleryName", {
location: "West US",
description: "This is the gallery description.",
sharingProfile: {
permissions: "Community",
communityGalleryInfo: {
publisherUri: "uri",
publisherContact: "pir@microsoft.com",
eula: "eula",
publicNamePrefix: "PirPublic",
},
},
});
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
Przykładowa odpowiedź
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"sharingProfile": {
"permissions": "Community",
"communityGalleryInfo": {
"publisherUri": "uri",
"publisherContact": "pir@microsoft.com",
"eula": "eula",
"publicNamePrefix": "PirPublic"
}
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Creating",
"sharingProfile": {
"permissions": "Community",
"communityGalleryInfo": {
"publisherUri": "uri",
"publisherContact": "pir@microsoft.com",
"eula": "eula",
"publicNamePrefix": "PirPublic"
}
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"sharingProfile": {
"permissions": "Community",
"communityGalleryInfo": {
"publisherUri": "uri",
"publisherContact": "pir@microsoft.com",
"eula": "eula",
"publicNamePrefix": "PirPublic"
}
}
},
"location": "West US",
"name": "myGalleryName"
}
Create or update a simple gallery with sharing profile.
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-12-03
{
"location": "West US",
"properties": {
"description": "This is the gallery description.",
"sharingProfile": {
"permissions": "Groups"
}
}
}
import com.azure.resourcemanager.compute.fluent.models.GalleryInner;
import com.azure.resourcemanager.compute.models.GallerySharingPermissionTypes;
import com.azure.resourcemanager.compute.models.SharingProfile;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Galleries CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_WithSharingProfile.json
*/
/**
* Sample code: Create or update a simple gallery with sharing profile.
*
* @param manager Entry point to ComputeManager.
*/
public static void
createOrUpdateASimpleGalleryWithSharingProfile(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getGalleries().createOrUpdate("myResourceGroup", "myGalleryName",
new GalleryInner().withLocation("West US").withDescription("This is the gallery description.")
.withSharingProfile(new SharingProfile().withPermissions(GallerySharingPermissionTypes.GROUPS)),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python gallery_create_with_sharing_profile.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.galleries.begin_create_or_update(
resource_group_name="myResourceGroup",
gallery_name="myGalleryName",
gallery={
"location": "West US",
"properties": {
"description": "This is the gallery description.",
"sharingProfile": {"permissions": "Groups"},
},
},
).result()
print(response)
# x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_WithSharingProfile.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/v8"
)
// Generated from example definition: 2025-12-03/galleryExamples/Gallery_Create_WithSharingProfile.json
func ExampleGalleriesClient_BeginCreateOrUpdate_createOrUpdateASimpleGalleryWithSharingProfile() {
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)
}
poller, err := clientFactory.NewGalleriesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myGalleryName", armcompute.Gallery{
Location: to.Ptr("West US"),
Properties: &armcompute.GalleryProperties{
Description: to.Ptr("This is the gallery description."),
SharingProfile: &armcompute.SharingProfile{
Permissions: to.Ptr(armcompute.GallerySharingPermissionTypesGroups),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armcompute.GalleriesClientCreateOrUpdateResponse{
// Gallery: armcompute.Gallery{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName"),
// Properties: &armcompute.GalleryProperties{
// Description: to.Ptr("This is the gallery description."),
// Identifier: &armcompute.GalleryIdentifier{
// UniqueName: to.Ptr("{subscription-id}-MYGALLERYNAME"),
// },
// ProvisioningState: to.Ptr(armcompute.GalleryProvisioningStateUpdating),
// SharingProfile: &armcompute.SharingProfile{
// Permissions: to.Ptr(armcompute.GallerySharingPermissionTypesGroups),
// },
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("myGalleryName"),
// },
// }
}
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 create or update a Shared Image Gallery.
*
* @summary create or update a Shared Image Gallery.
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_WithSharingProfile.json
*/
async function createOrUpdateASimpleGalleryWithSharingProfile() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.galleries.createOrUpdate("myResourceGroup", "myGalleryName", {
location: "West US",
description: "This is the gallery description.",
sharingProfile: { permissions: "Groups" },
});
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
Przykładowa odpowiedź
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"sharingProfile": {
"permissions": "Groups"
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Creating",
"sharingProfile": {
"permissions": "Groups"
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"sharingProfile": {
"permissions": "Groups"
}
},
"location": "West US",
"name": "myGalleryName"
}
Create or update a simple gallery with soft deletion enabled.
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-12-03
{
"location": "West US",
"properties": {
"description": "This is the gallery description.",
"softDeletePolicy": {
"isSoftDeleteEnabled": true
}
}
}
import com.azure.resourcemanager.compute.fluent.models.GalleryInner;
import com.azure.resourcemanager.compute.models.SoftDeletePolicy;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Galleries CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_SoftDeletionEnabled.json
*/
/**
* Sample code: Create or update a simple gallery with soft deletion enabled.
*
* @param manager Entry point to ComputeManager.
*/
public static void
createOrUpdateASimpleGalleryWithSoftDeletionEnabled(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getGalleries().createOrUpdate("myResourceGroup", "myGalleryName",
new GalleryInner().withLocation("West US").withDescription("This is the gallery description.")
.withSoftDeletePolicy(new SoftDeletePolicy().withIsSoftDeleteEnabled(true)),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python gallery_create_soft_deletion_enabled.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.galleries.begin_create_or_update(
resource_group_name="myResourceGroup",
gallery_name="myGalleryName",
gallery={
"location": "West US",
"properties": {
"description": "This is the gallery description.",
"softDeletePolicy": {"isSoftDeleteEnabled": True},
},
},
).result()
print(response)
# x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_SoftDeletionEnabled.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/v8"
)
// Generated from example definition: 2025-12-03/galleryExamples/Gallery_Create_SoftDeletionEnabled.json
func ExampleGalleriesClient_BeginCreateOrUpdate_createOrUpdateASimpleGalleryWithSoftDeletionEnabled() {
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)
}
poller, err := clientFactory.NewGalleriesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myGalleryName", armcompute.Gallery{
Location: to.Ptr("West US"),
Properties: &armcompute.GalleryProperties{
Description: to.Ptr("This is the gallery description."),
SoftDeletePolicy: &armcompute.SoftDeletePolicy{
IsSoftDeleteEnabled: to.Ptr(true),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armcompute.GalleriesClientCreateOrUpdateResponse{
// Gallery: armcompute.Gallery{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName"),
// Properties: &armcompute.GalleryProperties{
// Description: to.Ptr("This is the gallery description."),
// Identifier: &armcompute.GalleryIdentifier{
// UniqueName: to.Ptr("{subscription-id}-MYGALLERYNAME"),
// },
// ProvisioningState: to.Ptr(armcompute.GalleryProvisioningStateUpdating),
// SoftDeletePolicy: &armcompute.SoftDeletePolicy{
// IsSoftDeleteEnabled: to.Ptr(true),
// },
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("myGalleryName"),
// },
// }
}
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 create or update a Shared Image Gallery.
*
* @summary create or update a Shared Image Gallery.
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_SoftDeletionEnabled.json
*/
async function createOrUpdateASimpleGalleryWithSoftDeletionEnabled() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.galleries.createOrUpdate("myResourceGroup", "myGalleryName", {
location: "West US",
description: "This is the gallery description.",
softDeletePolicy: { isSoftDeleteEnabled: true },
});
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
Przykładowa odpowiedź
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"softDeletePolicy": {
"isSoftDeleteEnabled": true
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Creating",
"softDeletePolicy": {
"isSoftDeleteEnabled": true
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"softDeletePolicy": {
"isSoftDeleteEnabled": true
}
},
"location": "West US",
"name": "myGalleryName"
}
Create or update a simple gallery with system-assigned and user-assigned managed identities.
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-12-03
{
"location": "West US",
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {}
}
},
"properties": {
"description": "This is the gallery description."
}
}
import com.azure.resourcemanager.compute.fluent.models.GalleryInner;
import com.azure.resourcemanager.compute.models.GalleryIdentity;
import com.azure.resourcemanager.compute.models.ResourceIdentityType;
import com.azure.resourcemanager.compute.models.VirtualMachineIdentityUserAssignedIdentities;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Galleries CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_WithManagedIdentity.json
*/
/**
* Sample code: Create or update a simple gallery with system-assigned and user-assigned managed identities.
*
* @param manager Entry point to ComputeManager.
*/
public static void createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities(
com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getGalleries().createOrUpdate("myResourceGroup", "myGalleryName", new GalleryInner()
.withLocation("West US")
.withIdentity(new GalleryIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity",
new VirtualMachineIdentityUserAssignedIdentities())))
.withDescription("This is the gallery description."), com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python gallery_create_with_managed_identity.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.galleries.begin_create_or_update(
resource_group_name="myResourceGroup",
gallery_name="myGalleryName",
gallery={
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {}
},
},
"location": "West US",
"properties": {"description": "This is the gallery description."},
},
).result()
print(response)
# x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_WithManagedIdentity.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/v8"
)
// Generated from example definition: 2025-12-03/galleryExamples/Gallery_Create_WithManagedIdentity.json
func ExampleGalleriesClient_BeginCreateOrUpdate_createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities() {
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)
}
poller, err := clientFactory.NewGalleriesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myGalleryName", armcompute.Gallery{
Location: to.Ptr("West US"),
Identity: &armcompute.GalleryIdentity{
Type: to.Ptr(armcompute.ResourceIdentityTypeSystemAssignedUserAssigned),
UserAssignedIdentities: map[string]*armcompute.UserAssignedIdentitiesValue{
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {},
},
},
Properties: &armcompute.GalleryProperties{
Description: to.Ptr("This is the gallery description."),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armcompute.GalleriesClientCreateOrUpdateResponse{
// Gallery: armcompute.Gallery{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName"),
// Identity: &armcompute.GalleryIdentity{
// Type: to.Ptr(armcompute.ResourceIdentityTypeSystemAssignedUserAssigned),
// PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// UserAssignedIdentities: map[string]*armcompute.UserAssignedIdentitiesValue{
// "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": &armcompute.UserAssignedIdentitiesValue{
// },
// },
// },
// Properties: &armcompute.GalleryProperties{
// Description: to.Ptr("This is the gallery description."),
// Identifier: &armcompute.GalleryIdentifier{
// UniqueName: to.Ptr("{subscription-id}-MYGALLERYNAME"),
// },
// ProvisioningState: to.Ptr(armcompute.GalleryProvisioningStateUpdating),
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("myGalleryName"),
// },
// }
}
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 create or update a Shared Image Gallery.
*
* @summary create or update a Shared Image Gallery.
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create_WithManagedIdentity.json
*/
async function createOrUpdateASimpleGalleryWithSystemAssignedAndUserAssignedManagedIdentities() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.galleries.createOrUpdate("myResourceGroup", "myGalleryName", {
location: "West US",
identity: {
type: "SystemAssigned, UserAssigned",
userAssignedIdentities: {
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity":
{},
},
},
description: "This is the gallery description.",
});
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
Przykładowa odpowiedź
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "00000000-0000-0000-0000-000000000000",
"tenantId": "00000000-0000-0000-0000-000000000000",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {}
}
},
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "00000000-0000-0000-0000-000000000000",
"tenantId": "00000000-0000-0000-0000-000000000000",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {}
}
},
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Creating",
"softDeletePolicy": {
"isSoftDeleteEnabled": true
}
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "00000000-0000-0000-0000-000000000000",
"tenantId": "00000000-0000-0000-0000-000000000000",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {}
}
},
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating",
"softDeletePolicy": {
"isSoftDeleteEnabled": true
}
},
"location": "West US",
"name": "myGalleryName"
}
Create or update a simple gallery.
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-12-03
{
"location": "West US",
"properties": {
"description": "This is the gallery description."
}
}
import com.azure.resourcemanager.compute.fluent.models.GalleryInner;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Galleries CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create.json
*/
/**
* Sample code: Create or update a simple gallery.
*
* @param manager Entry point to ComputeManager.
*/
public static void createOrUpdateASimpleGallery(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getGalleries().createOrUpdate("myResourceGroup", "myGalleryName",
new GalleryInner().withLocation("West US").withDescription("This is the gallery description."),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python gallery_create.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.galleries.begin_create_or_update(
resource_group_name="myResourceGroup",
gallery_name="myGalleryName",
gallery={"location": "West US", "properties": {"description": "This is the gallery description."}},
).result()
print(response)
# x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create.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/v8"
)
// Generated from example definition: 2025-12-03/galleryExamples/Gallery_Create.json
func ExampleGalleriesClient_BeginCreateOrUpdate_createOrUpdateASimpleGallery() {
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)
}
poller, err := clientFactory.NewGalleriesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myGalleryName", armcompute.Gallery{
Location: to.Ptr("West US"),
Properties: &armcompute.GalleryProperties{
Description: to.Ptr("This is the gallery description."),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armcompute.GalleriesClientCreateOrUpdateResponse{
// Gallery: armcompute.Gallery{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGallery"),
// Properties: &armcompute.GalleryProperties{
// Description: to.Ptr("This is the gallery description."),
// Identifier: &armcompute.GalleryIdentifier{
// UniqueName: to.Ptr("{subscription-id}-MYGALLERYNAME"),
// },
// ProvisioningState: to.Ptr(armcompute.GalleryProvisioningStateUpdating),
// },
// Location: to.Ptr("West US"),
// Name: to.Ptr("myGalleryName"),
// },
// }
}
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 create or update a Shared Image Gallery.
*
* @summary create or update a Shared Image Gallery.
* x-ms-original-file: 2025-12-03/galleryExamples/Gallery_Create.json
*/
async function createOrUpdateASimpleGallery() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscription-id}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.galleries.createOrUpdate("myResourceGroup", "myGalleryName", {
location: "West US",
description: "This is the gallery description.",
});
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
Przykładowa odpowiedź
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGallery",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGallery",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Creating"
},
"location": "West US",
"name": "myGalleryName"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGallery",
"properties": {
"description": "This is the gallery description.",
"identifier": {
"uniqueName": "{subscription-id}-MYGALLERYNAME"
},
"provisioningState": "Updating"
},
"location": "West US",
"name": "myGalleryName"
}
Definicje
ApiError
Objekt
Błąd interfejsu API.
| Nazwa |
Typ |
Opis |
|
code
|
string
|
Kod błędu.
|
|
details
|
ApiErrorBase[]
|
Szczegóły błędu interfejsu API
|
|
innererror
|
InnerError
|
Błąd wewnętrzny interfejsu API
|
|
message
|
string
|
Komunikat o błędzie.
|
|
target
|
string
|
Element docelowy określonego błędu.
|
ApiErrorBase
Objekt
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
Objekt
Odpowiedź na błąd z usługi Obliczeniowej.
| Nazwa |
Typ |
Opis |
|
error
|
ApiError
|
Błąd interfejsu API.
|
Common.UserAssignedIdentitiesValue
Objekt
| Nazwa |
Typ |
Opis |
|
clientId
|
string
|
Identyfikator klienta tożsamości przypisanej przez użytkownika.
|
|
principalId
|
string
|
Identyfikator podmiotu zabezpieczeń tożsamości przypisanej przez użytkownika.
|
Objekt
Informacje o galerii społeczności, jeśli bieżąca galeria jest udostępniana społeczności
| Nazwa |
Typ |
Opis |
|
communityGalleryEnabled
|
boolean
|
Zawiera informacje o tym, czy udostępnianie galerii społeczności jest włączone.
|
|
eula
|
string
|
Umowa licencyjna użytkownika końcowego dotycząca obrazu galerii społeczności.
|
|
publicNamePrefix
|
string
|
Prefiks nazwy galerii, który będzie wyświetlany publicznie. Widoczne dla wszystkich użytkowników.
|
|
publicNames
|
string[]
|
Lista nazw publicznych galerii społeczności.
|
|
publisherContact
|
string
|
Wiadomość e-mail dotycząca wydawcy galerii społeczności. Adres e-mail wydawcy. Widoczne dla wszystkich użytkowników.
|
|
publisherUri
|
string
|
Link do witryny sieci Web wydawcy. Widoczne dla wszystkich użytkowników.
|
createdByType
Wyliczenie
Typ tożsamości, która utworzyła zasób.
| Wartość |
Opis |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Gallery
Objekt
Określa informacje o galerii obrazów udostępnionych, które chcesz utworzyć lub zaktualizować.
| Nazwa |
Typ |
Opis |
|
id
|
string
|
W pełni określony identyfikator zasobu dla tego zasobu. Przykład - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
identity
|
GalleryIdentity
|
Tożsamość galerii, jeśli została skonfigurowana.
|
|
location
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
name
|
string
|
Nazwa zasobu
|
|
properties.description
|
string
|
Opis tego zasobu galerii obrazów udostępnionych. Ta właściwość jest aktualizowalna.
|
|
properties.identifier
|
GalleryIdentifier
|
Opisuje unikatową nazwę galerii.
|
|
properties.provisioningState
|
GalleryProvisioningState
|
Stan aprowizacji, który pojawia się tylko w odpowiedzi.
|
|
properties.sharingProfile
|
SharingProfile
|
Profil udostępniania galerii w subskrypcji lub dzierżawie
|
|
properties.sharingStatus
|
SharingStatus
|
Stan udostępniania bieżącej galerii.
|
|
properties.softDeletePolicy
|
SoftDeletePolicy
|
Zawiera informacje o zasadach usuwania nietrwałego galerii.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
tags
|
object
|
Tagi zasobów.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
GalleryIdentifier
Objekt
Opisuje unikatową nazwę galerii.
| Nazwa |
Typ |
Opis |
|
uniqueName
|
string
|
Unikatowa nazwa galerii obrazów udostępnionych. Ta nazwa jest generowana automatycznie przez platformę Azure.
|
GalleryIdentity
Objekt
Tożsamość maszyny wirtualnej.
| Nazwa |
Typ |
Opis |
|
principalId
|
string
|
Identyfikator podmiotu zabezpieczeń tożsamości galerii. Ta właściwość zostanie udostępniona tylko dla tożsamości przypisanej przez system.
|
|
tenantId
|
string
|
Identyfikator dzierżawy usługi AAD tożsamości galerii. Ta właściwość zostanie udostępniona tylko dla tożsamości przypisanej przez system.
|
|
type
|
ResourceIdentityType
|
Typ tożsamości używanej dla galerii. Typ "SystemAssigned, UserAssigned" zawiera zarówno niejawnie utworzoną tożsamość, jak i zestaw tożsamości przypisanych przez użytkownika. Typ "None" spowoduje usunięcie wszystkich tożsamości z galerii.
|
|
userAssignedIdentities
|
<string,
Common.UserAssignedIdentitiesValue>
|
Lista tożsamości użytkowników skojarzonych z galerią. Klucze do słownika tożsamości użytkownika będą identyfikatorami zasobów ARM w formie: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft. ManagedIdentity/userAssignedIdentities/{identityName}'.
|
GalleryProvisioningState
Wyliczenie
Stan aprowizacji, który pojawia się tylko w odpowiedzi.
| Wartość |
Opis |
|
Creating
|
|
|
Updating
|
|
|
Failed
|
|
|
Succeeded
|
|
|
Deleting
|
|
|
Migrating
|
|
GallerySharingPermissionTypes
Wyliczenie
Ta właściwość umożliwia określenie uprawnień do udostępniania galerii. Możliwe wartości to: Prywatne, grupyCommunity.
| Wartość |
Opis |
|
Private
|
|
|
Groups
|
|
|
Community
|
|
InnerError
Objekt
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.
|
RegionalSharingStatus
Objekt
Stan udostępniania regionalnego galerii
| Nazwa |
Typ |
Opis |
|
details
|
string
|
Szczegóły niepowodzenia udostępniania regionalnego galerii.
|
|
region
|
string
|
Nazwa regionu
|
|
state
|
SharingState
|
Stan udostępniania galerii w bieżącym regionie
|
ResourceIdentityType
Wyliczenie
Typ tożsamości używanej dla galerii. Typ "SystemAssigned, UserAssigned" zawiera zarówno niejawnie utworzoną tożsamość, jak i zestaw tożsamości przypisanych przez użytkownika. Typ "None" spowoduje usunięcie wszystkich tożsamości z galerii.
| Wartość |
Opis |
|
SystemAssigned
|
|
|
UserAssigned
|
|
|
SystemAssigned, UserAssigned
|
|
|
None
|
|
SharingProfile
Objekt
Profil udostępniania galerii w subskrypcji lub dzierżawie
| Nazwa |
Typ |
Opis |
|
communityGalleryInfo
|
CommunityGalleryInfo
|
Informacje o galerii społeczności, jeśli bieżąca galeria jest udostępniana społeczności.
|
|
groups
|
SharingProfileGroup[]
|
Lista grup profilów udostępniania.
|
|
permissions
|
GallerySharingPermissionTypes
|
Ta właściwość umożliwia określenie uprawnień do udostępniania galerii. Możliwe wartości to: Prywatne, grupyCommunity.
|
SharingProfileGroup
Objekt
Grupa profilu udostępniania galerii
| Nazwa |
Typ |
Opis |
|
ids
|
string[]
|
Lista identyfikatorów subskrypcji/dzierżawy, dla których galeria ma zostać udostępniona.
|
|
type
|
SharingProfileGroupTypes
|
Ta właściwość umożliwia określenie typu grupy udostępniania. Możliwe wartości to: Subscriptions,AADTenants.
|
SharingProfileGroupTypes
Wyliczenie
Ta właściwość umożliwia określenie typu grupy udostępniania. Możliwe wartości to: Subscriptions,AADTenants.
| Wartość |
Opis |
|
Subscriptions
|
|
|
AADTenants
|
|
SharingState
Wyliczenie
Stan udostępniania galerii, który pojawia się tylko w odpowiedzi.
| Wartość |
Opis |
|
Succeeded
|
|
|
InProgress
|
|
|
Failed
|
|
|
Unknown
|
|
SharingStatus
Objekt
Stan udostępniania bieżącej galerii.
| Nazwa |
Typ |
Opis |
|
aggregatedState
|
SharingState
|
Zagregowany stan udostępniania bieżącej galerii.
|
|
summary
|
RegionalSharingStatus[]
|
Podsumowanie wszystkich stanu udostępniania regionalnego.
|
SoftDeletePolicy
Objekt
Zawiera informacje o zasadach usuwania nietrwałego galerii.
| Nazwa |
Typ |
Opis |
|
isSoftDeleteEnabled
|
boolean
|
Umożliwia usuwanie nietrwałe zasobów w tej galerii, co umożliwia ich odzyskanie w czasie przechowywania.
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
| Nazwa |
Typ |
Opis |
|
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|