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.StringThe URL for the vault in which the key is to be created.
keyName
Type: System.StringThe name for the key.
keyType
Type: System.StringThe type of key to create. For valid key types, see JsonWebKeyType.
keySize
Type: System.Nullable<Int32>The attributes of the key. For more information on possible attributes, see KeyAttributes.
key_ops
Type: System.String[]The size of the key.
keyAttributes
Type: Microsoft.Azure.KeyVault.KeyAttributesThe JSON web key operations. For more information, see JsonWebKeyOperation.
tags
Type: System.Collections.Generic.Dictionary<String, String>The application-specific metadata in the form of key-value pairs.
cancellationToken
Type: System.Threading.CancellationTokenOptional cancellation token.
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