Share via


KeyVaultClient.CreateKeyAsync Method (String, String, String, Nullable<Int32>, String[], KeyAttributes, Dictionary<String, String>, CancellationToken)

 

Asynchronously creates a new, named, key in the specified vault.

Namespace:   Microsoft.Azure.KeyVault
Assembly:  Microsoft.Azure.KeyVault (in Microsoft.Azure.KeyVault.dll)

Syntax

public Task<KeyBundle> CreateKeyAsync(
    string vault,
    string keyName,
    string keyType,
    Nullable<int> keySize = null,
    string[] key_ops = null,
    KeyAttributes keyAttributes = null,
    Dictionary<string, string> tags = null,
    CancellationToken cancellationToken = null
)
public:
Task<KeyBundle^>^ CreateKeyAsync(
    String^ vault,
    String^ keyName,
    String^ keyType,
    Nullable<int> keySize = null,
    array<String^>^ key_ops = null,
    KeyAttributes^ keyAttributes = null,
    Dictionary<String^, String^>^ tags = null,
    CancellationToken cancellationToken = null
)
member CreateKeyAsync : 
        vault:string *
        keyName:string *
        keyType:string *
        keySize:Nullable<int> = null *
        key_ops:string[] = null *
        keyAttributes:KeyAttributes = null *
        tags:Dictionary<string, string> = null *
        cancellationToken:CancellationToken = null -> Task<KeyBundle>
Public Function CreateKeyAsync (
    vault As String,
    keyName As String,
    keyType As String,
    keySize As Nullable(Of Integer),
    key_ops As String(),
    keyAttributes As KeyAttributes,
    tags As Dictionary(Of String, String),
    cancellationToken As CancellationToken
) As Task(Of KeyBundle)

Parameters

  • vault
    Type: System.String

    The URL for the vault in which the key is to be created.

Return Value

Type: System.Threading.Tasks.Task<KeyBundle>

The key bundle containing the result of the create request.

See Also

KeyVaultClient Class
Microsoft.Azure.KeyVault Namespace

Return to top