共用方式為


GalleryCollection.CreateOrUpdate Method

Definition

Create or update a Shared Image Gallery.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}
  • Operation Id: Galleries_CreateOrUpdate
  • Default Api Version: 2023-07-03
  • Resource: GalleryResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.GalleryResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string galleryName, Azure.ResourceManager.Compute.GalleryData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Compute.GalleryData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.GalleryResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Compute.GalleryData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.GalleryResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, galleryName As String, data As GalleryData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of GalleryResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

galleryName
String

The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters.

data
GalleryData

Parameters supplied to the create or update Shared Image Gallery operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

galleryName is an empty string, and was expected to be non-empty.

galleryName or data is null.

Applies to