Bagikan melalui


Galleries - Create Or Update

Membuat atau memperbarui Shared Image Gallery.

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

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
galleryName
path True

string

Nama Shared Image Gallery. Karakter yang diizinkan adalah alfabet dan angka dengan titik dan titik yang diizinkan di tengah. Panjang maksimum adalah 80 karakter.

resourceGroupName
path True

string

Nama grup sumber daya.

subscriptionId
path True

string

Kredensial langganan yang secara unik mengidentifikasi langganan Microsoft Azure. ID langganan membentuk bagian dari URI untuk setiap panggilan layanan.

api-version
query True

string

Versi Api Klien.

Isi Permintaan

Nama Diperlukan Jenis Deskripsi
location True

string

Lokasi sumber daya

properties.description

string

Deskripsi sumber daya Shared Image Gallery ini. Properti ini dapat diperbarui.

properties.identifier

GalleryIdentifier

Menjelaskan nama unik galeri.

properties.sharingProfile

SharingProfile

Profil untuk berbagi galeri ke langganan atau penyewa

properties.softDeletePolicy

SoftDeletePolicy

Berisi informasi tentang kebijakan penghapusan sementara galeri.

tags

object

Tag sumber daya

Respons

Nama Jenis Deskripsi
200 OK

Gallery

OK

201 Created

Gallery

Dibuat

202 Accepted

Gallery

Diterima

Other Status Codes

CloudError

Respons kesalahan yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Alur OAuth2 Azure Active Directory

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

Scopes

Nama Deskripsi
user_impersonation meniru akun pengguna Anda

Contoh

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

Definisi

Nama Deskripsi
ApiError

Kesalahan api.

ApiErrorBase

Basis kesalahan api.

CloudError

Respons kesalahan dari layanan Komputasi.

CommunityGalleryInfo

Informasi galeri komunitas jika galeri saat ini dibagikan ke komunitas

Gallery

Menentukan informasi tentang Shared Image Gallery yang ingin Anda buat atau perbarui.

GalleryIdentifier

Menjelaskan nama unik galeri.

GalleryProvisioningState

Status galeri atau artefak galeri saat ini.

GallerySharingPermissionTypes

Properti ini memungkinkan Anda menentukan izin berbagi galeri. Nilai yang mungkin adalah: Privat,Grup,Komunitas.

InnerError

Detail kesalahan dalam.

RegionalSharingStatus

Status berbagi regional galeri

SharingProfile

Profil untuk berbagi galeri ke langganan atau penyewa

SharingProfileGroup

Grup profil berbagi galeri

SharingProfileGroupTypes

Properti ini memungkinkan Anda menentukan jenis grup berbagi. Nilai yang mungkin adalah: Langganan,AADTenants.

SharingState

Status berbagi galeri.

SharingStatus

Berbagi status galeri saat ini.

SoftDeletePolicy

Berisi informasi tentang kebijakan penghapusan sementara galeri.

ApiError

Kesalahan api.

Nama Jenis Deskripsi
code

string

Kode kesalahan.

details

ApiErrorBase[]

Detail kesalahan Api

innererror

InnerError

Kesalahan dalam Api

message

string

Pesan kesalahan.

target

string

Target kesalahan tertentu.

ApiErrorBase

Basis kesalahan api.

Nama Jenis Deskripsi
code

string

Kode kesalahan.

message

string

Pesan kesalahan.

target

string

Target kesalahan tertentu.

CloudError

Respons kesalahan dari layanan Komputasi.

Nama Jenis Deskripsi
error

ApiError

Kesalahan api.

CommunityGalleryInfo

Informasi galeri komunitas jika galeri saat ini dibagikan ke komunitas

Nama Jenis Deskripsi
communityGalleryEnabled

boolean

Berisi info tentang apakah berbagi galeri komunitas diaktifkan.

eula

string

Perjanjian lisensi pengguna akhir untuk gambar galeri komunitas.

publicNamePrefix

string

Awalan nama galeri yang akan ditampilkan secara publik. Terlihat oleh semua pengguna.

publicNames

string[]

Daftar nama publik galeri komunitas.

publisherContact

string

Penerbit galeri komunitas mendukung email. Alamat email penerbit. Terlihat oleh semua pengguna.

publisherUri

string

Tautan ke situs web penerbit. Terlihat oleh semua pengguna.

Menentukan informasi tentang Shared Image Gallery yang ingin Anda buat atau perbarui.

Nama Jenis Deskripsi
id

string

ID sumber daya

location

string

Lokasi sumber daya

name

string

Nama sumber daya

properties.description

string

Deskripsi sumber daya Shared Image Gallery ini. Properti ini dapat diperbarui.

properties.identifier

GalleryIdentifier

Menjelaskan nama unik galeri.

properties.provisioningState

GalleryProvisioningState

Status galeri atau artefak galeri saat ini.
Status penyediaan, yang hanya muncul dalam respons.

properties.sharingProfile

SharingProfile

Profil untuk berbagi galeri ke langganan atau penyewa

properties.sharingStatus

SharingStatus

Berbagi status galeri saat ini.

properties.softDeletePolicy

SoftDeletePolicy

Berisi informasi tentang kebijakan penghapusan sementara galeri.

tags

object

Tag sumber daya

type

string

Jenis Sumber Daya

GalleryIdentifier

Menjelaskan nama unik galeri.

Nama Jenis Deskripsi
uniqueName

string

Nama unik Shared Image Gallery. Nama ini dihasilkan secara otomatis oleh Azure.

GalleryProvisioningState

Status galeri atau artefak galeri saat ini.

Nama Jenis Deskripsi
Creating

string

Deleting

string

Failed

string

Migrating

string

Succeeded

string

Updating

string

GallerySharingPermissionTypes

Properti ini memungkinkan Anda menentukan izin berbagi galeri. Nilai yang mungkin adalah: Privat,Grup,Komunitas.

Nama Jenis Deskripsi
Community

string

Groups

string

Private

string

InnerError

Detail kesalahan dalam.

Nama Jenis Deskripsi
errordetail

string

Pesan kesalahan internal atau cadangan pengecualian.

exceptiontype

string

Jenis pengecualian.

RegionalSharingStatus

Status berbagi regional galeri

Nama Jenis Deskripsi
details

string

Detail kegagalan berbagi regional galeri.

region

string

Nama wilayah

state

SharingState

Status berbagi galeri.
Status berbagi galeri di wilayah saat ini

SharingProfile

Profil untuk berbagi galeri ke langganan atau penyewa

Nama Jenis Deskripsi
communityGalleryInfo

CommunityGalleryInfo

Informasi galeri komunitas jika galeri saat ini dibagikan ke komunitas.

groups

SharingProfileGroup[]

Daftar berbagi grup profil.

permissions

GallerySharingPermissionTypes

Properti ini memungkinkan Anda menentukan izin berbagi galeri. Nilai yang mungkin adalah: Privat,Grup,Komunitas.

SharingProfileGroup

Grup profil berbagi galeri

Nama Jenis Deskripsi
ids

string[]

Daftar id langganan/penyewa tempat galeri ditujukan untuk dibagikan.

type

SharingProfileGroupTypes

Properti ini memungkinkan Anda menentukan jenis grup berbagi. Nilai yang mungkin adalah: Langganan,AADTenants.

SharingProfileGroupTypes

Properti ini memungkinkan Anda menentukan jenis grup berbagi. Nilai yang mungkin adalah: Langganan,AADTenants.

Nama Jenis Deskripsi
AADTenants

string

Subscriptions

string

SharingState

Status berbagi galeri.

Nama Jenis Deskripsi
Failed

string

InProgress

string

Succeeded

string

Unknown

string

SharingStatus

Berbagi status galeri saat ini.

Nama Jenis Deskripsi
aggregatedState

SharingState

Status berbagi galeri.
Status berbagi agregat galeri saat ini.

summary

RegionalSharingStatus[]

Ringkasan semua status berbagi regional.

SoftDeletePolicy

Berisi informasi tentang kebijakan penghapusan sementara galeri.

Nama Jenis Deskripsi
isSoftDeleteEnabled

boolean

Memungkinkan penghapusan sementara untuk sumber daya di galeri ini, memungkinkannya dipulihkan dalam waktu retensi.