Dela via


Galleries - Create Or Update

Skapa eller uppdatera ett delat bildgalleri.

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

URI-parametrar

Name I Obligatorisk Typ Description
galleryName
path True

string

Namnet på det delade bildgalleriet. 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

identity

GalleryIdentity

Galleriets identitet, om den är konfigurerad.

properties.description

string

Beskrivningen av den här resursen för delat bildgalleri. 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 galleriets princip för mjuk borttagning.

tags

object

Resurstaggar

Svar

Name Typ Description
200 OK

Gallery

OKEJ

201 Created

Gallery

Skapad

202 Accepted

Gallery

Accepterad

Other Status Codes

CloudError

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

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow

Typ: oauth2
Flow: implicit
Auktoriseringswebbadress: https://login.microsoftonline.com/common/oauth2/authorize

Omfattningar

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 with system-assigned and user-assigned managed identities.
Create or update a simple gallery.

Create a community gallery.

Exempelbegäran

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

Exempelsvar

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

Exempelbegäran

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

Exempelsvar

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

Exempelbegäran

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

Exempelsvar

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

Exempelbegäran

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

Exempelsvar

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

Exempelbegäran

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

Exempelsvar

{
  "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 Compute-tjänsten.

CommunityGalleryInfo

Information om communitygalleriet om det aktuella galleriet delas till communityn

Gallery

Anger information om det delade bildgalleriet som du vill skapa eller uppdatera.

GalleryIdentifier

Beskriver galleriets unika namn.

GalleryIdentity

Identitet för den virtuella datorn.

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: Private,Groups,Community.

InnerError

Inre felinformation.

RegionalSharingStatus

Galleri regional delningsstatus

ResourceIdentityType

Den typ av identitet som används för galleriet. Typen "SystemAssigned, UserAssigned" innehåller både en implicit skapad identitet och en uppsättning användartilldelade identiteter. Typen "Ingen" tar bort alla identiteter från galleriet.

SharingProfile

Profil för galleridelning till prenumeration eller klientorganisation

SharingProfileGroup

Grupp av 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 aktuellt galleri.

SoftDeletePolicy

Innehåller information om galleriets princip för mjuk borttagning.

UserAssignedIdentities

Listan över användaridentiteter som är associerade med den virtuella datorn. Nyckelreferenserna för användaridentitetsordlistan är ARM-resurs-ID:er i formuläret: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

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 Compute-tjä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 det gallerinamn 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 det delade bildgalleriet som du vill skapa eller uppdatera.

Name Typ Description
id

string

Resurs-ID

identity

GalleryIdentity

Galleriets identitet, om den är konfigurerad.

location

string

Resursplats

name

string

Resursnamn

properties.description

string

Beskrivningen av den här resursen för delat bildgalleri. 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 aktuellt galleri.

properties.softDeletePolicy

SoftDeletePolicy

Innehåller information om galleriets princip för mjuk borttagning.

tags

object

Resurstaggar

type

string

Resurstyp

GalleryIdentifier

Beskriver galleriets unika namn.

Name Typ Description
uniqueName

string

Det unika namnet på det delade bildgalleriet. Det här namnet genereras automatiskt av Azure.

GalleryIdentity

Identitet för den virtuella datorn.

Name Typ Description
principalId

string

Huvud-ID:t för galleriidentiteten. Den här egenskapen tillhandahålls endast för en systemtilldelad identitet.

tenantId

string

AAD-klient-ID för galleriidentiteten. Den här egenskapen tillhandahålls endast för en systemtilldelad identitet.

type

ResourceIdentityType

Den typ av identitet som används för galleriet. Typen "SystemAssigned, UserAssigned" innehåller både en implicit skapad identitet och en uppsättning användartilldelade identiteter. Typen "Ingen" tar bort alla identiteter från galleriet.

userAssignedIdentities

UserAssignedIdentities

Listan över användaridentiteter som är associerade med galleriet. Nyckelreferenserna för användaridentitetsordlistan är ARM-resurs-ID:er i formuläret: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

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: Private,Groups,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

Regionnamn

state

SharingState

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

ResourceIdentityType

Den typ av identitet som används för galleriet. Typen "SystemAssigned, UserAssigned" innehåller både en implicit skapad identitet och en uppsättning användartilldelade identiteter. Typen "Ingen" tar bort alla identiteter från galleriet.

Name Typ Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

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: Private,Groups,Community.

SharingProfileGroup

Grupp av 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 aktuellt galleri.

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 galleriets princip för mjuk borttagning.

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.

UserAssignedIdentities

Listan över användaridentiteter som är associerade med den virtuella datorn. Nyckelreferenserna för användaridentitetsordlistan är ARM-resurs-ID:er i formuläret: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Name Typ Description