public KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule) { if (subscriptionId == null) { throw new ArgumentNullException(nameof(subscriptionId)); } if (resourceGroupName == null) { throw new ArgumentNullException(nameof(resourceGroupName)); } if (vaultName == null) { throw new ArgumentNullException(nameof(vaultName)); } if (secretName == null) { throw new ArgumentNullException(nameof(secretName)); } SourceType = sourceType; SubscriptionId = subscriptionId; ResourceGroupName = resourceGroupName; VaultName = vaultName; SecretName = secretName; UpdateRule = updateRule; DeleteRule = deleteRule; }
internal static KeyVaultCertificateSource DeserializeKeyVaultCertificateSource(JsonElement element) { KeyVaultCertificateSourceType typeName = default; string subscriptionId = default; string resourceGroupName = default; string vaultName = default; string secretName = default; Optional <string> secretVersion = default; CertificateUpdateAction updateRule = default; CertificateDeleteAction deleteRule = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("typeName")) { typeName = new KeyVaultCertificateSourceType(property.Value.GetString()); continue; } if (property.NameEquals("subscriptionId")) { subscriptionId = property.Value.GetString(); continue; } if (property.NameEquals("resourceGroupName")) { resourceGroupName = property.Value.GetString(); continue; } if (property.NameEquals("vaultName")) { vaultName = property.Value.GetString(); continue; } if (property.NameEquals("secretName")) { secretName = property.Value.GetString(); continue; } if (property.NameEquals("secretVersion")) { secretVersion = property.Value.GetString(); continue; } if (property.NameEquals("updateRule")) { updateRule = new CertificateUpdateAction(property.Value.GetString()); continue; } if (property.NameEquals("deleteRule")) { deleteRule = new CertificateDeleteAction(property.Value.GetString()); continue; } } return(new KeyVaultCertificateSource(typeName, subscriptionId, resourceGroupName, vaultName, secretName, secretVersion.Value, updateRule, deleteRule)); }
internal KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, string secretVersion, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule) { SourceType = sourceType; SubscriptionId = subscriptionId; ResourceGroupName = resourceGroupName; VaultName = vaultName; SecretName = secretName; SecretVersion = secretVersion; UpdateRule = updateRule; DeleteRule = deleteRule; }