Share via


NginxDeploymentApiKeyCollection.CreateOrUpdateAsync Method

Definition

Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}
  • Operation Id: ApiKeys_CreateOrUpdate
  • Default Api Version: 2024-11-01-preview
  • Resource: NginxDeploymentApiKeyResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string apiKeyName, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, apiKeyName As String, content As NginxDeploymentApiKeyCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of NginxDeploymentApiKeyResource))

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.

apiKeyName
String

The resource name of the API key.

content
NginxDeploymentApiKeyCreateOrUpdateContent

The API Key object containing fields (e.g. secret text, expiration date) to upsert the key.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

apiKeyName or content is null.

Applies to