/// <summary> /// Adds a new attestation policy certificate to the set of policy management /// certificates. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='tenantBaseUrl'> /// The tenant name, for example https://mytenant.attest.azure.net. /// </param> /// <param name='policyCertificateToAdd'> /// An RFC7519 JSON Web Token containing a claim named "aas-policyCertificate" /// whose value is an RFC7517 JSON Web Key which specifies a new key to add. /// The RFC7519 JWT must be signed with one of the existing signing /// certificates /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task<object> AddAsync(this IPolicyCertificatesOperations operations, string tenantBaseUrl, string policyCertificateToAdd, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddWithHttpMessagesAsync(tenantBaseUrl, policyCertificateToAdd, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
/// <summary> /// Retrieves the set of certificates used to express policy for the current /// tenant. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='tenantBaseUrl'> /// The tenant name, for example https://mytenant.attest.azure.net. /// </param> public static object Get(this IPolicyCertificatesOperations operations, string tenantBaseUrl) { return operations.GetAsync(tenantBaseUrl).GetAwaiter().GetResult(); }
/// <summary> /// Adds a new attestation policy certificate to the set of policy management /// certificates. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='tenantBaseUrl'> /// The tenant name, for example https://mytenant.attest.azure.net. /// </param> /// <param name='policyCertificateToAdd'> /// An RFC7519 JSON Web Token containing a claim named "aas-policyCertificate" /// whose value is an RFC7517 JSON Web Key which specifies a new key to add. /// The RFC7519 JWT must be signed with one of the existing signing /// certificates /// </param> public static object Add(this IPolicyCertificatesOperations operations, string tenantBaseUrl, string policyCertificateToAdd) { return operations.AddAsync(tenantBaseUrl, policyCertificateToAdd).GetAwaiter().GetResult(); }
/// <summary> /// Removes the specified policy management certificate. Note that the final /// policy management certificate cannot be removed. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='tenantBaseUrl'> /// The tenant name, for example https://mytenant.attest.azure.net. /// </param> /// <param name='policyCertificateToRemove'> /// An RFC7519 JSON Web Token containing a claim named "aas-policyCertificate" /// whose value is an RFC7517 JSON Web Key which specifies a new key to update. /// The RFC7519 JWT must be signed with one of the existing signing /// certificates /// </param> public static object Remove(this IPolicyCertificatesOperations operations, string tenantBaseUrl, string policyCertificateToRemove) { return operations.RemoveAsync(tenantBaseUrl, policyCertificateToRemove).GetAwaiter().GetResult(); }