次の方法で共有


SshPublicKeyCollection.CreateOrUpdate Method

Definition

Creates a new SSH public key resource.

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

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.

sshPublicKeyName
String

The name of the SSH public key.

data
SshPublicKeyData

Parameters supplied to create the SSH public key.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

sshPublicKeyName or data is null.

Applies to