pub struct ResolverPolicyClient { /* private fields */ }Expand description
Calls ResolverPolicyService.
Resolver policies: how a VPC’s resolver answers names it isn’t authoritative
for. A VPC relays through the policy its resolver policy association names
(ResolverPolicyAssociationService), or else through the project’s default
policy in its region.
Implementations§
Source§impl ResolverPolicyClient
impl ResolverPolicyClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of ResolverPolicyService 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 fn with_options(&self, options: CallOptions) -> Self
pub fn with_options(&self, options: CallOptions) -> Self
The same client, whose calls are sent as options says instead of as the Client’s settings do, such as a mutation that must not be sent twice: .with_options(CallOptions::new().max_attempts(1)). See CallOptions.
Sourcepub async fn get_resolver_policy(
&self,
request: GetResolverPolicyRequest,
) -> Result<ResolverPolicy, Error>
pub async fn get_resolver_policy( &self, request: GetResolverPolicyRequest, ) -> Result<ResolverPolicy, Error>
Returns a resolver policy.
Sourcepub async fn list_resolver_policies(
&self,
request: ListResolverPoliciesRequest,
) -> Result<ListResolverPoliciesResponse, Error>
pub async fn list_resolver_policies( &self, request: ListResolverPoliciesRequest, ) -> Result<ListResolverPoliciesResponse, Error>
Lists the resolver policies in a region, oldest first, the project’s default included.
Sourcepub fn all_resolver_policies(
&self,
request: ListResolverPoliciesRequest,
) -> Pages<ResolverPolicy>
pub fn all_resolver_policies( &self, request: ListResolverPoliciesRequest, ) -> Pages<ResolverPolicy>
Returns everything list_resolver_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_resolver_policy(
&self,
request: CreateResolverPolicyRequest,
) -> Result<Operation<ResolverPolicy>, Error>
pub async fn create_resolver_policy( &self, request: CreateResolverPolicyRequest, ) -> Result<Operation<ResolverPolicy>, Error>
Creates a resolver policy. It isn’t the default: associate it with a VPC,
or make it the default with SetDefaultResolverPolicy. The operation is
done once the resolver policy is recorded.
It answers with an operation to wait on: Operation::wait returns the ResolverPolicy once the change is done.
Sourcepub async fn update_resolver_policy(
&self,
request: UpdateResolverPolicyRequest,
) -> Result<Operation<ResolverPolicy>, Error>
pub async fn update_resolver_policy( &self, request: UpdateResolverPolicyRequest, ) -> Result<Operation<ResolverPolicy>, Error>
Changes a resolver 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 ResolverPolicy once the change is done.
Sourcepub async fn delete_resolver_policy(
&self,
request: DeleteResolverPolicyRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_resolver_policy( &self, request: DeleteResolverPolicyRequest, ) -> Result<Operation<Empty>, Error>
Deletes a resolver policy. Refused for the project’s default policy and while a resolver 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_resolver_policy(
&self,
request: SetDefaultResolverPolicyRequest,
) -> Result<Operation<ResolverPolicy>, Error>
pub async fn set_default_resolver_policy( &self, request: SetDefaultResolverPolicyRequest, ) -> Result<Operation<ResolverPolicy>, Error>
Makes a resolver policy the project’s default in its region, in place of the one before. Every VPC of the region without a resolver 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 ResolverPolicy once the change is done.