Sdílet prostřednictvím


Galleries - Create Or Update

Vytvořte nebo aktualizujte Shared Image Gallery.

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

Parametry identifikátoru URI

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

string

Název Shared Image Gallery. Povolené znaky jsou abecedy a čísla s tečkami, které jsou povolené 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 je 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

properties.description

string

Popis tohoto Shared Image Gallery prostředku. 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řeno

202 Accepted

Gallery

Přijato

Other Status Codes

CloudError

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

Zabezpečení

azure_auth

Tok Azure Active Directory OAuth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

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.

Create a community gallery.

Sample Request

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

Sample Response

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

Sample Request

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

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

Sample Response

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

Sample Request

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

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

Sample Response

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

Sample Request

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

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

Sample Response

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

Chybová odpověď ze služby Compute.

CommunityGalleryInfo

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

Gallery

Určuje informace o Shared Image Gallery, které chcete vytvořit nebo aktualizovat.

GalleryIdentifier

Popisuje jedinečný název galerie.

GalleryProvisioningState

Aktuální stav galerie nebo artefaktu galerie.

GallerySharingPermissionTypes

Tato vlastnost umožňuje zadat oprávnění ke sdílení galerie. Možné hodnoty jsou: Soukromé,Skupiny,Komunita.

InnerError

Podrobnosti o vnitřní chybě.

RegionalSharingStatus

Stav sdílení v oblasti 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: Předplatná,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.

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

Chybová odpověď ze služby Compute.

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í komunitní galerie.

eula

string

Licenční smlouva s koncovým uživatelem pro obrázek komunitní galerie.

publicNamePrefix

string

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

publicNames

string[]

Seznam veřejných názvů 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 Shared Image Gallery, které chcete vytvořit nebo aktualizovat.

Name Typ Description
id

string

ID prostředku

location

string

Umístění prostředku

name

string

Název prostředku

properties.description

string

Popis tohoto Shared Image Gallery prostředku. Tato vlastnost je aktualizovatelná.

properties.identifier

GalleryIdentifier

Popisuje jedinečný název galerie.

properties.provisioningState

GalleryProvisioningState

Aktuální stav galerie nebo artefaktu 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 Shared Image Gallery. Tento název automaticky vygeneruje Azure.

GalleryProvisioningState

Aktuální stav galerie nebo artefaktu 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í ke sdílení galerie. Možné hodnoty jsou: Soukromé,Skupiny,Komunita.

Name Typ Description
Community

string

Groups

string

Private

string

InnerError

Podrobnosti o vnitřní chybě.

Name Typ Description
errordetail

string

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

exceptiontype

string

Typ výjimky.

RegionalSharingStatus

Stav sdílení v oblasti galerie

Name Typ Description
details

string

Podrobnosti o selhání sdílení oblastí v galerii

region

string

Název oblasti

state

SharingState

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

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í ke sdílení galerie. Možné hodnoty jsou: Soukromé,Skupiny,Komunita.

SharingProfileGroup

Skupina profilu sdílení galerie

Name Typ Description
ids

string[]

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

type

SharingProfileGroupTypes

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

SharingProfileGroupTypes

Tato vlastnost umožňuje zadat typ skupiny sdílení. Možné hodnoty jsou: Předplatná,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[]

Souhrn veškerého stavu sdílení v oblasti

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í.