Пример #1
0
        /// <summary>
        /// Verifies whether the identifier belongs to a key vault certificate operation.
        /// </summary>
        /// <param name="identifier">The key vault certificate operation identifier.</param>
        /// <returns>True if the identifier belongs to a key vault certificate operation. False otherwise.</returns>
        public static bool IsCertificateOperationIdentifier(string identifier)
        {
            var isValid = ObjectIdentifier.IsObjectIdentifier("certificates", identifier);

            Uri baseUri = new Uri(identifier, UriKind.Absolute);

            // 4 segments: host + "certificates" + name + "pending"
            if (baseUri.Segments.Length != 4)
            {
                isValid = false;
            }

            if (!string.Equals(baseUri.Segments[3], "pending"))
            {
                isValid = false;
            }

            return(isValid);
        }
Пример #2
0
 public static bool IsSecretIdentifier(string identifier)
 {
     return(ObjectIdentifier.IsObjectIdentifier("secrets", identifier));
 }
Пример #3
0
 public static bool IsKeyIdentifier(string identifier)
 {
     return(ObjectIdentifier.IsObjectIdentifier("keys", identifier));
 }
Пример #4
0
 /// <summary>
 /// Verifies whether the identifier belongs to a key vault certificate.
 /// </summary>
 /// <param name="identifier">The key vault certificate identifier.</param>
 /// <returns>True if the identifier belongs to a key vault certificate. False otherwise.</returns>
 public static bool IsCertificateIdentifier(string identifier)
 {
     return(ObjectIdentifier.IsObjectIdentifier("certificates", identifier));
 }
Пример #5
0
 /// <summary>
 /// Verifies whether the identifier belongs to a key vault storage account.
 /// </summary>
 /// <param name="identifier">The key vault storage account identifier.</param>
 /// <returns>True if the identifier belongs to a key vault storage account. False otherwise.</returns>
 public static bool IsStorageAccountIdentifier(string identifier)
 {
     return(ObjectIdentifier.IsObjectIdentifier("storage", identifier));
 }
Пример #6
0
 /// <summary>
 /// Verifies whether the identifier belongs to a key vault deleted secret.
 /// </summary>
 /// <param name="identifier">The key vault secret identifier.</param>
 /// <returns>True if the identifier belongs to a key vault deleted secret. False otherwise.</returns>
 public static bool IsDeletedSecretIdentifier(string identifier)
 {
     return(ObjectIdentifier.IsObjectIdentifier("deletedsecrets", identifier));
 }
Пример #7
0
 /// <summary>
 /// Verifies whether the identifier belongs to a key vault deleted key.
 /// </summary>
 /// <param name="identifier">The key vault deleted key identifier.</param>
 /// <returns>True if the identifier belongs to a key vault deleted key. False otherwise.</returns>
 public static bool IsDeletedKeyIdentifier(string identifier)
 {
     return(ObjectIdentifier.IsObjectIdentifier("deletedkeys", identifier));
 }