pub struct UploadCertificate<'a> {
pub region: Option<&'a str>,
pub certificate_public_key: &'a str,
pub certificate_private_key: Option<&'a str>,
pub certificate_type: Option<CertificateType<'a>>,
pub alias: Option<&'a str>,
pub project_id: Option<u64>,
pub certificate_use: Option<CertificateUse<'a>>,
pub tags: Option<Vec<Tag<'a>>>,
pub repeatable: Option<bool>,
pub key_password: Option<&'a str>,
}Expand description
Request payload for UploadCertificate.
Fieldsยง
ยงregion: Option<&'a str>ยงcertificate_public_key: &'a strยงcertificate_private_key: Option<&'a str>ยงcertificate_type: Option<CertificateType<'a>>ยงalias: Option<&'a str>ยงproject_id: Option<u64>ยงcertificate_use: Option<CertificateUse<'a>>ยงrepeatable: Option<bool>ยงkey_password: Option<&'a str>Implementationsยง
Sourceยงimpl<'a> UploadCertificate<'a>
impl<'a> UploadCertificate<'a>
Sourcepub fn new(certificate_public_key: &'a str) -> Self
pub fn new(certificate_public_key: &'a str) -> Self
Create a new upload certificate request with the required public key.
Sourcepub fn with_region(self, region: &'a str) -> Self
pub fn with_region(self, region: &'a str) -> Self
Set the region (not required according to documentation, but kept for consistency).
Sourcepub fn with_private_key(self, private_key: &'a str) -> Self
pub fn with_private_key(self, private_key: &'a str) -> Self
Set the private key (required for SVR certificates).
Sourcepub fn with_certificate_type(self, cert_type: &'a str) -> Self
pub fn with_certificate_type(self, cert_type: &'a str) -> Self
Set the certificate type (CA or SVR).
Sourcepub fn with_alias(self, alias: &'a str) -> Self
pub fn with_alias(self, alias: &'a str) -> Self
Set an alias/name for the certificate.
Sourcepub fn with_project_id(self, project_id: u64) -> Self
pub fn with_project_id(self, project_id: u64) -> Self
Set the project ID.
Sourcepub fn with_certificate_use(self, cert_use: &'a str) -> Self
pub fn with_certificate_use(self, cert_use: &'a str) -> Self
Set the certificate use/source (CLB, CDN, WAF, LIVE, DDOS).
Sourcepub fn with_repeatable(self, repeatable: bool) -> Self
pub fn with_repeatable(self, repeatable: bool) -> Self
Set whether duplicate certificates are allowed.
Sourcepub fn with_key_password(self, password: &'a str) -> Self
pub fn with_key_password(self, password: &'a str) -> Self
Set the private key password.
Trait Implementationsยง
Sourceยงimpl<'a> Endpoint for UploadCertificate<'a>
impl<'a> Endpoint for UploadCertificate<'a>
type Output = UploadCertificateResponse
fn service(&self) -> Cow<'static, str>
fn action(&self) -> Cow<'static, str>
fn version(&self) -> Cow<'static, str>
fn region(&self) -> Option<Cow<'_, str>>
fn payload(&self) -> Value
fn scheme(&self) -> Cow<'static, str>
fn host(&self) -> Cow<'_, str>
fn path(&self) -> Cow<'_, str>
fn extra_headers(&self) -> Option<Vec<(Cow<'_, str>, Cow<'_, str>)>>
fn parse(&self, body: Value) -> Result<Self::Output, TencentCloudError>
Auto Trait Implementationsยง
impl<'a> Freeze for UploadCertificate<'a>
impl<'a> RefUnwindSafe for UploadCertificate<'a>
impl<'a> Send for UploadCertificate<'a>
impl<'a> Sync for UploadCertificate<'a>
impl<'a> Unpin for UploadCertificate<'a>
impl<'a> UnwindSafe for UploadCertificate<'a>
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more