pub struct Certificates<'c, C: Config> { /* private fields */ }Expand description
Certificates enable Mutual TLS (mTLS) authentication for your organization. Manage certificates at the organization level.
Implementations§
Source§impl<'c, C: Config> Certificates<'c, C>
impl<'c, C: Config> Certificates<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn list_organization<Q>(
&self,
query: &Q,
) -> Result<ListCertificatesResponse, OpenAIError>
pub async fn list_organization<Q>( &self, query: &Q, ) -> Result<ListCertificatesResponse, OpenAIError>
List all certificates for the organization. List all certificates for the organization.
Sourcepub async fn list_organization_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_organization_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
List all certificates for the organization.
Sourcepub async fn upload_organization(
&self,
request: UploadCertificateRequest,
) -> Result<Certificate, OpenAIError>
pub async fn upload_organization( &self, request: UploadCertificateRequest, ) -> Result<Certificate, OpenAIError>
Upload a certificate to the organization. This does not automatically activate the certificate.
Sourcepub async fn activate_organization(
&self,
request: ToggleCertificatesRequest,
) -> Result<ListCertificatesResponse, OpenAIError>
pub async fn activate_organization( &self, request: ToggleCertificatesRequest, ) -> Result<ListCertificatesResponse, OpenAIError>
Activate certificates for the organization. You can atomically and idempotently activate up to 10 certificates at a time.
Sourcepub async fn deactivate_organization(
&self,
request: ToggleCertificatesRequest,
) -> Result<ListCertificatesResponse, OpenAIError>
pub async fn deactivate_organization( &self, request: ToggleCertificatesRequest, ) -> Result<ListCertificatesResponse, OpenAIError>
Deactivate certificates for the organization. You can atomically and idempotently deactivate up to 10 certificates at a time.
Sourcepub async fn retrieve(
&self,
certificate_id: &str,
) -> Result<Certificate, OpenAIError>
pub async fn retrieve( &self, certificate_id: &str, ) -> Result<Certificate, OpenAIError>
Retrieve a single certificate. Retrieve a single certificate.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
certificate_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, certificate_id: T0, ) -> Result<R, OpenAIError>
Retrieve a single certificate.
Sourcepub async fn retrieve_with_query<Q>(
&self,
certificate_id: &str,
query: &Q,
) -> Result<Certificate, OpenAIError>
pub async fn retrieve_with_query<Q>( &self, certificate_id: &str, query: &Q, ) -> Result<Certificate, OpenAIError>
Retrieve a single certificate with optional include parameters.
Sourcepub async fn modify(
&self,
certificate_id: &str,
request: ModifyCertificateRequest,
) -> Result<Certificate, OpenAIError>
pub async fn modify( &self, certificate_id: &str, request: ModifyCertificateRequest, ) -> Result<Certificate, OpenAIError>
Modify a certificate. Note that only the name can be modified. Modify a certificate. Note that only the name can be modified.
Sourcepub async fn modify_byot<T0: Display, T1: Serialize, R: DeserializeOwned>(
&self,
certificate_id: T0,
request: T1,
) -> Result<R, OpenAIError>
pub async fn modify_byot<T0: Display, T1: Serialize, R: DeserializeOwned>( &self, certificate_id: T0, request: T1, ) -> Result<R, OpenAIError>
Modify a certificate. Note that only the name can be modified.
Sourcepub async fn delete(
&self,
certificate_id: &str,
) -> Result<DeleteCertificateResponse, OpenAIError>
pub async fn delete( &self, certificate_id: &str, ) -> Result<DeleteCertificateResponse, OpenAIError>
Delete a certificate from the organization. The certificate must be inactive for the organization and all projects. Delete a certificate from the organization. The certificate must be inactive for the organization and all projects.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
certificate_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, certificate_id: T0, ) -> Result<R, OpenAIError>
Delete a certificate from the organization. The certificate must be inactive for the organization and all projects.