Struct aws_sdk_apigateway::types::PatchOperation
source · #[non_exhaustive]pub struct PatchOperation {
pub op: Option<Op>,
pub path: Option<String>,
pub value: Option<String>,
pub from: Option<String>,
}
Expand description
For more information about supported patch operations, see Patch Operations.
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.op: Option<Op>
An update operation to be performed with this PATCH request. The valid value can be add, remove, replace or copy. Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message..
path: Option<String>
The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.
value: Option<String>
The new target value of the update operation. It is applicable for the add or replace operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '{"a": ...}'.
from: Option<String>
The copy update operation's source as identified by a JSON-Pointer value referencing the location within the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary deployment ID to the affiliated deployment ID by calling a PATCH request on a Stage resource with "op":"copy", "from":"/canarySettings/deploymentId" and "path":"/deploymentId".
Implementations§
source§impl PatchOperation
impl PatchOperation
sourcepub fn op(&self) -> Option<&Op>
pub fn op(&self) -> Option<&Op>
An update operation to be performed with this PATCH request. The valid value can be add, remove, replace or copy. Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message..
sourcepub fn path(&self) -> Option<&str>
pub fn path(&self) -> Option<&str>
The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.
sourcepub fn value(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
The new target value of the update operation. It is applicable for the add or replace operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '{"a": ...}'.
sourcepub fn from(&self) -> Option<&str>
pub fn from(&self) -> Option<&str>
The copy update operation's source as identified by a JSON-Pointer value referencing the location within the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary deployment ID to the affiliated deployment ID by calling a PATCH request on a Stage resource with "op":"copy", "from":"/canarySettings/deploymentId" and "path":"/deploymentId".
source§impl PatchOperation
impl PatchOperation
sourcepub fn builder() -> PatchOperationBuilder
pub fn builder() -> PatchOperationBuilder
Creates a new builder-style object to manufacture PatchOperation
.
Trait Implementations§
source§impl Clone for PatchOperation
impl Clone for PatchOperation
source§fn clone(&self) -> PatchOperation
fn clone(&self) -> PatchOperation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PatchOperation
impl Debug for PatchOperation
source§impl PartialEq<PatchOperation> for PatchOperation
impl PartialEq<PatchOperation> for PatchOperation
source§fn eq(&self, other: &PatchOperation) -> bool
fn eq(&self, other: &PatchOperation) -> bool
self
and other
values to be equal, and is used
by ==
.