/*
* 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 ssm-2014-11-06.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.SimpleSystemsManagement.Model
{
///
/// Container for the parameters to the CreateDocument operation.
/// Creates a Amazon Web Services Systems Manager (SSM document). An SSM document defines
/// the actions that Systems Manager performs on your managed nodes. For more information
/// about SSM documents, including information about supported schemas, features, and
/// syntax, see Amazon
/// Web Services Systems Manager Documents in the Amazon Web Services Systems Manager
/// User Guide.
///
public partial class CreateDocumentRequest : AmazonSimpleSystemsManagementRequest
{
private List _attachments = new List();
private string _content;
private string _displayName;
private DocumentFormat _documentFormat;
private DocumentType _documentType;
private string _name;
private List _requires = new List();
private List _tags = new List();
private string _targetType;
private string _versionName;
///
/// Empty constructor used to set properties independently even when a simple constructor is available
///
public CreateDocumentRequest() { }
///
/// Instantiates CreateDocumentRequest with the parameterized properties
///
/// A name for the SSM document. You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:
/// The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command. For examples, see the following topics in the Amazon Web Services Systems Manager User Guide.
public CreateDocumentRequest(string name, string content)
{
_name = name;
_content = content;
}
///
/// Gets and sets the property Attachments.
///
/// A list of key-value pairs that describe attachments to a version of a document.
///
///
[AWSProperty(Min=0, Max=20)]
public List Attachments
{
get { return this._attachments; }
set { this._attachments = value; }
}
// Check to see if Attachments property is set
internal bool IsSetAttachments()
{
return this._attachments != null && this._attachments.Count > 0;
}
///
/// Gets and sets the property Content.
///
/// The content for the new SSM document in JSON or YAML format. The content of the document
/// must not exceed 64KB. This quota also includes the content specified for input parameters
/// at runtime. We recommend storing the contents for your new document in an external
/// JSON or YAML file and referencing the file in a command.
///
///
///
/// For examples, see the following topics in the Amazon Web Services Systems Manager
/// User Guide.
///
///
///
[AWSProperty(Required=true, Min=1)]
public string Content
{
get { return this._content; }
set { this._content = value; }
}
// Check to see if Content property is set
internal bool IsSetContent()
{
return this._content != null;
}
///
/// Gets and sets the property DisplayName.
///
/// An optional field where you can specify a friendly name for the SSM document. This
/// value can differ for each version of the document. You can update this value at a
/// later time using the UpdateDocument operation.
///
///
[AWSProperty(Max=1024)]
public string DisplayName
{
get { return this._displayName; }
set { this._displayName = value; }
}
// Check to see if DisplayName property is set
internal bool IsSetDisplayName()
{
return this._displayName != null;
}
///
/// Gets and sets the property DocumentFormat.
///
/// Specify the document format for the request. The document format can be JSON, YAML,
/// or TEXT. JSON is the default format.
///
///
public DocumentFormat DocumentFormat
{
get { return this._documentFormat; }
set { this._documentFormat = value; }
}
// Check to see if DocumentFormat property is set
internal bool IsSetDocumentFormat()
{
return this._documentFormat != null;
}
///
/// Gets and sets the property DocumentType.
///
/// The type of document to create.
///
///
///
/// The DeploymentStrategy
document type is an internal-use-only document
/// type reserved for AppConfig.
///
///
///
public DocumentType DocumentType
{
get { return this._documentType; }
set { this._documentType = value; }
}
// Check to see if DocumentType property is set
internal bool IsSetDocumentType()
{
return this._documentType != null;
}
///
/// Gets and sets the property Name.
///
/// A name for the SSM document.
///
///
///
/// You can't use the following strings as document name prefixes. These are reserved
/// by Amazon Web Services for use as document name prefixes:
///
/// -
///
///
aws
///
/// -
///
///
amazon
///
/// -
///
///
amzn
///
///
///
[AWSProperty(Required=true)]
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 Requires.
///
/// A list of SSM documents required by a document. This parameter is used exclusively
/// by AppConfig. When a user creates an AppConfig configuration in an SSM document, the
/// user must also specify a required document for validation purposes. In this case,
/// an ApplicationConfiguration
document requires an ApplicationConfigurationSchema
/// document for validation purposes. For more information, see What
/// is AppConfig? in the AppConfig User Guide.
///
///
[AWSProperty(Min=1)]
public List Requires
{
get { return this._requires; }
set { this._requires = value; }
}
// Check to see if Requires property is set
internal bool IsSetRequires()
{
return this._requires != null && this._requires.Count > 0;
}
///
/// Gets and sets the property Tags.
///
/// Optional metadata that you assign to a resource. Tags enable you to categorize a resource
/// in different ways, such as by purpose, owner, or environment. For example, you might
/// want to tag an SSM document to identify the types of targets or the environment where
/// it will run. In this case, you could specify the following key-value pairs:
///
/// -
///
///
Key=OS,Value=Windows
///
/// -
///
///
Key=Environment,Value=Production
///
///
///
/// To add tags to an existing SSM document, use the AddTagsToResource operation.
///
///
///
[AWSProperty(Max=1000)]
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 TargetType.
///
/// Specify a target type to define the kinds of resources the document can run on. For
/// example, to run a document on EC2 instances, specify the following value: /AWS::EC2::Instance
.
/// If you specify a value of '/' the document can run on all types of resources. If you
/// don't specify a value, the document can't run on any resources. For a list of valid
/// resource types, see Amazon
/// Web Services resource and property types reference in the CloudFormation User
/// Guide.
///
///
[AWSProperty(Max=200)]
public string TargetType
{
get { return this._targetType; }
set { this._targetType = value; }
}
// Check to see if TargetType property is set
internal bool IsSetTargetType()
{
return this._targetType != null;
}
///
/// Gets and sets the property VersionName.
///
/// An optional field specifying the version of the artifact you are creating with the
/// document. For example, Release12.1
. This value is unique across all versions
/// of a document, and can't be changed.
///
///
public string VersionName
{
get { return this._versionName; }
set { this._versionName = value; }
}
// Check to see if VersionName property is set
internal bool IsSetVersionName()
{
return this._versionName != null;
}
}
}