Galleries - Create Or Update

Skapa eller uppdatera en Shared Image Gallery.

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

URI-parametrar

Name I Obligatorisk Typ Description
galleryName
path True

string

Namnet på Shared Image Gallery. De tillåtna tecknen är alfabet och siffror med punkter och punkter som tillåts i mitten. Den maximala längden är 80 tecken.

resourceGroupName
path True

string

Namnet på resursgruppen.

subscriptionId
path True

string

Prenumerationsautentiseringsuppgifter som unikt identifierar Microsoft Azure-prenumeration. Prenumerations-ID:t utgör en del av URI:n för varje tjänstanrop.

api-version
query True

string

Klient-API-version.

Begärandetext

Name Obligatorisk Typ Description
location True

string

Resursplats

properties.description

string

Beskrivningen av den här Shared Image Gallery resursen. 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 principen för mjuk borttagning i galleriet.

tags

object

Resurstaggar

Svar

Name Typ Description
200 OK

Gallery

OK

201 Created

Gallery

Skapad

202 Accepted

Gallery

Har godkänts

Other Status Codes

CloudError

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

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

Definitioner

Name Description
ApiError

API-fel.

ApiErrorBase

Api-felbas.

CloudError

Ett felsvar från Beräkningstjänsten.

CommunityGalleryInfo

Information om communitygalleriet om det aktuella galleriet delas till communityn

Gallery

Anger information om Shared Image Gallery som du vill skapa eller uppdatera.

GalleryIdentifier

Beskriver galleriets unika namn.

GalleryProvisioningState

Det aktuella tillståndet för galleriet eller galleriartefakten.

GallerySharingPermissionTypes

Med den här egenskapen kan du ange behörigheten för delningsgalleriet. Möjliga värden är: Privat,Grupper,Community.

InnerError

Inre felinformation.

RegionalSharingStatus

Galleri regional delningsstatus

SharingProfile

Profil för galleridelning till prenumeration eller klientorganisation

SharingProfileGroup

Grupp för galleridelningsprofilen

SharingProfileGroupTypes

Med den här egenskapen kan du ange typen av delningsgrupp. Möjliga värden är: Prenumerationer,AADTenants.

SharingState

Delningstillståndet för galleriet.

SharingStatus

Delningsstatus för det aktuella galleriet.

SoftDeletePolicy

Innehåller information om principen för mjuk borttagning i galleriet.

ApiError

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

Api-felbas.

Name Typ Description
code

string

Felkoden.

message

string

Felmeddelandet.

target

string

Målet för det specifika felet.

CloudError

Ett felsvar från Beräkningstjänsten.

Name Typ Description
error

ApiError

API-fel.

CommunityGalleryInfo

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

Anger information om Shared Image Gallery som du vill skapa eller uppdatera.

Name Typ Description
id

string

Resurs-ID

location

string

Resursplats

name

string

Resursnamn

properties.description

string

Beskrivningen av den här Shared Image Gallery resursen. Den här egenskapen är uppdaterad.

properties.identifier

GalleryIdentifier

Beskriver galleriets unika namn.

properties.provisioningState

GalleryProvisioningState

Det aktuella tillståndet för galleriet eller galleriartefakten.
Etableringstillståndet, som bara visas i svaret.

properties.sharingProfile

SharingProfile

Profil för galleridelning till prenumeration eller klientorganisation

properties.sharingStatus

SharingStatus

Delningsstatus för det aktuella galleriet.

properties.softDeletePolicy

SoftDeletePolicy

Innehåller information om principen för mjuk borttagning i galleriet.

tags

object

Resurstaggar

type

string

Resurstyp

GalleryIdentifier

Beskriver galleriets unika namn.

Name Typ Description
uniqueName

string

Det unika namnet på Shared Image Gallery. Det här namnet genereras automatiskt av Azure.

GalleryProvisioningState

Det aktuella tillståndet för galleriet eller galleriartefakten.

Name Typ Description
Creating

string

Deleting

string

Failed

string

Migrating

string

Succeeded

string

Updating

string

GallerySharingPermissionTypes

Med den här egenskapen kan du ange behörigheten för delningsgalleriet. Möjliga värden är: Privat,Grupper,Community.

Name Typ Description
Community

string

Groups

string

Private

string

InnerError

Inre felinformation.

Name Typ Description
errordetail

string

Det interna felmeddelandet eller undantagsdumpen.

exceptiontype

string

Undantagstypen.

RegionalSharingStatus

Galleri regional delningsstatus

Name Typ Description
details

string

Information om fel vid regional delning i galleriet.

region

string

Regionsnamn

state

SharingState

Delningstillståndet för galleriet.
Delningstillstånd för gallerier i den aktuella regionen

SharingProfile

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: Privat,Grupper,Community.

SharingProfileGroup

Grupp för galleridelningsprofilen

Name Typ Description
ids

string[]

En lista över prenumerations-/klient-ID:t som galleriet ska delas med.

type

SharingProfileGroupTypes

Med den här egenskapen kan du ange typen av delningsgrupp. Möjliga värden är: Prenumerationer,AADTenants.

SharingProfileGroupTypes

Med den här egenskapen kan du ange typen av delningsgrupp. Möjliga värden är: Prenumerationer,AADTenants.

Name Typ Description
AADTenants

string

Subscriptions

string

SharingState

Delningstillståndet för galleriet.

Name Typ Description
Failed

string

InProgress

string

Succeeded

string

Unknown

string

SharingStatus

Delningsstatus för det aktuella galleriet.

Name Typ Description
aggregatedState

SharingState

Delningstillståndet för galleriet.
Aggregerat delningstillstånd för det aktuella galleriet.

summary

RegionalSharingStatus[]

Sammanfattning av all regional delningsstatus.

SoftDeletePolicy

Innehåller information om principen för mjuk borttagning i galleriet.

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.