pub struct DnsPolicyClient { /* private fields */ }Expand description
Calls DnsPolicyService.
DNS policies: how a VPC’s resolver answers names it isn’t authoritative
for. A VPC relays through the policy its DNS policy association names
(DnsPolicyAssociationService), or else through the project’s default
policy in its region.
Implementations§
Source§impl DnsPolicyClient
impl DnsPolicyClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of DnsPolicyService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_dns_policy(
&self,
request: GetDnsPolicyRequest,
) -> Result<DnsPolicy, Error>
pub async fn get_dns_policy( &self, request: GetDnsPolicyRequest, ) -> Result<DnsPolicy, Error>
Returns a DNS policy.
Sourcepub async fn list_dns_policies(
&self,
request: ListDnsPoliciesRequest,
) -> Result<ListDnsPoliciesResponse, Error>
pub async fn list_dns_policies( &self, request: ListDnsPoliciesRequest, ) -> Result<ListDnsPoliciesResponse, Error>
Lists the DNS policies in a region, oldest first, the project’s default included.
Sourcepub fn all_dns_policies(
&self,
request: ListDnsPoliciesRequest,
) -> Pages<DnsPolicy>
pub fn all_dns_policies( &self, request: ListDnsPoliciesRequest, ) -> Pages<DnsPolicy>
Returns everything list_dns_policies lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn create_dns_policy(
&self,
request: CreateDnsPolicyRequest,
) -> Result<Operation<DnsPolicy>, Error>
pub async fn create_dns_policy( &self, request: CreateDnsPolicyRequest, ) -> Result<Operation<DnsPolicy>, Error>
Creates a DNS policy. It isn’t the default: associate it with a VPC,
or make it the default with SetDefaultDnsPolicy. The operation is
done once the DNS policy is recorded.
It answers with an operation to wait on: Operation::wait returns the DnsPolicy once the change is done.
Sourcepub async fn update_dns_policy(
&self,
request: UpdateDnsPolicyRequest,
) -> Result<Operation<DnsPolicy>, Error>
pub async fn update_dns_policy( &self, request: UpdateDnsPolicyRequest, ) -> Result<Operation<DnsPolicy>, Error>
Changes a DNS policy’s relay settings or tags. The operation is done once the change is recorded; the resolvers of every VPC relaying through the policy apply it within seconds.
It answers with an operation to wait on: Operation::wait returns the DnsPolicy once the change is done.
Sourcepub async fn delete_dns_policy(
&self,
request: DeleteDnsPolicyRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_dns_policy( &self, request: DeleteDnsPolicyRequest, ) -> Result<Operation<Empty>, Error>
Deletes a DNS policy. Refused for the project’s default policy and while a DNS policy association names it. The operation is done once the change is recorded.
It answers with an operation to wait on, which has no result: Operation::wait returns once the change is done.
Sourcepub async fn set_default_dns_policy(
&self,
request: SetDefaultDnsPolicyRequest,
) -> Result<Operation<DnsPolicy>, Error>
pub async fn set_default_dns_policy( &self, request: SetDefaultDnsPolicyRequest, ) -> Result<Operation<DnsPolicy>, Error>
Makes a DNS policy the project’s default in its region, in place of the one before. Every VPC of the region without a DNS policy association relays through it from then on. Making the default the default changes nothing. The operation is done once the change is recorded; the resolvers apply it within seconds.
It answers with an operation to wait on: Operation::wait returns the DnsPolicy once the change is done.