aws_sdk_swf/types/_cancel_workflow_execution_decision_attributes.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides the details of the <code>CancelWorkflowExecution</code> decision.</p>
4/// <p><b>Access Control</b></p>
5/// <p>You can use IAM policies to control this decision's access to Amazon SWF resources as follows:</p>
6/// <ul>
7/// <li>
8/// <p>Use a <code>Resource</code> element with the domain name to limit the action to only specified domains.</p></li>
9/// <li>
10/// <p>Use an <code>Action</code> element to allow or deny permission to call this action.</p></li>
11/// <li>
12/// <p>You cannot use an IAM policy to constrain this action's parameters.</p></li>
13/// </ul>
14/// <p>If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's <code>cause</code> parameter is set to <code>OPERATION_NOT_PERMITTED</code>. For details and example IAM policies, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html">Using IAM to Manage Access to Amazon SWF Workflows</a> in the <i>Amazon SWF Developer Guide</i>.</p>
15#[non_exhaustive]
16#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
17pub struct CancelWorkflowExecutionDecisionAttributes {
18 /// <p>Details of the cancellation.</p>
19 pub details: ::std::option::Option<::std::string::String>,
20}
21impl CancelWorkflowExecutionDecisionAttributes {
22 /// <p>Details of the cancellation.</p>
23 pub fn details(&self) -> ::std::option::Option<&str> {
24 self.details.as_deref()
25 }
26}
27impl CancelWorkflowExecutionDecisionAttributes {
28 /// Creates a new builder-style object to manufacture [`CancelWorkflowExecutionDecisionAttributes`](crate::types::CancelWorkflowExecutionDecisionAttributes).
29 pub fn builder() -> crate::types::builders::CancelWorkflowExecutionDecisionAttributesBuilder {
30 crate::types::builders::CancelWorkflowExecutionDecisionAttributesBuilder::default()
31 }
32}
33
34/// A builder for [`CancelWorkflowExecutionDecisionAttributes`](crate::types::CancelWorkflowExecutionDecisionAttributes).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CancelWorkflowExecutionDecisionAttributesBuilder {
38 pub(crate) details: ::std::option::Option<::std::string::String>,
39}
40impl CancelWorkflowExecutionDecisionAttributesBuilder {
41 /// <p>Details of the cancellation.</p>
42 pub fn details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43 self.details = ::std::option::Option::Some(input.into());
44 self
45 }
46 /// <p>Details of the cancellation.</p>
47 pub fn set_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48 self.details = input;
49 self
50 }
51 /// <p>Details of the cancellation.</p>
52 pub fn get_details(&self) -> &::std::option::Option<::std::string::String> {
53 &self.details
54 }
55 /// Consumes the builder and constructs a [`CancelWorkflowExecutionDecisionAttributes`](crate::types::CancelWorkflowExecutionDecisionAttributes).
56 pub fn build(self) -> crate::types::CancelWorkflowExecutionDecisionAttributes {
57 crate::types::CancelWorkflowExecutionDecisionAttributes { details: self.details }
58 }
59}