/*
* 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 logs-2014-03-28.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.CloudWatchLogs.Model
{
///
/// Container for the parameters to the CreateLogGroup operation.
/// Creates a log group with the specified name. You can create up to 20,000 log groups
/// per account.
///
///
///
/// You must use the following guidelines when naming a log group:
///
/// -
///
/// Log group names must be unique within a Region for an Amazon Web Services account.
///
///
-
///
/// Log group names can be between 1 and 512 characters long.
///
///
-
///
/// Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore),
/// '-' (hyphen), '/' (forward slash), '.' (period), and '#' (number sign)
///
///
///
/// When you create a log group, by default the log events in the log group do not expire.
/// To set a retention policy so that events expire and are deleted after a specified
/// time, use PutRetentionPolicy.
///
///
///
/// If you associate an KMS key with the log group, ingested data is encrypted using the
/// KMS key. This association is stored as long as the data encrypted with the KMS key
/// is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data
/// whenever it is requested.
///
///
///
/// If you attempt to associate a KMS key with the log group but the KMS key does not
/// exist or the KMS key is disabled, you receive an InvalidParameterException
/// error.
///
///
///
/// CloudWatch Logs supports only symmetric KMS keys. Do not associate an asymmetric KMS
/// key with your log group. For more information, see Using
/// Symmetric and Asymmetric Keys.
///
///
///
public partial class CreateLogGroupRequest : AmazonCloudWatchLogsRequest
{
private string _kmsKeyId;
private string _logGroupName;
private Dictionary _tags = new Dictionary();
///
/// Empty constructor used to set properties independently even when a simple constructor is available
///
public CreateLogGroupRequest() { }
///
/// Instantiates CreateLogGroupRequest with the parameterized properties
///
/// The name of the log group.
public CreateLogGroupRequest(string logGroupName)
{
_logGroupName = logGroupName;
}
///
/// Gets and sets the property KmsKeyId.
///
/// The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For
/// more information, see Amazon
/// Resource Names.
///
///
[AWSProperty(Max=256)]
public string KmsKeyId
{
get { return this._kmsKeyId; }
set { this._kmsKeyId = value; }
}
// Check to see if KmsKeyId property is set
internal bool IsSetKmsKeyId()
{
return this._kmsKeyId != null;
}
///
/// Gets and sets the property LogGroupName.
///
/// The name of the log group.
///
///
[AWSProperty(Required=true, Min=1, Max=512)]
public string LogGroupName
{
get { return this._logGroupName; }
set { this._logGroupName = value; }
}
// Check to see if LogGroupName property is set
internal bool IsSetLogGroupName()
{
return this._logGroupName != null;
}
///
/// Gets and sets the property Tags.
///
/// The key-value pairs to use for the tags.
///
///
///
/// You can grant users access to certain log groups while preventing them from accessing
/// other log groups. To do so, tag your groups and use IAM policies that refer to those
/// tags. To assign tags when you create a log group, you must have either the logs:TagResource
/// or logs:TagLogGroup
permission. For more information about tagging, see
/// Tagging Amazon
/// Web Services resources. For more information about using tags to control access,
/// see Controlling
/// access to Amazon Web Services resources using tags.
///
///
[AWSProperty(Min=1, Max=50)]
public Dictionary 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;
}
}
}