/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the states-2016-11-23.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.StepFunctions.Model
{
///
/// Container for the parameters to the CreateStateMachine operation.
/// Creates a state machine. A state machine consists of a collection of states that can
/// do work (Task
states), determine to which states to transition next (Choice
/// states), stop an execution with an error (Fail
states), and so on. State
/// machines are specified using a JSON-based, structured language. For more information,
/// see Amazon
/// States Language in the Step Functions User Guide.
///
///
///
/// If you set the publish
parameter of this API action to true
,
/// it publishes version 1
as the first revision of the state machine.
///
///
///
/// This operation is eventually consistent. The results are best effort and may not reflect
/// very recent updates and changes.
///
///
///
/// CreateStateMachine
is an idempotent API. Subsequent requests won’t create
/// a duplicate resource if it was already created. CreateStateMachine
's
/// idempotency check is based on the state machine name
, definition
,
/// type
, LoggingConfiguration
, and TracingConfiguration
.
/// The check is also based on the publish
and versionDescription
/// parameters. If a following request has a different roleArn
or tags
,
/// Step Functions will ignore these differences and treat it as an idempotent request
/// of the previous. In this case, roleArn
and tags
will not
/// be updated, even if they are different.
///
///
///
public partial class CreateStateMachineRequest : AmazonStepFunctionsRequest
{
private string _definition;
private LoggingConfiguration _loggingConfiguration;
private string _name;
private bool? _publish;
private string _roleArn;
private List _tags = new List();
private TracingConfiguration _tracingConfiguration;
private StateMachineType _type;
private string _versionDescription;
///
/// Gets and sets the property Definition.
///
/// The Amazon States Language definition of the state machine. See Amazon
/// States Language.
///
///
[AWSProperty(Required=true, Sensitive=true, Min=1, Max=1048576)]
public string Definition
{
get { return this._definition; }
set { this._definition = value; }
}
// Check to see if Definition property is set
internal bool IsSetDefinition()
{
return this._definition != null;
}
///
/// Gets and sets the property LoggingConfiguration.
///
/// Defines what execution history events are logged and where they are logged.
///
///
///
/// By default, the level
is set to OFF
. For more information
/// see Log
/// Levels in the Step Functions User Guide.
///
///
///
public LoggingConfiguration LoggingConfiguration
{
get { return this._loggingConfiguration; }
set { this._loggingConfiguration = value; }
}
// Check to see if LoggingConfiguration property is set
internal bool IsSetLoggingConfiguration()
{
return this._loggingConfiguration != null;
}
///
/// Gets and sets the property Name.
///
/// The name of the state machine.
///
///
///
/// A name must not contain:
///
/// -
///
/// white space
///
///
-
///
/// brackets
< > { } [ ]
///
/// -
///
/// wildcard characters
? *
///
/// -
///
/// special characters
" # % \ ^ | ~ ` $ & , ; : /
///
/// -
///
/// control characters (
U+0000-001F
, U+007F-009F
)
///
///
///
/// To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z,
/// - and _.
///
///
[AWSProperty(Required=true, Min=1, Max=80)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property Publish.
///
/// Set to true
to publish the first version of the state machine during
/// creation. The default is false
.
///
///
public bool Publish
{
get { return this._publish.GetValueOrDefault(); }
set { this._publish = value; }
}
// Check to see if Publish property is set
internal bool IsSetPublish()
{
return this._publish.HasValue;
}
///
/// Gets and sets the property RoleArn.
///
/// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
///
///
[AWSProperty(Required=true, Min=1, Max=256)]
public string RoleArn
{
get { return this._roleArn; }
set { this._roleArn = value; }
}
// Check to see if RoleArn property is set
internal bool IsSetRoleArn()
{
return this._roleArn != null;
}
///
/// Gets and sets the property Tags.
///
/// Tags to be added when creating a state machine.
///
///
///
/// An array of key-value pairs. For more information, see Using
/// Cost Allocation Tags in the Amazon Web Services Billing and Cost Management
/// User Guide, and Controlling
/// Access Using IAM Tags.
///
///
///
/// Tags may only contain Unicode letters, digits, white space, or these symbols: _
/// . : / = + - @
.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property TracingConfiguration.
///
/// Selects whether X-Ray tracing is enabled.
///
///
public TracingConfiguration TracingConfiguration
{
get { return this._tracingConfiguration; }
set { this._tracingConfiguration = value; }
}
// Check to see if TracingConfiguration property is set
internal bool IsSetTracingConfiguration()
{
return this._tracingConfiguration != null;
}
///
/// Gets and sets the property Type.
///
/// Determines whether a Standard or Express state machine is created. The default is
/// STANDARD
. You cannot update the type
of a state machine
/// once it has been created.
///
///
public StateMachineType Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
///
/// Gets and sets the property VersionDescription.
///
/// Sets description about the state machine version. You can only set the description
/// if the publish
parameter is set to true
. Otherwise, if you
/// set versionDescription
, but publish
to false
,
/// this API action throws ValidationException
.
///
///
[AWSProperty(Sensitive=true, Max=256)]
public string VersionDescription
{
get { return this._versionDescription; }
set { this._versionDescription = value; }
}
// Check to see if VersionDescription property is set
internal bool IsSetVersionDescription()
{
return this._versionDescription != null;
}
}
}