/// <summary> /// Get group information. /// </summary> /// <remarks> /// A trust group has a root certificate which issues certificates to entities. /// Entities can be part of a trust group and thus trust the root certificate /// and all entities that the root has issued certificates for. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TrustGroupRegistrationApiModel> GetGroupAsync(this IAzureOpcVaultClient operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetGroupWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the status. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <StatusResponseApiModel> GetStatusAsync(this IAzureOpcVaultClient operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetStatusWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a specific certificate request. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestId'> /// The certificate request id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CertificateRequestRecordApiModel> GetRequestAsync(this IAzureOpcVaultClient operations, string requestId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetRequestWithHttpMessagesAsync(requestId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get Issuer CA CRL chain. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='serialNumber'> /// the serial number of the Issuer CA Certificate /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <X509CrlChainApiModel> GetIssuerCrlChainAsync(this IAzureOpcVaultClient operations, string serialNumber, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetIssuerCrlChainWithHttpMessagesAsync(serialNumber, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update group registration. /// </summary> /// <remarks> /// Use this function with care and only if you are aware of the security /// implications. Requires manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='body'> /// The group configuration /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateGroupAsync(this IAzureOpcVaultClient operations, string groupId, TrustGroupUpdateRequestApiModel body, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateGroupWithHttpMessagesAsync(groupId, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Fetch certificate request result. /// </summary> /// <remarks> /// Can be called in any state. Fetches private key in 'Completed' state. After /// a successful fetch in 'Completed' state, the request is moved into /// 'Accepted' state. Requires Writer role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <FinishNewKeyPairRequestResponseApiModel> FinishNewKeyPairRequestAsync(this IAzureOpcVaultClient operations, string requestId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.FinishNewKeyPairRequestWithHttpMessagesAsync(requestId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get Issuer Certificate for Authority Information /// Access endpoint. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='serialNumber'> /// </param> public static string GetIssuerCertificateChain1(this IAzureOpcVaultClient operations, string serialNumber) { return(operations.GetIssuerCertificateChain1Async(serialNumber).GetAwaiter().GetResult()); }
/// <summary> /// Add trust relationship /// </summary> /// <remarks> /// Define trust between two entities. The entities are identifiers of /// application, groups, or endpoints. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='entityId'> /// The entity identifier, e.g. group, etc. /// </param> /// <param name='trustedEntityId'> /// The trusted entity identifier /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AddTrustRelationshipAsync(this IAzureOpcVaultClient operations, string entityId, string trustedEntityId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AddTrustRelationshipWithHttpMessagesAsync(entityId, trustedEntityId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Renew a group CA Certificate. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RenewIssuerCertificateAsync(this IAzureOpcVaultClient operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.RenewIssuerCertificateWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Create new root group. /// </summary> /// <remarks> /// Requires manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The create request /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TrustGroupRegistrationResponseApiModel> CreateRootAsync(this IAzureOpcVaultClient operations, TrustGroupRootCreateRequestApiModel body, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateRootWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete a group. /// </summary> /// <remarks> /// After this operation the Issuer CA, CRLs and keys become inaccessible. Use /// this function with extreme caution. Requires manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteGroupAsync(this IAzureOpcVaultClient operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteGroupWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists certificate requests. /// </summary> /// <remarks> /// Get all certificate requests in paged form or continue a current listing or /// query. The returned model can contain a link to the next page if more /// results are available. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// optional, link to next page /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> public static CertificateRequestQueryResponseApiModel ListRequests(this IAzureOpcVaultClient operations, string nextPageLink = default(string), int?pageSize = default(int?)) { return(operations.ListRequestsAsync(nextPageLink, pageSize).GetAwaiter().GetResult()); }
/// <summary> /// Query for certificate requests. /// </summary> /// <remarks> /// Get all certificate requests in paged form. The returned model can contain /// a link to the next page if more results are available. Use ListRequests to /// continue. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> /// <param name='body'> /// optional, query filter /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CertificateRequestQueryResponseApiModel> QueryRequestsAsync(this IAzureOpcVaultClient operations, int?pageSize = default(int?), CertificateRequestQueryRequestApiModel body = default(CertificateRequestQueryRequestApiModel), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.QueryRequestsWithHttpMessagesAsync(pageSize, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query for certificate requests. /// </summary> /// <remarks> /// Get all certificate requests in paged form. The returned model can contain /// a link to the next page if more results are available. Use ListRequests to /// continue. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> /// <param name='body'> /// optional, query filter /// </param> public static CertificateRequestQueryResponseApiModel QueryRequests(this IAzureOpcVaultClient operations, int?pageSize = default(int?), CertificateRequestQueryRequestApiModel body = default(CertificateRequestQueryRequestApiModel)) { return(operations.QueryRequestsAsync(pageSize, body).GetAwaiter().GetResult()); }
/// <summary> /// Get a specific certificate request. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestId'> /// The certificate request id /// </param> public static CertificateRequestRecordApiModel GetRequest(this IAzureOpcVaultClient operations, string requestId) { return(operations.GetRequestAsync(requestId).GetAwaiter().GetResult()); }
/// <summary> /// Delete request. Physically delete the request. /// </summary> /// <remarks> /// By purging the request it is actually physically deleted from the database, /// including the public key and other information. Requires Manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestId'> /// The certificate request id /// </param> public static void DeleteRequest(this IAzureOpcVaultClient operations, string requestId) { operations.DeleteRequestAsync(requestId).GetAwaiter().GetResult(); }
/// <summary> /// Cancel request /// </summary> /// <remarks> /// The request is in the 'Accepted' state after this call. Requires Writer /// role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestId'> /// The certificate request id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AcceptRequestAsync(this IAzureOpcVaultClient operations, string requestId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AcceptRequestWithHttpMessagesAsync(requestId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists certificate requests. /// </summary> /// <remarks> /// Get all certificate requests in paged form or continue a current listing or /// query. The returned model can contain a link to the next page if more /// results are available. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// optional, link to next page /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CertificateRequestQueryResponseApiModel> ListRequestsAsync(this IAzureOpcVaultClient operations, string nextPageLink = default(string), int?pageSize = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListRequestsWithHttpMessagesAsync(nextPageLink, pageSize, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete a group. /// </summary> /// <remarks> /// After this operation the Issuer CA, CRLs and keys become inaccessible. Use /// this function with extreme caution. Requires manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> public static void DeleteGroup(this IAzureOpcVaultClient operations, string groupId) { operations.DeleteGroupAsync(groupId).GetAwaiter().GetResult(); }
/// <summary> /// Get information about all groups. /// </summary> /// <remarks> /// A trust group has a root certificate which issues certificates to entities. /// Entities can be part of a trust group and thus trust the root certificate /// and all entities that the root has issued certificates for. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// optional, link to next page /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> public static TrustGroupRegistrationListApiModel ListGroups(this IAzureOpcVaultClient operations, string nextPageLink = default(string), int?pageSize = default(int?)) { return(operations.ListGroupsAsync(nextPageLink, pageSize).GetAwaiter().GetResult()); }
/// <summary> /// Create new root group. /// </summary> /// <remarks> /// Requires manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The create request /// </param> public static TrustGroupRegistrationResponseApiModel CreateRoot(this IAzureOpcVaultClient operations, TrustGroupRootCreateRequestApiModel body) { return(operations.CreateRootAsync(body).GetAwaiter().GetResult()); }
/// <summary> /// Get Issuer CA CRL chain. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='serialNumber'> /// the serial number of the Issuer CA Certificate /// </param> public static X509CrlChainApiModel GetIssuerCrlChain(this IAzureOpcVaultClient operations, string serialNumber) { return(operations.GetIssuerCrlChainAsync(serialNumber).GetAwaiter().GetResult()); }
/// <summary> /// Renew a group CA Certificate. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// </param> public static void RenewIssuerCertificate(this IAzureOpcVaultClient operations, string groupId) { operations.RenewIssuerCertificateAsync(groupId).GetAwaiter().GetResult(); }
/// <summary> /// Get group information. /// </summary> /// <remarks> /// A trust group has a root certificate which issues certificates to entities. /// Entities can be part of a trust group and thus trust the root certificate /// and all entities that the root has issued certificates for. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> public static TrustGroupRegistrationApiModel GetGroup(this IAzureOpcVaultClient operations, string groupId) { return(operations.GetGroupAsync(groupId).GetAwaiter().GetResult()); }
/// <summary> /// Add trust relationship /// </summary> /// <remarks> /// Define trust between two entities. The entities are identifiers of /// application, groups, or endpoints. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='entityId'> /// The entity identifier, e.g. group, etc. /// </param> /// <param name='trustedEntityId'> /// The trusted entity identifier /// </param> public static void AddTrustRelationship(this IAzureOpcVaultClient operations, string entityId, string trustedEntityId) { operations.AddTrustRelationshipAsync(entityId, trustedEntityId).GetAwaiter().GetResult(); }
/// <summary> /// Create a certificate request with a new key pair. /// </summary> /// <remarks> /// The request is in the 'New' state after this call. Requires Writer or /// Manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The new key pair request parameters /// </param> public static StartNewKeyPairRequestResponseApiModel StartNewKeyPairRequest(this IAzureOpcVaultClient operations, StartNewKeyPairRequestApiModel body) { return(operations.StartNewKeyPairRequestAsync(body).GetAwaiter().GetResult()); }
/// <summary> /// List trusted certificates /// </summary> /// <remarks> /// Returns all certificates the entity should trust based on the applied trust /// configuration. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='entityId'> /// </param> /// <param name='nextPageLink'> /// optional, link to next page /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> public static X509CertificateListApiModel ListTrustedCertificates(this IAzureOpcVaultClient operations, string entityId, string nextPageLink = default(string), int?pageSize = default(int?)) { return(operations.ListTrustedCertificatesAsync(entityId, nextPageLink, pageSize).GetAwaiter().GetResult()); }
/// <summary> /// Update group registration. /// </summary> /// <remarks> /// Use this function with care and only if you are aware of the security /// implications. Requires manager role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='body'> /// The group configuration /// </param> public static void UpdateGroup(this IAzureOpcVaultClient operations, string groupId, TrustGroupUpdateRequestApiModel body) { operations.UpdateGroupAsync(groupId, body).GetAwaiter().GetResult(); }
/// <summary> /// List trusted certificates /// </summary> /// <remarks> /// Returns all certificates the entity should trust based on the applied trust /// configuration. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='entityId'> /// </param> /// <param name='nextPageLink'> /// optional, link to next page /// </param> /// <param name='pageSize'> /// optional, the maximum number of result per page /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <X509CertificateListApiModel> ListTrustedCertificatesAsync(this IAzureOpcVaultClient operations, string entityId, string nextPageLink = default(string), int?pageSize = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListTrustedCertificatesWithHttpMessagesAsync(entityId, nextPageLink, pageSize, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Fetch certificate request result. /// </summary> /// <remarks> /// Can be called in any state. Fetches private key in 'Completed' state. After /// a successful fetch in 'Completed' state, the request is moved into /// 'Accepted' state. Requires Writer role. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestId'> /// </param> public static FinishNewKeyPairRequestResponseApiModel FinishNewKeyPairRequest(this IAzureOpcVaultClient operations, string requestId) { return(operations.FinishNewKeyPairRequestAsync(requestId).GetAwaiter().GetResult()); }