#[non_exhaustive]pub struct ExecutionSpec {
pub args: HashMap<String, String>,
pub service_account: String,
pub project: String,
pub max_job_execution_lifetime: Option<Duration>,
pub kms_key: String,
/* private fields */
}Expand description
Execution related settings, like retry and service_account.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.args: HashMap<String, String>Optional. The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders:
- ${task_id}
- ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.
service_account: StringRequired. Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
project: StringOptional. The project in which jobs are run. By default, the project containing the Lake is used. If a project is provided, the ExecutionSpec.service_account must belong to this project.
max_job_execution_lifetime: Option<Duration>Optional. The maximum duration after which the job execution is expired.
kms_key: StringOptional. The Cloud KMS key to use for encryption, of the form:
projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
Implementations§
Source§impl ExecutionSpec
impl ExecutionSpec
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = ExecutionSpec::new().set_service_account("example");Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_max_job_execution_lifetime<T>(self, v: T) -> Self
pub fn set_max_job_execution_lifetime<T>(self, v: T) -> Self
Sets the value of max_job_execution_lifetime.
§Example
use wkt::Duration;
let x = ExecutionSpec::new().set_max_job_execution_lifetime(Duration::default()/* use setters */);Sourcepub fn set_or_clear_max_job_execution_lifetime<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_job_execution_lifetime<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_job_execution_lifetime.
§Example
use wkt::Duration;
let x = ExecutionSpec::new().set_or_clear_max_job_execution_lifetime(Some(Duration::default()/* use setters */));
let x = ExecutionSpec::new().set_or_clear_max_job_execution_lifetime(None::<Duration>);Trait Implementations§
Source§impl Clone for ExecutionSpec
impl Clone for ExecutionSpec
Source§fn clone(&self) -> ExecutionSpec
fn clone(&self) -> ExecutionSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionSpec
impl Debug for ExecutionSpec
Source§impl Default for ExecutionSpec
impl Default for ExecutionSpec
Source§fn default() -> ExecutionSpec
fn default() -> ExecutionSpec
Source§impl Message for ExecutionSpec
impl Message for ExecutionSpec
Source§impl PartialEq for ExecutionSpec
impl PartialEq for ExecutionSpec
impl StructuralPartialEq for ExecutionSpec
Auto Trait Implementations§
impl Freeze for ExecutionSpec
impl RefUnwindSafe for ExecutionSpec
impl Send for ExecutionSpec
impl Sync for ExecutionSpec
impl Unpin for ExecutionSpec
impl UnsafeUnpin for ExecutionSpec
impl UnwindSafe for ExecutionSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request