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 as iap1;
use iap1::{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(...)`, `get_iap_settings(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)`, `update_iap_settings(...)` and `validate_attribute_expression(...)`
// 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 get_iap_settings(&self, name: &str) -> MethodGetIapSettingCall<'a, C>
pub fn get_iap_settings(&self, name: &str) -> MethodGetIapSettingCall<'a, C>
Create a builder to help you perform the following task:
Gets the IAP settings on a particular IAP protected resource.
§Arguments
name- Required. The resource name for which to retrieve the settings. Authorization: Requires thegetSettingspermission for the associated resource.
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. 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.
Sourcepub fn update_iap_settings(
&self,
request: IapSettings,
name: &str,
) -> MethodUpdateIapSettingCall<'a, C>
pub fn update_iap_settings( &self, request: IapSettings, name: &str, ) -> MethodUpdateIapSettingCall<'a, C>
Create a builder to help you perform the following task:
Updates the IAP settings on a particular IAP protected resource. It replaces all fields unless the update_mask is set.
§Arguments
request- No description provided.name- Required. The resource name of the IAP protected resource.
Sourcepub fn validate_attribute_expression(
&self,
name: &str,
) -> MethodValidateAttributeExpressionCall<'a, C>
pub fn validate_attribute_expression( &self, name: &str, ) -> MethodValidateAttributeExpressionCall<'a, C>
Create a builder to help you perform the following task:
Validates that a given CEL expression conforms to IAP restrictions.
§Arguments
name- Required. The resource name of the IAP protected resource.