pub struct MethodMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all free methods, which are not associated with a particular resource.
It is not used directly, but through the CloudIAP hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_iap1_beta1 as iap1_beta1;
use iap1_beta1::{CloudIAP, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = CloudIAP::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `get_iam_policy(...)`, `set_iam_policy(...)` and `test_iam_permissions(...)`
// to build up your call.
let rb = hub.methods();Implementations§
Source§impl<'a, C> MethodMethods<'a, C>
impl<'a, C> MethodMethods<'a, C>
Sourcepub fn get_iam_policy(
&self,
request: GetIamPolicyRequest,
resource: &str,
) -> MethodGetIamPolicyCall<'a, C>
pub fn get_iam_policy( &self, request: GetIamPolicyRequest, resource: &str, ) -> MethodGetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Gets the access control policy for an Identity-Aware Proxy protected resource. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
§Arguments
request- No description provided.resource- REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn set_iam_policy(
&self,
request: SetIamPolicyRequest,
resource: &str,
) -> MethodSetIamPolicyCall<'a, C>
pub fn set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> MethodSetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Sets the access control policy for an Identity-Aware Proxy protected resource. Replaces any existing policy. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
§Arguments
request- No description provided.resource- REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
Sourcepub fn test_iam_permissions(
&self,
request: TestIamPermissionsRequest,
resource: &str,
) -> MethodTestIamPermissionCall<'a, C>
pub fn test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> MethodTestIamPermissionCall<'a, C>
Create a builder to help you perform the following task:
Returns permissions that a caller has on the Identity-Aware Proxy protected resource. If the resource does not exist or the caller does not have Identity-Aware Proxy permissions a [google.rpc.Code.PERMISSION_DENIED] will be returned. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
§Arguments
request- No description provided.resource- REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.