pub struct Snippets<'a> { /* private fields */ }Implementations§
Source§impl<'a> Snippets<'a>
impl<'a> Snippets<'a>
Sourcepub async fn create_snippet(
&self,
body: &SnippetEntity,
) -> Result<SnippetEntity, NifiError>
pub async fn create_snippet( &self, body: &SnippetEntity, ) -> Result<SnippetEntity, NifiError>
Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute.
Calls POST /nifi-api/snippets.
§Parameters
body: The snippet configuration details.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.401: Client could not be authenticated.403: Client is not authorized to make this request.404: The specified resource could not be found.409: The request was valid but NiFi was not in the appropriate state to process it.
§Permissions
Requires Read or Write - /{component-type}/{uuid} - For every component (all Read or all Write) in the Snippet and their descendant components.
Sourcepub async fn update_snippet(
&self,
id: &str,
body: &SnippetEntity,
) -> Result<SnippetEntity, NifiError>
pub async fn update_snippet( &self, id: &str, body: &SnippetEntity, ) -> Result<SnippetEntity, NifiError>
Move’s the components in this Snippet into a new Process Group and discards the snippet
Calls PUT /nifi-api/snippets/{id}.
§Parameters
id: The snippet id.body: The snippet configuration details.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.401: Client could not be authenticated.403: Client is not authorized to make this request.404: The specified resource could not be found.409: The request was valid but NiFi was not in the appropriate state to process it.
§Permissions
Write Process Group - /process-groups/{uuid}Write - /{component-type}/{uuid} - For each component in the Snippet and their descendant components
Sourcepub async fn delete_snippet(
&self,
id: &str,
disconnected_node_acknowledged: Option<bool>,
) -> Result<SnippetEntity, NifiError>
pub async fn delete_snippet( &self, id: &str, disconnected_node_acknowledged: Option<bool>, ) -> Result<SnippetEntity, NifiError>
Deletes the components in a snippet and discards the snippet
Calls DELETE /nifi-api/snippets/{id}.
§Parameters
id: The snippet id.disconnected_node_acknowledged: Acknowledges that this node is disconnected to allow for mutable requests to proceed.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.401: Client could not be authenticated.403: Client is not authorized to make this request.404: The specified resource could not be found.409: The request was valid but NiFi was not in the appropriate state to process it.
§Permissions
Write - /{component-type}/{uuid} - For each component in the Snippet and their descendant componentsWrite - Parent Process Group - /process-groups/{uuid}
Auto Trait Implementations§
impl<'a> Freeze for Snippets<'a>
impl<'a> !RefUnwindSafe for Snippets<'a>
impl<'a> Send for Snippets<'a>
impl<'a> Sync for Snippets<'a>
impl<'a> Unpin for Snippets<'a>
impl<'a> UnsafeUnpin for Snippets<'a>
impl<'a> !UnwindSafe for Snippets<'a>
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
Mutably borrows from an owned value. Read more