Udostępnij za pośrednictwem


Galleries - Create Or Update

Utwórz lub zaktualizuj galerię obrazów udostępnionych.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}?api-version=2024-03-03

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
galleryName
path True

string

Nazwa galerii obrazów udostępnionych.

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 usługi Azure Active Directory.

Typ: oauth2
Flow: implicit
Adres URL autoryzacji: https://login.microsoftonline.com/common/oauth2/authorize

Zakresy

Nazwa Opis
user_impersonation personifikacja konta użytkownika

Przykłady

Create a community gallery.
Create or update a simple gallery with sharing profile.
Create or update a simple gallery with soft deletion enabled.
Create or update a simple gallery with system-assigned and user-assigned managed identities.
Create or update a simple gallery.

Create a community gallery.

Przykładowe żądanie

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2024-03-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"
      }
    }
  }
}

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"
}

Przykładowe żądanie

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2024-03-03

{
  "location": "West US",
  "properties": {
    "description": "This is the gallery description.",
    "sharingProfile": {
      "permissions": "Groups"
    }
  }
}

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"
}

Przykładowe żądanie

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2024-03-03

{
  "location": "West US",
  "properties": {
    "description": "This is the gallery description.",
    "softDeletePolicy": {
      "isSoftDeleteEnabled": true
    }
  }
}

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"
}

Przykładowe żądanie

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2024-03-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."
  }
}

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=2024-03-03

{
  "location": "West US",
  "properties": {
    "description": "This is the gallery description."
  }
}

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

Nazwa Opis
ApiError

Błąd interfejsu API.

ApiErrorBase

Baza błędów interfejsu API.

CloudError

Odpowiedź na błąd z usługi Obliczeniowej.

CommunityGalleryInfo

Informacje o galerii społeczności, jeśli bieżąca galeria jest udostępniana społeczności

createdByType

Typ tożsamości, która utworzyła zasób.

Gallery

Określa informacje o galerii obrazów udostępnionych, które chcesz utworzyć lub zaktualizować.

GalleryIdentifier

Opisuje unikatową nazwę galerii.

GalleryIdentity

Tożsamość maszyny wirtualnej.

GalleryProvisioningState

Stan aprowizacji, który pojawia się tylko w odpowiedzi.

GallerySharingPermissionTypes

Ta właściwość umożliwia określenie uprawnień do udostępniania galerii. Możliwe wartości to: Prywatne, grupyCommunity.

InnerError

Szczegóły błędu wewnętrznego.

RegionalSharingStatus

Stan udostępniania regionalnego galerii

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.

SharingProfile

Profil udostępniania galerii w subskrypcji lub dzierżawie

SharingProfileGroup

Grupa profilu udostępniania galerii

SharingProfileGroupTypes

Ta właściwość umożliwia określenie typu grupy udostępniania. Możliwe wartości to: Subskrypcje,AADTenants.

SharingState

Stan udostępniania galerii, który pojawia się tylko w odpowiedzi.

SharingStatus

Stan udostępniania bieżącej galerii.

SoftDeletePolicy

Zawiera informacje o zasadach usuwania nietrwałego galerii.

systemData

Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.

UserAssignedIdentitiesValue

ApiError

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

Baza błędów interfejsu API.

Nazwa Typ Opis
code

string

Kod błędu.

message

string

Komunikat o błędzie.

target

string

Element docelowy określonego błędu.

CloudError

Odpowiedź na błąd z usługi Obliczeniowej.

Nazwa Typ Opis
error

ApiError

Błąd interfejsu API.

CommunityGalleryInfo

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

Typ tożsamości, która utworzyła zasób.

Wartość Opis
User
Application
ManagedIdentity
Key

Określa informacje o galerii obrazów udostępnionych, które chcesz utworzyć lub zaktualizować.

Nazwa Typ Opis
id

string

W pełni kwalifikowany identyfikator zasobu dla 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

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

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,  UserAssignedIdentitiesValue>

Lista tożsamości użytkowników skojarzonych z galerią. Odwołania do klucza słownika tożsamości użytkownika będą identyfikatorami zasobów arm w postaci: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}".

GalleryProvisioningState

Stan aprowizacji, który pojawia się tylko w odpowiedzi.

Wartość Opis
Creating
Updating
Failed
Succeeded
Deleting
Migrating

GallerySharingPermissionTypes

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

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

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

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

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

Grupa profilu udostępniania galerii

Nazwa Typ Opis
ids

string[]

Lista identyfikatorów subskrypcji/dzierżawy, do której ma być udostępniona galeria.

type

SharingProfileGroupTypes

Ta właściwość umożliwia określenie typu grupy udostępniania. Możliwe wartości to: Subskrypcje,AADTenants.

SharingProfileGroupTypes

Ta właściwość umożliwia określenie typu grupy udostępniania. Możliwe wartości to: Subskrypcje,AADTenants.

Wartość Opis
Subscriptions
AADTenants

SharingState

Stan udostępniania galerii, który pojawia się tylko w odpowiedzi.

Wartość Opis
Succeeded
InProgress
Failed
Unknown

SharingStatus

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

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

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.

UserAssignedIdentitiesValue

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.