结构体 GetIamPolicy (0.5.0)

[KeyManagementService::get_iam_policy][crate::client::KeyManagementService::get_iam_policy] 调用的请求构建器。

示例

# use google_cloud_kms_v1::builder;
use builder::key_management_service::GetIamPolicy;
# tokio_test::block_on(async {

let builder = prepare_request_builder();
let response = builder.send().await?;
# gax::Result::<()>::Ok(()) });

fn prepare_request_builder() -> GetIamPolicy {
  # panic!();
  // ... details omitted ...
}

实现

with_request

 fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(self, v: V) -> Self

设置完整请求,替换所有先前的值。

with_options

 fn with_options<V: Into<gax::options::RequestOptions>>(self, v: V) -> Self

设置所有选项,替换所有先前的值。

send

async fn send(self) -> Result<iam_v1::model::Policy>

发送请求。

set_resource

 fn set_resource<T: Into<std::string::String>>(self, v: T) -> Self

设置 [resource][iam_v1::model::GetIamPolicyRequest::resource] 的值。

这是请求的必填字段。

set_options

 fn set_options<T>(self, v: T) -> Self
where
    T: std::convert::Into<iam_v1::model::GetPolicyOptions>,

设置 [options][iam_v1::model::GetIamPolicyRequest::options] 的值。

set_or_clear_options

 fn set_or_clear_options<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<iam_v1::model::GetPolicyOptions>,

设置或清除 [options][iam_v1::model::GetIamPolicyRequest::options] 的值。