///GENMHASH:507A92D4DCD93CE9595A78198DEBDFCF:A779AD9340BD624EF5C1E0B1A3B5F2AF private async Task <Microsoft.Azure.Management.KeyVault.Fluent.ISecret> UpdateResourceAsync(CancellationToken cancellationToken = default(CancellationToken)) { ISecret secret = this; if (setSecretRequest != null) { secret = await CreateRawAsync(cancellationToken); } if (updateSecretRequest != null) { await vault.Client.UpdateSecretAsync( secret.Inner.SecretIdentifier.Identifier, updateSecretRequest.ContentType, updateSecretRequest.SecretAttributes, updateSecretRequest.Tags, cancellationToken); } await RefreshAsync(cancellationToken); setSecretRequest = null; updateSecretRequest = new UpdateSecretRequest { VaultBaseUrl = vault.VaultUri, SecretName = Name }; return(this); }
///GENMHASH:743674BDED1D329950DDBCB5D7E876E0:D0DF29AB717FE4F5696B6850352CF76F public SecretImpl WithValue(string value) { setSecretRequest = new SetSecretRequest { VaultBaseUrl = vault.VaultUri, SecretName = Name, Value = value }; return(this); }
private async Task <ISecret> CreateRawAsync(CancellationToken cancellationToken = default(CancellationToken)) { SetInner(await vault.Client.SetSecretAsync( setSecretRequest.VaultBaseUrl, setSecretRequest.SecretName, setSecretRequest.Value, setSecretRequest.Tags, setSecretRequest.ContentType, setSecretRequest.SecretAttributes, cancellationToken)); setSecretRequest = null; updateSecretRequest = new UpdateSecretRequest { VaultBaseUrl = vault.VaultUri, SecretName = Name }; return(this); }