SshPublicKeyCollection.CreateOrUpdate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.