KeyVaultClient.CreateKeyWithHttpMessagesAsync Método

Definição

Cria uma nova chave, armazena-a, retorna os parâmetros e atributos de chave para o cliente.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>> CreateKeyWithHttpMessagesAsync (string vaultBaseUrl, string keyName, string kty, int? keySize = default, System.Collections.Generic.IList<string> keyOps = default, Microsoft.Azure.KeyVault.Models.KeyAttributes keyAttributes = default, System.Collections.Generic.IDictionary<string,string> tags = default, string curve = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateKeyWithHttpMessagesAsync : string * string * string * Nullable<int> * System.Collections.Generic.IList<string> * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.IDictionary<string, string> * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>>
override this.CreateKeyWithHttpMessagesAsync : string * string * string * Nullable<int> * System.Collections.Generic.IList<string> * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.IDictionary<string, string> * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>>
Public Function CreateKeyWithHttpMessagesAsync (vaultBaseUrl As String, keyName As String, kty As String, Optional keySize As Nullable(Of Integer) = Nothing, Optional keyOps As IList(Of String) = Nothing, Optional keyAttributes As KeyAttributes = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional curve As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of KeyBundle))

Parâmetros

vaultBaseUrl
String

O nome do cofre, por exemplo https://myvault.vault.azure.net, .

keyName
String

O nome da nova chave. O sistema gerará o nome da versão para a nova chave.

kty
String

Tipo de chave a ser criado. Para obter valores válidos, consulte JsonWebKeyType. Os valores possíveis incluem: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'

keySize
Nullable<Int32>

O tamanho da chave em bytes. Por exemplo, 1024 ou 2048.

keyOps
IList<String>
keyAttributes
KeyAttributes
tags
IDictionary<String,String>

Metadados específicos do aplicativo na forma de pares chave-valor.

curve
String

Nome da curva elíptica. Para obter valores válidos, consulte JsonWebKeyCurveName. Os valores possíveis incluem: 'P-256', 'P-384', 'P-521', 'SECP256K1'

customHeaders
Dictionary<String,List<String>>

Cabeçalhos que serão adicionados à solicitação.

cancellationToken
CancellationToken

O token de cancelamento.

Retornos

Implementações

Exceções

Gerada quando a operação retornou um código de status inválido

Gerada quando não é possível desserializar a resposta

Gerado quando um parâmetro necessário é nulo

Gerado quando um parâmetro necessário é nulo

Comentários

A operação criar chave pode ser usada para criar qualquer tipo de chave no Azure Key Vault. Se a chave denominada já existir, o Cofre de Chaves do Azure criará uma nova versão da chave. Ele requer a permissão de criação/chaves.

Aplica-se a