pub struct CloudflareClient { /* private fields */ }Expand description
Cloudflare API client for Zero Trust operations
Implementations§
Source§impl CloudflareClient
impl CloudflareClient
Sourcepub async fn create_or_get_tunnel(&self, name: &str) -> Result<Tunnel>
pub async fn create_or_get_tunnel(&self, name: &str) -> Result<Tunnel>
Create or retrieve existing tunnel
Sourcepub async fn create_dns_record(
&self,
zone_name: &str,
subdomain: &str,
tunnel_id: &str,
) -> Result<()>
pub async fn create_dns_record( &self, zone_name: &str, subdomain: &str, tunnel_id: &str, ) -> Result<()>
Create DNS CNAME record for tunnel
Sourcepub async fn create_access_application(
&self,
hostname: &str,
) -> Result<AccessApplication>
pub async fn create_access_application( &self, hostname: &str, ) -> Result<AccessApplication>
Create Zero Trust Access Application
Sourcepub async fn create_service_token(&self, name: &str) -> Result<ServiceToken>
pub async fn create_service_token(&self, name: &str) -> Result<ServiceToken>
Generate a Service Token for mobile authentication
Sourcepub async fn configure_tunnel_ingress(
&self,
tunnel_id: &str,
hostname: &str,
local_port: u16,
) -> Result<()>
pub async fn configure_tunnel_ingress( &self, tunnel_id: &str, hostname: &str, local_port: u16, ) -> Result<()>
Configure tunnel ingress rules
Sourcepub fn account_id(&self) -> &str
pub fn account_id(&self) -> &str
Get the account ID for this client
Auto Trait Implementations§
impl Freeze for CloudflareClient
impl !RefUnwindSafe for CloudflareClient
impl Send for CloudflareClient
impl Sync for CloudflareClient
impl Unpin for CloudflareClient
impl UnsafeUnpin for CloudflareClient
impl !UnwindSafe for CloudflareClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more