AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates a log group with the specified name.

You can create up to 5000 log groups per account.

You must use the following guidelines when naming a log group:

If you associate a AWS Key Management Service (AWS KMS) customer master key (CMK) with the log group, ingested data is encrypted using the CMK. This association is stored as long as the data encrypted with the CMK is still within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt this data whenever it is requested.

If you attempt to associate a CMK with the log group but the CMK does not exist or the CMK is disabled, you will receive an InvalidParameterException error.

Note:

For PCL this operation is only available in asynchronous form. Please refer to CreateLogGroupAsync.

Namespace: Amazon.CloudWatchLogs
Assembly: AWSSDK.CloudWatchLogs.dll
Version: 3.x.y.z

Syntax

C#
public virtual CreateLogGroupResponse CreateLogGroup(
         CreateLogGroupRequest request
)
Parameters
request
Type: Amazon.CloudWatchLogs.Model.CreateLogGroupRequest

Container for the necessary parameters to execute the CreateLogGroup service method.

Return Value
The response from the CreateLogGroup service method, as returned by CloudWatchLogs.

Exceptions

ExceptionCondition
InvalidParameterException A parameter is specified incorrectly.
LimitExceededException You have reached the maximum number of resources that can be created.
OperationAbortedException Multiple requests to update the same resource were in conflict.
ResourceAlreadyExistsException The specified resource already exists.
ServiceUnavailableException The service cannot complete the request.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also