Skapa eller uppdatera ett Shared Image Gallery.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}?api-version=2025-12-03
URI-parametrar
| Name |
I |
Obligatorisk |
Typ |
Description |
|
galleryName
|
path |
True
|
string
pattern: ^[^_\W][\w-._]{0,79}(?
|
Namnet på Shared Image Gallery.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Namnet på resursgruppen. Namnet är skiftlägesokänsligt.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
ID för målprenumerationen.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Den API-version som ska användas för den här åtgärden.
|
Begärandetext
| Name |
Obligatorisk |
Typ |
Description |
|
location
|
True
|
string
|
Den geo-plats där resursen finns
|
|
identity
|
|
GalleryIdentity
|
Galleriets identitet, om den är konfigurerad.
|
|
properties.description
|
|
string
|
Beskrivningen av den här resursen för delat bildgalleri. Den här egenskapen är uppdaterad.
|
|
properties.identifier
|
|
GalleryIdentifier
|
Beskriver galleriets unika namn.
|
|
properties.sharingProfile
|
|
SharingProfile
|
Profil för galleridelning till prenumeration eller klientorganisation
|
|
properties.softDeletePolicy
|
|
SoftDeletePolicy
|
Innehåller information om galleriets princip för mjuk borttagning.
|
|
tags
|
|
object
|
Resursetiketter.
|
Svar
| Name |
Typ |
Description |
|
200 OK
|
Gallery
|
Uppdateringsåtgärden för resursgalleriet har slutförts
|
|
201 Created
|
Gallery
|
Åtgärden för att skapa resursen "Galleri" lyckades
Sidhuvuden
- Location: string
- Retry-After: integer
|
|
202 Accepted
|
Gallery
|
Begäran har godkänts för bearbetning, men bearbetningen har ännu inte slutförts.
Sidhuvuden
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
CloudError
|
Ett oväntat felsvar.
|
Säkerhet
azure_auth
Azure Active Directory OAuth2-flöde.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name |
Description |
|
user_impersonation
|
personifiera ditt användarkonto
|
Exempel
Exempelbegäran
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
Exempelsvar
{
"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.
Exempelbegäran
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
Exempelsvar
{
"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.
Exempelbegäran
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
Exempelsvar
{
"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.
Exempelbegäran
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
Exempelsvar
{
"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.
Exempelbegäran
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
Exempelsvar
{
"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"
}
Definitioner
ApiError
Objekt
Api-fel.
| Name |
Typ |
Description |
|
code
|
string
|
Felkoden.
|
|
details
|
ApiErrorBase[]
|
Api-felinformationen
|
|
innererror
|
InnerError
|
Api:ets inre fel
|
|
message
|
string
|
Felmeddelandet.
|
|
target
|
string
|
Målet för det specifika felet.
|
ApiErrorBase
Objekt
Api-felbas.
| Name |
Typ |
Description |
|
code
|
string
|
Felkoden.
|
|
message
|
string
|
Felmeddelandet.
|
|
target
|
string
|
Målet för det specifika felet.
|
CloudError
Objekt
Ett felsvar från Compute-tjänsten.
| Name |
Typ |
Description |
|
error
|
ApiError
|
Api-fel.
|
Common.UserAssignedIdentitiesValue
Objekt
| Name |
Typ |
Description |
|
clientId
|
string
|
Klient-ID för användartilldelad identitet.
|
|
principalId
|
string
|
Huvud-ID för användartilldelad identitet.
|
Objekt
Information om communitygalleriet om det aktuella galleriet delas till communityn
| Name |
Typ |
Description |
|
communityGalleryEnabled
|
boolean
|
Innehåller information om huruvida delning av communitygalleri är aktiverat.
|
|
eula
|
string
|
Slutanvändarlicensavtal för communitygalleribild.
|
|
publicNamePrefix
|
string
|
Prefixet för det gallerinamn som ska visas offentligt. Synlig för alla användare.
|
|
publicNames
|
string[]
|
Offentlig namnlista för communitygalleriet.
|
|
publisherContact
|
string
|
Community gallery publisher har stöd för e-post. Utgivarens e-postadress. Synlig för alla användare.
|
|
publisherUri
|
string
|
Länken till utgivarens webbplats. Synlig för alla användare.
|
createdByType
Uppräkning
Den typ av identitet som skapade resursen.
| Värde |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Gallery
Objekt
Anger information om det delade bildgalleriet som du vill skapa eller uppdatera.
| Name |
Typ |
Description |
|
id
|
string
|
Fullständigt kvalificerat resurs-ID för resursen. Ex – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
identity
|
GalleryIdentity
|
Galleriets identitet, om den är konfigurerad.
|
|
location
|
string
|
Den geo-plats där resursen finns
|
|
name
|
string
|
Namnet på resursen
|
|
properties.description
|
string
|
Beskrivningen av den här resursen för delat bildgalleri. Den här egenskapen är uppdaterad.
|
|
properties.identifier
|
GalleryIdentifier
|
Beskriver galleriets unika namn.
|
|
properties.provisioningState
|
GalleryProvisioningState
|
Etableringstillståndet, som bara visas i svaret.
|
|
properties.sharingProfile
|
SharingProfile
|
Profil för galleridelning till prenumeration eller klientorganisation
|
|
properties.sharingStatus
|
SharingStatus
|
Delningsstatus för aktuellt galleri.
|
|
properties.softDeletePolicy
|
SoftDeletePolicy
|
Innehåller information om galleriets princip för mjuk borttagning.
|
|
systemData
|
systemData
|
Azure Resource Manager-metadata som innehåller createdBy och modifiedBy information.
|
|
tags
|
object
|
Resursetiketter.
|
|
type
|
string
|
Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"
|
GalleryIdentifier
Objekt
Beskriver galleriets unika namn.
| Name |
Typ |
Description |
|
uniqueName
|
string
|
Det unika namnet på det delade bildgalleriet. Det här namnet genereras automatiskt av Azure.
|
GalleryIdentity
Objekt
Identitet för den virtuella datorn.
| Name |
Typ |
Description |
|
principalId
|
string
|
Huvud-ID:t för galleriidentiteten. Den här egenskapen tillhandahålls endast för en systemtilldelad identitet.
|
|
tenantId
|
string
|
AAD-klient-ID för galleriidentiteten. Den här egenskapen tillhandahålls endast för en systemtilldelad identitet.
|
|
type
|
ResourceIdentityType
|
Den typ av identitet som används för galleriet. Typen "SystemAssigned, UserAssigned" innehåller både en implicit skapad identitet och en uppsättning användartilldelade identiteter. Typen "Ingen" tar bort alla identiteter från galleriet.
|
|
userAssignedIdentities
|
<string,
Common.UserAssignedIdentitiesValue>
|
Listan över användaridentiteter som är associerade med galleriet. Nyckelreferenserna till användaridentitetsordboken kommer att vara ARM-resurs-id:n i formen: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft. ManagedIdentity/userAssignedIdentities/{identityName}'.
|
GalleryProvisioningState
Uppräkning
Etableringstillståndet, som bara visas i svaret.
| Värde |
Description |
|
Creating
|
|
|
Updating
|
|
|
Failed
|
|
|
Succeeded
|
|
|
Deleting
|
|
|
Migrating
|
|
GallerySharingPermissionTypes
Uppräkning
Med den här egenskapen kan du ange behörigheten för delningsgalleriet. Möjliga värden är: Private,Groups,Community.
| Värde |
Description |
|
Private
|
|
|
Groups
|
|
|
Community
|
|
InnerError
Objekt
Inre felinformation.
| Name |
Typ |
Description |
|
errordetail
|
string
|
Det interna felmeddelandet eller undantagsdumpen.
|
|
exceptiontype
|
string
|
Typen av undantag.
|
RegionalSharingStatus
Objekt
Galleri regional delningsstatus
| Name |
Typ |
Description |
|
details
|
string
|
Information om fel vid regional delning i galleriet.
|
|
region
|
string
|
Regionnamn
|
|
state
|
SharingState
|
Galleridelningstillstånd i den aktuella regionen
|
ResourceIdentityType
Uppräkning
Den typ av identitet som används för galleriet. Typen "SystemAssigned, UserAssigned" innehåller både en implicit skapad identitet och en uppsättning användartilldelade identiteter. Typen "Ingen" tar bort alla identiteter från galleriet.
| Värde |
Description |
|
SystemAssigned
|
|
|
UserAssigned
|
|
|
SystemAssigned, UserAssigned
|
|
|
None
|
|
SharingProfile
Objekt
Profil för galleridelning till prenumeration eller klientorganisation
| Name |
Typ |
Description |
|
communityGalleryInfo
|
CommunityGalleryInfo
|
Information om communitygalleriet om det aktuella galleriet delas till communityn.
|
|
groups
|
SharingProfileGroup[]
|
En lista över delningsprofilgrupper.
|
|
permissions
|
GallerySharingPermissionTypes
|
Med den här egenskapen kan du ange behörigheten för delningsgalleriet. Möjliga värden är: Private,Groups,Community.
|
SharingProfileGroup
Objekt
Grupp av galleridelningsprofilen
| Name |
Typ |
Description |
|
ids
|
string[]
|
En lista över prenumerations-/klientorganisations-ID:t som galleriet syftar till att delas till.
|
|
type
|
SharingProfileGroupTypes
|
Med den här egenskapen kan du ange vilken typ av delningsgrupp som ska användas. Möjliga värden är: Subscriptions,AADTenants.
|
SharingProfileGroupTypes
Uppräkning
Med den här egenskapen kan du ange vilken typ av delningsgrupp som ska användas. Möjliga värden är: Subscriptions,AADTenants.
| Värde |
Description |
|
Subscriptions
|
|
|
AADTenants
|
|
SharingState
Uppräkning
Delningstillståndet för galleriet, som bara visas i svaret.
| Värde |
Description |
|
Succeeded
|
|
|
InProgress
|
|
|
Failed
|
|
|
Unknown
|
|
SharingStatus
Objekt
Delningsstatus för aktuellt galleri.
| Name |
Typ |
Description |
|
aggregatedState
|
SharingState
|
Aggregerat delningstillstånd för det aktuella galleriet.
|
|
summary
|
RegionalSharingStatus[]
|
Sammanfattning av all regional delningsstatus.
|
SoftDeletePolicy
Objekt
Innehåller information om galleriets princip för mjuk borttagning.
| Name |
Typ |
Description |
|
isSoftDeleteEnabled
|
boolean
|
Möjliggör mjuk borttagning för resurser i det här galleriet, så att de kan återställas inom kvarhållningstiden.
|
systemData
Objekt
Metadata som rör skapande och senaste ändring av resursen.
| Name |
Typ |
Description |
|
createdAt
|
string
(date-time)
|
Tidsstämpeln för resursskapande (UTC).
|
|
createdBy
|
string
|
Identiteten som skapade resursen.
|
|
createdByType
|
createdByType
|
Den typ av identitet som skapade resursen.
|
|
lastModifiedAt
|
string
(date-time)
|
Tidsstämpeln för resursens senaste ändring (UTC)
|
|
lastModifiedBy
|
string
|
Identiteten som senast ändrade resursen.
|
|
lastModifiedByType
|
createdByType
|
Den typ av identitet som senast ändrade resursen.
|