Amazon.CloudWatchLogs.AmazonCloudWatchLogsClient.PutRetentionPolicy C# (CSharp) Method

PutRetentionPolicy() public method

Sets the retention of the specified log group. A retention policy allows you to configure the number of days you want to retain log events in the specified log group.
/// A parameter is specified incorrectly. /// /// Multiple requests to update the same resource were in conflict. /// /// The specified resource does not exist. /// /// The service cannot complete the request. ///
public PutRetentionPolicy ( PutRetentionPolicyRequest request ) : Amazon.CloudWatchLogs.Model.PutRetentionPolicyResponse
request Amazon.CloudWatchLogs.Model.PutRetentionPolicyRequest Container for the necessary parameters to execute the PutRetentionPolicy service method.
return Amazon.CloudWatchLogs.Model.PutRetentionPolicyResponse
        public PutRetentionPolicyResponse PutRetentionPolicy(PutRetentionPolicyRequest request)
        {
            var marshaller = new PutRetentionPolicyRequestMarshaller();
            var unmarshaller = PutRetentionPolicyResponseUnmarshaller.Instance;

            return Invoke<PutRetentionPolicyRequest,PutRetentionPolicyResponse>(request, marshaller, unmarshaller);
        }
AmazonCloudWatchLogsClient