pub struct BulkJobsResource<'a> { /* private fields */ }Expand description
client.bulk_jobs()
Implementations§
Source§impl<'a> BulkJobsResource<'a>
impl<'a> BulkJobsResource<'a>
Sourcepub fn enqueue(
&self,
domain_type: impl Display,
job_key: impl Display,
body: &BulkJobCreate,
) -> Result<BulkJobQueued>
pub fn enqueue( &self, domain_type: impl Display, job_key: impl Display, body: &BulkJobCreate, ) -> Result<BulkJobQueued>
Enqueue a bulk operation
POST /bulkjobs/{domainType}/{jobKey}/enqueue
Queues the selected operation for targets allowed by its preflight permission check. Forbidden targets are omitted; remaining IDs retain order and duplicates. Each queued chunk normally contains up to 50 IDs, or 5 for group/delete. HTTP 201 confirms enqueueing, not successful execution, and can contain zero queued jobs. Each target is processed separately. Follow job or queue status using the returned identifiers.
§Example
let body = models::BulkJobCreate {
domain_object_identifiers: vec![serde_json::json!(42)],
job_data: serde_json::json!({}),
..Default::default()
};
let bulk_job = client.bulk_jobs().enqueue("group", "setMaxMembers", &body)?;
println!("{}", bulk_job.job_group);Sourcepub fn infos(
&self,
domain_type: impl Display,
job_key: impl Display,
body: &BulkJobCreate,
) -> Result<BulkInfos>
pub fn infos( &self, domain_type: impl Display, job_key: impl Display, body: &BulkJobCreate, ) -> Result<BulkInfos>
Preview permitted bulk targets
POST /bulkjobs/{domainType}/{jobKey}/infos
Checks which supplied target identifiers the current user is allowed to process for the chosen job and payload. This is a read-only permission preview: it does not queue or execute the operation. Forbidden targets are silently omitted, while missing targets, invalid data and other errors may abort the whole request. Order and duplicate identifiers are retained. No reservation is made. See BulkJobCreate for domain/key mappings.
§Example
let body = models::BulkJobCreate {
domain_object_identifiers: vec![serde_json::json!(42)],
job_data: serde_json::json!({}),
..Default::default()
};
let bulk_job = client.bulk_jobs().infos("group", "setMaxMembers", &body)?;
println!("{:?}", bulk_job);