Sdílet prostřednictvím


Galleries - Create Or Update

Vytvořte nebo aktualizujte galerii sdílených imagí.

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

Parametry identifikátoru URI

Name V Vyžadováno Typ Description
galleryName
path True

string

Název galerie sdílených imagí. Povolené znaky jsou abecedy a čísla s tečkami a tečkami povolenými uprostřed. Maximální délka je 80 znaků.

resourceGroupName
path True

string

Název skupiny prostředků.

subscriptionId
path True

string

Přihlašovací údaje předplatného, které jednoznačně identifikují předplatné Microsoft Azure. ID předplatného tvoří součást identifikátoru URI pro každé volání služby.

api-version
query True

string

Verze rozhraní API klienta.

Text požadavku

Name Vyžadováno Typ Description
location True

string

Umístění prostředku

identity

GalleryIdentity

Identita galerie, pokud je nakonfigurovaná.

properties.description

string

Popis tohoto prostředku sdílené galerie imagí. Tato vlastnost je aktualizovatelná.

properties.identifier

GalleryIdentifier

Popisuje jedinečný název galerie.

properties.sharingProfile

SharingProfile

Profil pro sdílení galerie s předplatným nebo tenantem

properties.softDeletePolicy

SoftDeletePolicy

Obsahuje informace o zásadách obnovitelného odstranění galerie.

tags

object

Značky prostředků

Odpovědi

Name Typ Description
200 OK

Gallery

OK

201 Created

Gallery

Vytvořil

202 Accepted

Gallery

Přijal

Other Status Codes

CloudError

Chybová odpověď popisující, proč operace selhala.

Zabezpečení

azure_auth

Azure Active Directory OAuth2 Flow

Typ: oauth2
Tok: implicit
URL autorizace: https://login.microsoftonline.com/common/oauth2/authorize

Rozsahy

Name Description
user_impersonation zosobnění uživatelského účtu

Příklady

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.

Ukázkový požadavek

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

Ukázková odpověď

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

Ukázkový požadavek

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

Ukázková odpověď

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

Ukázkový požadavek

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

Ukázková odpověď

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

Ukázkový požadavek

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

Ukázková odpověď

{
  "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.

Ukázkový požadavek

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

Ukázková odpověď

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

Definice

Name Description
ApiError

Chyba rozhraní API

ApiErrorBase

Základ chyb rozhraní API.

CloudError

Odpověď na chybu z výpočetní služby

CommunityGalleryInfo

Informace o galerii komunity, pokud je aktuální galerie sdílená s komunitou

Gallery

Určuje informace o sdílené galerii imagí, kterou chcete vytvořit nebo aktualizovat.

GalleryIdentifier

Popisuje jedinečný název galerie.

GalleryIdentity

Identita virtuálního počítače.

GalleryProvisioningState

Aktuální stav artefaktu galerie nebo galerie.

GallerySharingPermissionTypes

Tato vlastnost umožňuje zadat oprávnění galerie sdílení. Možné hodnoty jsou: soukromé skupiny, skupinykomunity.

InnerError

Podrobnosti vnitřní chyby.

RegionalSharingStatus

Stav místního sdílení galerie

ResourceIdentityType

Typ identity, který se používá pro galerii. Typ SystemAssigned, UserAssigned zahrnuje implicitně vytvořenou identitu i sadu identit přiřazených uživatelem. Typ None odebere všechny identity z galerie.

SharingProfile

Profil pro sdílení galerie s předplatným nebo tenantem

SharingProfileGroup

Skupina profilu sdílení galerie

SharingProfileGroupTypes

Tato vlastnost umožňuje zadat typ skupiny sdílení. Možné hodnoty jsou: Subscriptions,AADTenants.

SharingState

Stav sdílení galerie.

SharingStatus

Stav sdílení aktuální galerie

SoftDeletePolicy

Obsahuje informace o zásadách obnovitelného odstranění galerie.

UserAssignedIdentities

Seznam identit uživatelů přidružených k virtuálnímu počítači. Odkazy na klíč slovníku identit uživatele budou ID prostředků ARM ve formátu: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.

ApiError

Chyba rozhraní API

Name Typ Description
code

string

Kód chyby.

details

ApiErrorBase[]

Podrobnosti o chybě rozhraní API

innererror

InnerError

Vnitřní chyba rozhraní API

message

string

Chybová zpráva.

target

string

Cíl konkrétní chyby.

ApiErrorBase

Základ chyb rozhraní API.

Name Typ Description
code

string

Kód chyby.

message

string

Chybová zpráva.

target

string

Cíl konkrétní chyby.

CloudError

Odpověď na chybu z výpočetní služby

Name Typ Description
error

ApiError

Chyba rozhraní API

CommunityGalleryInfo

Informace o galerii komunity, pokud je aktuální galerie sdílená s komunitou

Name Typ Description
communityGalleryEnabled

boolean

Obsahuje informace o tom, jestli je povolené sdílení galerie komunity.

eula

string

Obrázek galerie komunity s licenční smlouvou s koncovým uživatelem

publicNamePrefix

string

Předpona názvu galerie, která se zobrazí veřejně. Viditelné pro všechny uživatele.

publicNames

string[]

Seznam veřejných jmen galerie komunity

publisherContact

string

E-mail podpory vydavatele galerie komunity E-mailová adresa vydavatele Viditelné pro všechny uživatele.

publisherUri

string

Odkaz na web vydavatele. Viditelné pro všechny uživatele.

Určuje informace o sdílené galerii imagí, kterou chcete vytvořit nebo aktualizovat.

Name Typ Description
id

string

ID prostředku

identity

GalleryIdentity

Identita galerie, pokud je nakonfigurovaná.

location

string

Umístění prostředku

name

string

Název prostředku

properties.description

string

Popis tohoto prostředku sdílené galerie imagí. Tato vlastnost je aktualizovatelná.

properties.identifier

GalleryIdentifier

Popisuje jedinečný název galerie.

properties.provisioningState

GalleryProvisioningState

Aktuální stav artefaktu galerie nebo galerie.
Stav zřizování, který se zobrazí pouze v odpovědi.

properties.sharingProfile

SharingProfile

Profil pro sdílení galerie s předplatným nebo tenantem

properties.sharingStatus

SharingStatus

Stav sdílení aktuální galerie

properties.softDeletePolicy

SoftDeletePolicy

Obsahuje informace o zásadách obnovitelného odstranění galerie.

tags

object

Značky prostředků

type

string

Typ prostředku

GalleryIdentifier

Popisuje jedinečný název galerie.

Name Typ Description
uniqueName

string

Jedinečný název galerie sdílených imagí. Azure tento název vygeneruje automaticky.

GalleryIdentity

Identita virtuálního počítače.

Name Typ Description
principalId

string

ID objektu zabezpečení identity galerie. Tato vlastnost bude poskytována pouze pro identitu přiřazenou systémem.

tenantId

string

ID tenanta AAD identity galerie. Tato vlastnost bude poskytována pouze pro identitu přiřazenou systémem.

type

ResourceIdentityType

Typ identity, který se používá pro galerii. Typ SystemAssigned, UserAssigned zahrnuje implicitně vytvořenou identitu i sadu identit přiřazených uživatelem. Typ None odebere všechny identity z galerie.

userAssignedIdentities

UserAssignedIdentities

Seznam identit uživatelů přidružených k galerii. Odkazy na klíč slovníku identit uživatele budou ID prostředků ARM ve formátu: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.

GalleryProvisioningState

Aktuální stav artefaktu galerie nebo galerie.

Name Typ Description
Creating

string

Deleting

string

Failed

string

Migrating

string

Succeeded

string

Updating

string

GallerySharingPermissionTypes

Tato vlastnost umožňuje zadat oprávnění galerie sdílení. Možné hodnoty jsou: soukromé skupiny, skupinykomunity.

Name Typ Description
Community

string

Groups

string

Private

string

InnerError

Podrobnosti vnitřní chyby.

Name Typ Description
errordetail

string

Vnitřní chybová zpráva nebo výpis výjimky.

exceptiontype

string

Typ výjimky.

RegionalSharingStatus

Stav místního sdílení galerie

Name Typ Description
details

string

Podrobnosti o selhání místního sdílení galerie

region

string

Název oblasti

state

SharingState

Stav sdílení galerie.
Stav sdílení galerie v aktuální oblasti

ResourceIdentityType

Typ identity, který se používá pro galerii. Typ SystemAssigned, UserAssigned zahrnuje implicitně vytvořenou identitu i sadu identit přiřazených uživatelem. Typ None odebere všechny identity z galerie.

Name Typ Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

SharingProfile

Profil pro sdílení galerie s předplatným nebo tenantem

Name Typ Description
communityGalleryInfo

CommunityGalleryInfo

Informace o galerii komunity, pokud je aktuální galerie sdílená s komunitou

groups

SharingProfileGroup[]

Seznam skupin profilů sdílení

permissions

GallerySharingPermissionTypes

Tato vlastnost umožňuje zadat oprávnění galerie sdílení. Možné hodnoty jsou: soukromé skupiny, skupinykomunity.

SharingProfileGroup

Skupina profilu sdílení galerie

Name Typ Description
ids

string[]

Seznam ID předplatného nebo tenanta, se kterými se galerie sdílí.

type

SharingProfileGroupTypes

Tato vlastnost umožňuje zadat typ skupiny sdílení. Možné hodnoty jsou: Subscriptions,AADTenants.

SharingProfileGroupTypes

Tato vlastnost umožňuje zadat typ skupiny sdílení. Možné hodnoty jsou: Subscriptions,AADTenants.

Name Typ Description
AADTenants

string

Subscriptions

string

SharingState

Stav sdílení galerie.

Name Typ Description
Failed

string

InProgress

string

Succeeded

string

Unknown

string

SharingStatus

Stav sdílení aktuální galerie

Name Typ Description
aggregatedState

SharingState

Stav sdílení galerie.
Agregovaný stav sdílení aktuální galerie

summary

RegionalSharingStatus[]

Shrnutí stavu sdílení v jednotlivých oblastech

SoftDeletePolicy

Obsahuje informace o zásadách obnovitelného odstranění galerie.

Name Typ Description
isSoftDeleteEnabled

boolean

Umožňuje obnovitelné odstranění prostředků v této galerii, což umožňuje jejich obnovení během doby uchovávání.

UserAssignedIdentities

Seznam identit uživatelů přidružených k virtuálnímu počítači. Odkazy na klíč slovníku identit uživatele budou ID prostředků ARM ve formátu: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.

Name Typ Description