repo_name stringlengths 1 52 | repo_creator stringclasses 6
values | programming_language stringclasses 4
values | code stringlengths 0 9.68M | num_lines int64 1 234k |
|---|---|---|---|---|
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrail.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrail.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateChannel operation
/// </summary>
public class UpdateChannelResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
UpdateChannelResponse response = new UpdateChannelResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ChannelArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ChannelArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Destinations", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Destination, DestinationUnmarshaller>(DestinationUnmarshaller.Instance);
response.Destinations = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Source", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Source = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ChannelAlreadyExistsException"))
{
return ChannelAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ChannelARNInvalidException"))
{
return ChannelARNInvalidExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ChannelNotFoundException"))
{
return ChannelNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("EventDataStoreARNInvalidException"))
{
return EventDataStoreARNInvalidExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("EventDataStoreNotFoundException"))
{
return EventDataStoreNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InactiveEventDataStoreException"))
{
return InactiveEventDataStoreExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidEventDataStoreCategoryException"))
{
return InvalidEventDataStoreCategoryExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException"))
{
return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
{
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudTrailException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateChannelResponseUnmarshaller _instance = new UpdateChannelResponseUnmarshaller();
internal static UpdateChannelResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateChannelResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 164 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrail.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrail.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateEventDataStore Request Marshaller
/// </summary>
public class UpdateEventDataStoreRequestMarshaller : IMarshaller<IRequest, UpdateEventDataStoreRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((UpdateEventDataStoreRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateEventDataStoreRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudTrail");
string target = "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.UpdateEventDataStore";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2013-11-01";
request.HttpMethod = "POST";
request.ResourcePath = "/";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetAdvancedEventSelectors())
{
context.Writer.WritePropertyName("AdvancedEventSelectors");
context.Writer.WriteArrayStart();
foreach(var publicRequestAdvancedEventSelectorsListValue in publicRequest.AdvancedEventSelectors)
{
context.Writer.WriteObjectStart();
var marshaller = AdvancedEventSelectorMarshaller.Instance;
marshaller.Marshall(publicRequestAdvancedEventSelectorsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetEventDataStore())
{
context.Writer.WritePropertyName("EventDataStore");
context.Writer.Write(publicRequest.EventDataStore);
}
if(publicRequest.IsSetKmsKeyId())
{
context.Writer.WritePropertyName("KmsKeyId");
context.Writer.Write(publicRequest.KmsKeyId);
}
if(publicRequest.IsSetMultiRegionEnabled())
{
context.Writer.WritePropertyName("MultiRegionEnabled");
context.Writer.Write(publicRequest.MultiRegionEnabled);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetOrganizationEnabled())
{
context.Writer.WritePropertyName("OrganizationEnabled");
context.Writer.Write(publicRequest.OrganizationEnabled);
}
if(publicRequest.IsSetRetentionPeriod())
{
context.Writer.WritePropertyName("RetentionPeriod");
context.Writer.Write(publicRequest.RetentionPeriod);
}
if(publicRequest.IsSetTerminationProtectionEnabled())
{
context.Writer.WritePropertyName("TerminationProtectionEnabled");
context.Writer.Write(publicRequest.TerminationProtectionEnabled);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateEventDataStoreRequestMarshaller _instance = new UpdateEventDataStoreRequestMarshaller();
internal static UpdateEventDataStoreRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateEventDataStoreRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 155 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrail.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrail.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateEventDataStore operation
/// </summary>
public class UpdateEventDataStoreResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
UpdateEventDataStoreResponse response = new UpdateEventDataStoreResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AdvancedEventSelectors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<AdvancedEventSelector, AdvancedEventSelectorUnmarshaller>(AdvancedEventSelectorUnmarshaller.Instance);
response.AdvancedEventSelectors = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CreatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventDataStoreArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.EventDataStoreArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KmsKeyId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.KmsKeyId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MultiRegionEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.MultiRegionEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("OrganizationEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.OrganizationEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RetentionPeriod", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
response.RetentionPeriod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TerminationProtectionEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.TerminationProtectionEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.UpdatedTimestamp = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("CloudTrailAccessNotEnabledException"))
{
return CloudTrailAccessNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("EventDataStoreAlreadyExistsException"))
{
return EventDataStoreAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("EventDataStoreARNInvalidException"))
{
return EventDataStoreARNInvalidExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("EventDataStoreHasOngoingImportException"))
{
return EventDataStoreHasOngoingImportExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("EventDataStoreNotFoundException"))
{
return EventDataStoreNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InactiveEventDataStoreException"))
{
return InactiveEventDataStoreExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientDependencyServiceAccessPermissionException"))
{
return InsufficientDependencyServiceAccessPermissionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientEncryptionPolicyException"))
{
return InsufficientEncryptionPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidEventSelectorsException"))
{
return InvalidEventSelectorsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidKmsKeyIdException"))
{
return InvalidKmsKeyIdExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("KmsException"))
{
return KmsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("KmsKeyNotFoundException"))
{
return KmsKeyNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoManagementAccountSLRExistsException"))
{
return NoManagementAccountSLRExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotOrganizationMasterAccountException"))
{
return NotOrganizationMasterAccountExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException"))
{
return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OrganizationNotInAllFeaturesModeException"))
{
return OrganizationNotInAllFeaturesModeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OrganizationsNotInUseException"))
{
return OrganizationsNotInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
{
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudTrailException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateEventDataStoreResponseUnmarshaller _instance = new UpdateEventDataStoreResponseUnmarshaller();
internal static UpdateEventDataStoreResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateEventDataStoreResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 242 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrail.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrail.Model.Internal.MarshallTransformations
{
/// <summary>
/// UpdateTrail Request Marshaller
/// </summary>
public class UpdateTrailRequestMarshaller : IMarshaller<IRequest, UpdateTrailRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((UpdateTrailRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateTrailRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudTrail");
string target = "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.UpdateTrail";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2013-11-01";
request.HttpMethod = "POST";
request.ResourcePath = "/";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCloudWatchLogsLogGroupArn())
{
context.Writer.WritePropertyName("CloudWatchLogsLogGroupArn");
context.Writer.Write(publicRequest.CloudWatchLogsLogGroupArn);
}
if(publicRequest.IsSetCloudWatchLogsRoleArn())
{
context.Writer.WritePropertyName("CloudWatchLogsRoleArn");
context.Writer.Write(publicRequest.CloudWatchLogsRoleArn);
}
if(publicRequest.IsSetEnableLogFileValidation())
{
context.Writer.WritePropertyName("EnableLogFileValidation");
context.Writer.Write(publicRequest.EnableLogFileValidation);
}
if(publicRequest.IsSetIncludeGlobalServiceEvents())
{
context.Writer.WritePropertyName("IncludeGlobalServiceEvents");
context.Writer.Write(publicRequest.IncludeGlobalServiceEvents);
}
if(publicRequest.IsSetIsMultiRegionTrail())
{
context.Writer.WritePropertyName("IsMultiRegionTrail");
context.Writer.Write(publicRequest.IsMultiRegionTrail);
}
if(publicRequest.IsSetIsOrganizationTrail())
{
context.Writer.WritePropertyName("IsOrganizationTrail");
context.Writer.Write(publicRequest.IsOrganizationTrail);
}
if(publicRequest.IsSetKmsKeyId())
{
context.Writer.WritePropertyName("KmsKeyId");
context.Writer.Write(publicRequest.KmsKeyId);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetS3BucketName())
{
context.Writer.WritePropertyName("S3BucketName");
context.Writer.Write(publicRequest.S3BucketName);
}
if(publicRequest.IsSetS3KeyPrefix())
{
context.Writer.WritePropertyName("S3KeyPrefix");
context.Writer.Write(publicRequest.S3KeyPrefix);
}
if(publicRequest.IsSetSnsTopicName())
{
context.Writer.WritePropertyName("SnsTopicName");
context.Writer.Write(publicRequest.SnsTopicName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static UpdateTrailRequestMarshaller _instance = new UpdateTrailRequestMarshaller();
internal static UpdateTrailRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateTrailRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 163 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrail.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrail.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UpdateTrail operation
/// </summary>
public class UpdateTrailResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
UpdateTrailResponse response = new UpdateTrailResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CloudWatchLogsLogGroupArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CloudWatchLogsLogGroupArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CloudWatchLogsRoleArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CloudWatchLogsRoleArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IncludeGlobalServiceEvents", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.IncludeGlobalServiceEvents = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IsMultiRegionTrail", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.IsMultiRegionTrail = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IsOrganizationTrail", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.IsOrganizationTrail = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KmsKeyId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.KmsKeyId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LogFileValidationEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.LogFileValidationEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("S3BucketName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.S3BucketName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("S3KeyPrefix", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.S3KeyPrefix = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SnsTopicARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SnsTopicARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SnsTopicName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SnsTopicName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TrailARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.TrailARN = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("CloudTrailAccessNotEnabledException"))
{
return CloudTrailAccessNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("CloudTrailARNInvalidException"))
{
return CloudTrailARNInvalidExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("CloudTrailInvalidClientTokenIdException"))
{
return CloudTrailInvalidClientTokenIdExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("CloudWatchLogsDeliveryUnavailableException"))
{
return CloudWatchLogsDeliveryUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientDependencyServiceAccessPermissionException"))
{
return InsufficientDependencyServiceAccessPermissionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientEncryptionPolicyException"))
{
return InsufficientEncryptionPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientS3BucketPolicyException"))
{
return InsufficientS3BucketPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InsufficientSnsTopicPolicyException"))
{
return InsufficientSnsTopicPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCloudWatchLogsLogGroupArnException"))
{
return InvalidCloudWatchLogsLogGroupArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCloudWatchLogsRoleArnException"))
{
return InvalidCloudWatchLogsRoleArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidEventSelectorsException"))
{
return InvalidEventSelectorsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidHomeRegionException"))
{
return InvalidHomeRegionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidKmsKeyIdException"))
{
return InvalidKmsKeyIdExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException"))
{
return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterException"))
{
return InvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidS3BucketNameException"))
{
return InvalidS3BucketNameExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidS3PrefixException"))
{
return InvalidS3PrefixExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidSnsTopicNameException"))
{
return InvalidSnsTopicNameExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidTrailNameException"))
{
return InvalidTrailNameExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("KmsException"))
{
return KmsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("KmsKeyDisabledException"))
{
return KmsKeyDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("KmsKeyNotFoundException"))
{
return KmsKeyNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoManagementAccountSLRExistsException"))
{
return NoManagementAccountSLRExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotOrganizationMasterAccountException"))
{
return NotOrganizationMasterAccountExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException"))
{
return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OrganizationNotInAllFeaturesModeException"))
{
return OrganizationNotInAllFeaturesModeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OrganizationsNotInUseException"))
{
return OrganizationsNotInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("S3BucketDoesNotExistException"))
{
return S3BucketDoesNotExistExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TrailNotFoundException"))
{
return TrailNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TrailNotProvidedException"))
{
return TrailNotProvidedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
{
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudTrailException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static UpdateTrailResponseUnmarshaller _instance = new UpdateTrailResponseUnmarshaller();
internal static UpdateTrailResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateTrailResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 306 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginators for the CloudTrail service
///</summary>
public class CloudTrailPaginatorFactory : ICloudTrailPaginatorFactory
{
private readonly IAmazonCloudTrail client;
internal CloudTrailPaginatorFactory(IAmazonCloudTrail client)
{
this.client = client;
}
/// <summary>
/// Paginator for GetQueryResults operation
///</summary>
public IGetQueryResultsPaginator GetQueryResults(GetQueryResultsRequest request)
{
return new GetQueryResultsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListChannels operation
///</summary>
public IListChannelsPaginator ListChannels(ListChannelsRequest request)
{
return new ListChannelsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListEventDataStores operation
///</summary>
public IListEventDataStoresPaginator ListEventDataStores(ListEventDataStoresRequest request)
{
return new ListEventDataStoresPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListImportFailures operation
///</summary>
public IListImportFailuresPaginator ListImportFailures(ListImportFailuresRequest request)
{
return new ListImportFailuresPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListImports operation
///</summary>
public IListImportsPaginator ListImports(ListImportsRequest request)
{
return new ListImportsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListPublicKeys operation
///</summary>
public IListPublicKeysPaginator ListPublicKeys(ListPublicKeysRequest request)
{
return new ListPublicKeysPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListQueries operation
///</summary>
public IListQueriesPaginator ListQueries(ListQueriesRequest request)
{
return new ListQueriesPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListTags operation
///</summary>
public IListTagsPaginator ListTags(ListTagsRequest request)
{
return new ListTagsPaginator(this.client, request);
}
/// <summary>
/// Paginator for ListTrails operation
///</summary>
public IListTrailsPaginator ListTrails(ListTrailsRequest request)
{
return new ListTrailsPaginator(this.client, request);
}
/// <summary>
/// Paginator for LookupEvents operation
///</summary>
public ILookupEventsPaginator LookupEvents(LookupEventsRequest request)
{
return new LookupEventsPaginator(this.client, request);
}
}
} | 118 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for GetQueryResults paginators.
/// </summary>
internal sealed partial class GetQueryResultsPaginator : IPaginator<GetQueryResultsResponse>, IGetQueryResultsPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly GetQueryResultsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<GetQueryResultsResponse> Responses => new PaginatedResponse<GetQueryResultsResponse>(this);
internal GetQueryResultsPaginator(IAmazonCloudTrail client, GetQueryResultsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<GetQueryResultsResponse> IPaginator<GetQueryResultsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
GetQueryResultsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.GetQueryResults(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<GetQueryResultsResponse> IPaginator<GetQueryResultsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
GetQueryResultsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.GetQueryResultsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 91 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginators for the CloudTrail service
///</summary>
public interface ICloudTrailPaginatorFactory
{
/// <summary>
/// Paginator for GetQueryResults operation
///</summary>
IGetQueryResultsPaginator GetQueryResults(GetQueryResultsRequest request);
/// <summary>
/// Paginator for ListChannels operation
///</summary>
IListChannelsPaginator ListChannels(ListChannelsRequest request);
/// <summary>
/// Paginator for ListEventDataStores operation
///</summary>
IListEventDataStoresPaginator ListEventDataStores(ListEventDataStoresRequest request);
/// <summary>
/// Paginator for ListImportFailures operation
///</summary>
IListImportFailuresPaginator ListImportFailures(ListImportFailuresRequest request);
/// <summary>
/// Paginator for ListImports operation
///</summary>
IListImportsPaginator ListImports(ListImportsRequest request);
/// <summary>
/// Paginator for ListPublicKeys operation
///</summary>
IListPublicKeysPaginator ListPublicKeys(ListPublicKeysRequest request);
/// <summary>
/// Paginator for ListQueries operation
///</summary>
IListQueriesPaginator ListQueries(ListQueriesRequest request);
/// <summary>
/// Paginator for ListTags operation
///</summary>
IListTagsPaginator ListTags(ListTagsRequest request);
/// <summary>
/// Paginator for ListTrails operation
///</summary>
IListTrailsPaginator ListTrails(ListTrailsRequest request);
/// <summary>
/// Paginator for LookupEvents operation
///</summary>
ILookupEventsPaginator LookupEvents(LookupEventsRequest request);
}
} | 78 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the GetQueryResults operation
///</summary>
public interface IGetQueryResultsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<GetQueryResultsResponse> Responses { get; }
}
} | 33 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListChannels operation
///</summary>
public interface IListChannelsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListChannelsResponse> Responses { get; }
}
} | 33 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListEventDataStores operation
///</summary>
public interface IListEventDataStoresPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListEventDataStoresResponse> Responses { get; }
}
} | 33 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListImportFailures operation
///</summary>
public interface IListImportFailuresPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListImportFailuresResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the Failures
/// </summary>
IPaginatedEnumerable<ImportFailureListItem> Failures { get; }
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListImports operation
///</summary>
public interface IListImportsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListImportsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the Imports
/// </summary>
IPaginatedEnumerable<ImportsListItem> Imports { get; }
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListPublicKeys operation
///</summary>
public interface IListPublicKeysPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListPublicKeysResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the PublicKeyList
/// </summary>
IPaginatedEnumerable<PublicKey> PublicKeyList { get; }
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListQueries operation
///</summary>
public interface IListQueriesPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListQueriesResponse> Responses { get; }
}
} | 33 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListTags operation
///</summary>
public interface IListTagsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListTagsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the ResourceTagList
/// </summary>
IPaginatedEnumerable<ResourceTag> ResourceTagList { get; }
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the ListTrails operation
///</summary>
public interface IListTrailsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<ListTrailsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the Trails
/// </summary>
IPaginatedEnumerable<TrailInfo> Trails { get; }
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Paginator for the LookupEvents operation
///</summary>
public interface ILookupEventsPaginator
{
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
IPaginatedEnumerable<LookupEventsResponse> Responses { get; }
/// <summary>
/// Enumerable containing all of the Events
/// </summary>
IPaginatedEnumerable<Event> Events { get; }
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListChannels paginators.
/// </summary>
internal sealed partial class ListChannelsPaginator : IPaginator<ListChannelsResponse>, IListChannelsPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListChannelsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListChannelsResponse> Responses => new PaginatedResponse<ListChannelsResponse>(this);
internal ListChannelsPaginator(IAmazonCloudTrail client, ListChannelsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListChannelsResponse> IPaginator<ListChannelsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListChannelsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListChannels(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListChannelsResponse> IPaginator<ListChannelsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListChannelsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListChannelsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 91 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListEventDataStores paginators.
/// </summary>
internal sealed partial class ListEventDataStoresPaginator : IPaginator<ListEventDataStoresResponse>, IListEventDataStoresPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListEventDataStoresRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListEventDataStoresResponse> Responses => new PaginatedResponse<ListEventDataStoresResponse>(this);
internal ListEventDataStoresPaginator(IAmazonCloudTrail client, ListEventDataStoresRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListEventDataStoresResponse> IPaginator<ListEventDataStoresResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListEventDataStoresResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListEventDataStores(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListEventDataStoresResponse> IPaginator<ListEventDataStoresResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListEventDataStoresResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListEventDataStoresAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 91 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListImportFailures paginators.
/// </summary>
internal sealed partial class ListImportFailuresPaginator : IPaginator<ListImportFailuresResponse>, IListImportFailuresPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListImportFailuresRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListImportFailuresResponse> Responses => new PaginatedResponse<ListImportFailuresResponse>(this);
/// <summary>
/// Enumerable containing all of the Failures
/// </summary>
public IPaginatedEnumerable<ImportFailureListItem> Failures =>
new PaginatedResultKeyResponse<ListImportFailuresResponse, ImportFailureListItem>(this, (i) => i.Failures);
internal ListImportFailuresPaginator(IAmazonCloudTrail client, ListImportFailuresRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListImportFailuresResponse> IPaginator<ListImportFailuresResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListImportFailuresResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListImportFailures(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListImportFailuresResponse> IPaginator<ListImportFailuresResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListImportFailuresResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListImportFailuresAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 97 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListImports paginators.
/// </summary>
internal sealed partial class ListImportsPaginator : IPaginator<ListImportsResponse>, IListImportsPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListImportsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListImportsResponse> Responses => new PaginatedResponse<ListImportsResponse>(this);
/// <summary>
/// Enumerable containing all of the Imports
/// </summary>
public IPaginatedEnumerable<ImportsListItem> Imports =>
new PaginatedResultKeyResponse<ListImportsResponse, ImportsListItem>(this, (i) => i.Imports);
internal ListImportsPaginator(IAmazonCloudTrail client, ListImportsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListImportsResponse> IPaginator<ListImportsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListImportsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListImports(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListImportsResponse> IPaginator<ListImportsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListImportsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListImportsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 97 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListPublicKeys paginators.
/// </summary>
internal sealed partial class ListPublicKeysPaginator : IPaginator<ListPublicKeysResponse>, IListPublicKeysPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListPublicKeysRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListPublicKeysResponse> Responses => new PaginatedResponse<ListPublicKeysResponse>(this);
/// <summary>
/// Enumerable containing all of the PublicKeyList
/// </summary>
public IPaginatedEnumerable<PublicKey> PublicKeyList =>
new PaginatedResultKeyResponse<ListPublicKeysResponse, PublicKey>(this, (i) => i.PublicKeyList);
internal ListPublicKeysPaginator(IAmazonCloudTrail client, ListPublicKeysRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListPublicKeysResponse> IPaginator<ListPublicKeysResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListPublicKeysResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListPublicKeys(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListPublicKeysResponse> IPaginator<ListPublicKeysResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListPublicKeysResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListPublicKeysAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 97 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListQueries paginators.
/// </summary>
internal sealed partial class ListQueriesPaginator : IPaginator<ListQueriesResponse>, IListQueriesPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListQueriesRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListQueriesResponse> Responses => new PaginatedResponse<ListQueriesResponse>(this);
internal ListQueriesPaginator(IAmazonCloudTrail client, ListQueriesRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListQueriesResponse> IPaginator<ListQueriesResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListQueriesResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListQueries(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListQueriesResponse> IPaginator<ListQueriesResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListQueriesResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListQueriesAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 91 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListTags paginators.
/// </summary>
internal sealed partial class ListTagsPaginator : IPaginator<ListTagsResponse>, IListTagsPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListTagsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListTagsResponse> Responses => new PaginatedResponse<ListTagsResponse>(this);
/// <summary>
/// Enumerable containing all of the ResourceTagList
/// </summary>
public IPaginatedEnumerable<ResourceTag> ResourceTagList =>
new PaginatedResultKeyResponse<ListTagsResponse, ResourceTag>(this, (i) => i.ResourceTagList);
internal ListTagsPaginator(IAmazonCloudTrail client, ListTagsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListTagsResponse> IPaginator<ListTagsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListTagsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListTags(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListTagsResponse> IPaginator<ListTagsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListTagsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListTagsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 97 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for ListTrails paginators.
/// </summary>
internal sealed partial class ListTrailsPaginator : IPaginator<ListTrailsResponse>, IListTrailsPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly ListTrailsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<ListTrailsResponse> Responses => new PaginatedResponse<ListTrailsResponse>(this);
/// <summary>
/// Enumerable containing all of the Trails
/// </summary>
public IPaginatedEnumerable<TrailInfo> Trails =>
new PaginatedResultKeyResponse<ListTrailsResponse, TrailInfo>(this, (i) => i.Trails);
internal ListTrailsPaginator(IAmazonCloudTrail client, ListTrailsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<ListTrailsResponse> IPaginator<ListTrailsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListTrailsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.ListTrails(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<ListTrailsResponse> IPaginator<ListTrailsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
ListTrailsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.ListTrailsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 97 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Runtime;
namespace Amazon.CloudTrail.Model
{
/// <summary>
/// Base class for LookupEvents paginators.
/// </summary>
internal sealed partial class LookupEventsPaginator : IPaginator<LookupEventsResponse>, ILookupEventsPaginator
{
private readonly IAmazonCloudTrail _client;
private readonly LookupEventsRequest _request;
private int _isPaginatorInUse = 0;
/// <summary>
/// Enumerable containing all full responses for the operation
/// </summary>
public IPaginatedEnumerable<LookupEventsResponse> Responses => new PaginatedResponse<LookupEventsResponse>(this);
/// <summary>
/// Enumerable containing all of the Events
/// </summary>
public IPaginatedEnumerable<Event> Events =>
new PaginatedResultKeyResponse<LookupEventsResponse, Event>(this, (i) => i.Events);
internal LookupEventsPaginator(IAmazonCloudTrail client, LookupEventsRequest request)
{
this._client = client;
this._request = request;
}
#if BCL
IEnumerable<LookupEventsResponse> IPaginator<LookupEventsResponse>.Paginate()
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
LookupEventsResponse response;
do
{
_request.NextToken = nextToken;
response = _client.LookupEvents(_request);
nextToken = response.NextToken;
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
#if AWS_ASYNC_ENUMERABLES_API
async IAsyncEnumerable<LookupEventsResponse> IPaginator<LookupEventsResponse>.PaginateAsync(CancellationToken cancellationToken = default)
{
if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
{
throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
}
PaginatorUtils.SetUserAgentAdditionOnRequest(_request);
var nextToken = _request.NextToken;
LookupEventsResponse response;
do
{
_request.NextToken = nextToken;
response = await _client.LookupEventsAsync(_request, cancellationToken).ConfigureAwait(false);
nextToken = response.NextToken;
cancellationToken.ThrowIfCancellationRequested();
yield return response;
}
while (!string.IsNullOrEmpty(nextToken));
}
#endif
}
} | 97 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using Amazon.CloudTrail.Model;
using Amazon.CloudTrail.Model.Internal.MarshallTransformations;
using Amazon.CloudTrail.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrail
{
/// <summary>
/// Implementation for accessing CloudTrail
///
/// CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records Amazon Web Services API calls for your Amazon
/// Web Services account and delivers log files to an Amazon S3 bucket. The recorded information
/// includes the identity of the user, the start time of the Amazon Web Services API call,
/// the source IP address, the request parameters, and the response elements returned
/// by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
/// consist of libraries and sample code for various programming languages and platforms
/// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail.
/// For example, the SDKs handle cryptographically signing requests, managing errors,
/// and retrying requests automatically. For more information about the Amazon Web Services
/// SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
/// to Build on Amazon Web Services</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
/// User Guide</a> for information about the data that is included with each Amazon Web
/// Services API call listed in the log files.
/// </para>
/// </summary>
public partial class AmazonCloudTrailClient : AmazonServiceClient, IAmazonCloudTrail
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailMetadata();
#if BCL45 || AWS_ASYNC_ENUMERABLES_API
private ICloudTrailPaginatorFactory _paginators;
/// <summary>
/// Paginators for the service
/// </summary>
public ICloudTrailPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new CloudTrailPaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AmazonCloudTrailConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AWSCredentials credentials, AmazonCloudTrailConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customize the pipeline
/// </summary>
/// <param name="pipeline"></param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler<Amazon.Runtime.Internal.EndpointResolver>();
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new AmazonCloudTrailEndpointResolver());
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AddTags
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual AddTagsResponse AddTags(AddTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return Invoke<AddTagsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddTags operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual IAsyncResult BeginAddTags(AddTagsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddTags.</param>
///
/// <returns>Returns a AddTagsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual AddTagsResponse EndAddTags(IAsyncResult asyncResult)
{
return EndInvoke<AddTagsResponse>(asyncResult);
}
#endregion
#region CancelQuery
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
public virtual CancelQueryResponse CancelQuery(CancelQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance;
return Invoke<CancelQueryResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CancelQuery operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CancelQuery operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCancelQuery
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
public virtual IAsyncResult BeginCancelQuery(CancelQueryRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CancelQuery operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCancelQuery.</param>
///
/// <returns>Returns a CancelQueryResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
public virtual CancelQueryResponse EndCancelQuery(IAsyncResult asyncResult)
{
return EndInvoke<CancelQueryResponse>(asyncResult);
}
#endregion
#region CreateChannel
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
public virtual CreateChannelResponse CreateChannel(CreateChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateChannelResponseUnmarshaller.Instance;
return Invoke<CreateChannelResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
public virtual IAsyncResult BeginCreateChannel(CreateChannelRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateChannelResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CreateChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateChannel.</param>
///
/// <returns>Returns a CreateChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
public virtual CreateChannelResponse EndCreateChannel(IAsyncResult asyncResult)
{
return EndInvoke<CreateChannelResponse>(asyncResult);
}
#endregion
#region CreateEventDataStore
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
public virtual CreateEventDataStoreResponse CreateEventDataStore(CreateEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventDataStoreResponseUnmarshaller.Instance;
return Invoke<CreateEventDataStoreResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
public virtual IAsyncResult BeginCreateEventDataStore(CreateEventDataStoreRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventDataStoreResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CreateEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateEventDataStore.</param>
///
/// <returns>Returns a CreateEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
public virtual CreateEventDataStoreResponse EndCreateEventDataStore(IAsyncResult asyncResult)
{
return EndInvoke<CreateEventDataStoreResponse>(asyncResult);
}
#endregion
#region CreateTrail
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual CreateTrailResponse CreateTrail(CreateTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrailResponseUnmarshaller.Instance;
return Invoke<CreateTrailResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the CreateTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual IAsyncResult BeginCreateTrail(CreateTrailRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrailResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the CreateTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateTrail.</param>
///
/// <returns>Returns a CreateTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual CreateTrailResponse EndCreateTrail(IAsyncResult asyncResult)
{
return EndInvoke<CreateTrailResponse>(asyncResult);
}
#endregion
#region DeleteChannel
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
public virtual DeleteChannelResponse DeleteChannel(DeleteChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteChannelResponseUnmarshaller.Instance;
return Invoke<DeleteChannelResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
public virtual IAsyncResult BeginDeleteChannel(DeleteChannelRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteChannelResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteChannel.</param>
///
/// <returns>Returns a DeleteChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
public virtual DeleteChannelResponse EndDeleteChannel(IAsyncResult asyncResult)
{
return EndInvoke<DeleteChannelResponse>(asyncResult);
}
#endregion
#region DeleteEventDataStore
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
public virtual DeleteEventDataStoreResponse DeleteEventDataStore(DeleteEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventDataStoreResponseUnmarshaller.Instance;
return Invoke<DeleteEventDataStoreResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
public virtual IAsyncResult BeginDeleteEventDataStore(DeleteEventDataStoreRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventDataStoreResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteEventDataStore.</param>
///
/// <returns>Returns a DeleteEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
public virtual DeleteEventDataStoreResponse EndDeleteEventDataStore(IAsyncResult asyncResult)
{
return EndInvoke<DeleteEventDataStoreResponse>(asyncResult);
}
#endregion
#region DeleteResourcePolicy
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
public virtual DeleteResourcePolicyResponse DeleteResourcePolicy(DeleteResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteResourcePolicyResponseUnmarshaller.Instance;
return Invoke<DeleteResourcePolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteResourcePolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteResourcePolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
public virtual IAsyncResult BeginDeleteResourcePolicy(DeleteResourcePolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteResourcePolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteResourcePolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteResourcePolicy.</param>
///
/// <returns>Returns a DeleteResourcePolicyResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
public virtual DeleteResourcePolicyResponse EndDeleteResourcePolicy(IAsyncResult asyncResult)
{
return EndInvoke<DeleteResourcePolicyResponse>(asyncResult);
}
#endregion
#region DeleteTrail
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual DeleteTrailResponse DeleteTrail(DeleteTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return Invoke<DeleteTrailResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeleteTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual IAsyncResult BeginDeleteTrail(DeleteTrailRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeleteTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteTrail.</param>
///
/// <returns>Returns a DeleteTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual DeleteTrailResponse EndDeleteTrail(IAsyncResult asyncResult)
{
return EndInvoke<DeleteTrailResponse>(asyncResult);
}
#endregion
#region DeregisterOrganizationDelegatedAdmin
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
public virtual DeregisterOrganizationDelegatedAdminResponse DeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return Invoke<DeregisterOrganizationDelegatedAdminResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DeregisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeregisterOrganizationDelegatedAdmin
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
public virtual IAsyncResult BeginDeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DeregisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeregisterOrganizationDelegatedAdmin.</param>
///
/// <returns>Returns a DeregisterOrganizationDelegatedAdminResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
public virtual DeregisterOrganizationDelegatedAdminResponse EndDeregisterOrganizationDelegatedAdmin(IAsyncResult asyncResult)
{
return EndInvoke<DeregisterOrganizationDelegatedAdminResponse>(asyncResult);
}
#endregion
#region DescribeQuery
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
public virtual DescribeQueryResponse DescribeQuery(DescribeQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeQueryResponseUnmarshaller.Instance;
return Invoke<DescribeQueryResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeQuery operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeQuery
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
public virtual IAsyncResult BeginDescribeQuery(DescribeQueryRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeQueryResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeQuery operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeQuery.</param>
///
/// <returns>Returns a DescribeQueryResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
public virtual DescribeQueryResponse EndDescribeQuery(IAsyncResult asyncResult)
{
return EndInvoke<DescribeQueryResponse>(asyncResult);
}
#endregion
#region DescribeTrails
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse DescribeTrails()
{
return DescribeTrails(new DescribeTrailsRequest());
}
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse DescribeTrails(DescribeTrailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return Invoke<DescribeTrailsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the DescribeTrails operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeTrails
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual IAsyncResult BeginDescribeTrails(DescribeTrailsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the DescribeTrails operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeTrails.</param>
///
/// <returns>Returns a DescribeTrailsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse EndDescribeTrails(IAsyncResult asyncResult)
{
return EndInvoke<DescribeTrailsResponse>(asyncResult);
}
#endregion
#region GetChannel
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
public virtual GetChannelResponse GetChannel(GetChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetChannelResponseUnmarshaller.Instance;
return Invoke<GetChannelResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
public virtual IAsyncResult BeginGetChannel(GetChannelRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetChannelResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetChannel.</param>
///
/// <returns>Returns a GetChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
public virtual GetChannelResponse EndGetChannel(IAsyncResult asyncResult)
{
return EndInvoke<GetChannelResponse>(asyncResult);
}
#endregion
#region GetEventDataStore
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
public virtual GetEventDataStoreResponse GetEventDataStore(GetEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventDataStoreResponseUnmarshaller.Instance;
return Invoke<GetEventDataStoreResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
public virtual IAsyncResult BeginGetEventDataStore(GetEventDataStoreRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventDataStoreResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetEventDataStore.</param>
///
/// <returns>Returns a GetEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
public virtual GetEventDataStoreResponse EndGetEventDataStore(IAsyncResult asyncResult)
{
return EndInvoke<GetEventDataStoreResponse>(asyncResult);
}
#endregion
#region GetEventSelectors
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual GetEventSelectorsResponse GetEventSelectors(GetEventSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return Invoke<GetEventSelectorsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetEventSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetEventSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual IAsyncResult BeginGetEventSelectors(GetEventSelectorsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetEventSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetEventSelectors.</param>
///
/// <returns>Returns a GetEventSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual GetEventSelectorsResponse EndGetEventSelectors(IAsyncResult asyncResult)
{
return EndInvoke<GetEventSelectorsResponse>(asyncResult);
}
#endregion
#region GetImport
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
public virtual GetImportResponse GetImport(GetImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetImportResponseUnmarshaller.Instance;
return Invoke<GetImportResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetImport operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetImport operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetImport
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
public virtual IAsyncResult BeginGetImport(GetImportRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetImportResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetImport operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetImport.</param>
///
/// <returns>Returns a GetImportResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
public virtual GetImportResponse EndGetImport(IAsyncResult asyncResult)
{
return EndInvoke<GetImportResponse>(asyncResult);
}
#endregion
#region GetInsightSelectors
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
public virtual GetInsightSelectorsResponse GetInsightSelectors(GetInsightSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetInsightSelectorsResponseUnmarshaller.Instance;
return Invoke<GetInsightSelectorsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetInsightSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetInsightSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
public virtual IAsyncResult BeginGetInsightSelectors(GetInsightSelectorsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetInsightSelectorsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetInsightSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetInsightSelectors.</param>
///
/// <returns>Returns a GetInsightSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
public virtual GetInsightSelectorsResponse EndGetInsightSelectors(IAsyncResult asyncResult)
{
return EndInvoke<GetInsightSelectorsResponse>(asyncResult);
}
#endregion
#region GetQueryResults
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
public virtual GetQueryResultsResponse GetQueryResults(GetQueryResultsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetQueryResultsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetQueryResultsResponseUnmarshaller.Instance;
return Invoke<GetQueryResultsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetQueryResults operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetQueryResults
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
public virtual IAsyncResult BeginGetQueryResults(GetQueryResultsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetQueryResultsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetQueryResultsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetQueryResults operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetQueryResults.</param>
///
/// <returns>Returns a GetQueryResultsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
public virtual GetQueryResultsResponse EndGetQueryResults(IAsyncResult asyncResult)
{
return EndInvoke<GetQueryResultsResponse>(asyncResult);
}
#endregion
#region GetResourcePolicy
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
public virtual GetResourcePolicyResponse GetResourcePolicy(GetResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourcePolicyResponseUnmarshaller.Instance;
return Invoke<GetResourcePolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetResourcePolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetResourcePolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
public virtual IAsyncResult BeginGetResourcePolicy(GetResourcePolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourcePolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetResourcePolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetResourcePolicy.</param>
///
/// <returns>Returns a GetResourcePolicyResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
public virtual GetResourcePolicyResponse EndGetResourcePolicy(IAsyncResult asyncResult)
{
return EndInvoke<GetResourcePolicyResponse>(asyncResult);
}
#endregion
#region GetTrail
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
public virtual GetTrailResponse GetTrail(GetTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailResponseUnmarshaller.Instance;
return Invoke<GetTrailResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
public virtual IAsyncResult BeginGetTrail(GetTrailRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetTrail.</param>
///
/// <returns>Returns a GetTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
public virtual GetTrailResponse EndGetTrail(IAsyncResult asyncResult)
{
return EndInvoke<GetTrailResponse>(asyncResult);
}
#endregion
#region GetTrailStatus
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual GetTrailStatusResponse GetTrailStatus(GetTrailStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return Invoke<GetTrailStatusResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the GetTrailStatus operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetTrailStatus
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual IAsyncResult BeginGetTrailStatus(GetTrailStatusRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the GetTrailStatus operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetTrailStatus.</param>
///
/// <returns>Returns a GetTrailStatusResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual GetTrailStatusResponse EndGetTrailStatus(IAsyncResult asyncResult)
{
return EndInvoke<GetTrailStatusResponse>(asyncResult);
}
#endregion
#region ListChannels
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
public virtual ListChannelsResponse ListChannels(ListChannelsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListChannelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListChannelsResponseUnmarshaller.Instance;
return Invoke<ListChannelsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListChannels operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListChannels operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListChannels
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
public virtual IAsyncResult BeginListChannels(ListChannelsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListChannelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListChannelsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListChannels operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListChannels.</param>
///
/// <returns>Returns a ListChannelsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
public virtual ListChannelsResponse EndListChannels(IAsyncResult asyncResult)
{
return EndInvoke<ListChannelsResponse>(asyncResult);
}
#endregion
#region ListEventDataStores
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
public virtual ListEventDataStoresResponse ListEventDataStores(ListEventDataStoresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEventDataStoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEventDataStoresResponseUnmarshaller.Instance;
return Invoke<ListEventDataStoresResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListEventDataStores operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListEventDataStores
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
public virtual IAsyncResult BeginListEventDataStores(ListEventDataStoresRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEventDataStoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEventDataStoresResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListEventDataStores operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListEventDataStores.</param>
///
/// <returns>Returns a ListEventDataStoresResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
public virtual ListEventDataStoresResponse EndListEventDataStores(IAsyncResult asyncResult)
{
return EndInvoke<ListEventDataStoresResponse>(asyncResult);
}
#endregion
#region ListImportFailures
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
public virtual ListImportFailuresResponse ListImportFailures(ListImportFailuresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportFailuresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportFailuresResponseUnmarshaller.Instance;
return Invoke<ListImportFailuresResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListImportFailures operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListImportFailures
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
public virtual IAsyncResult BeginListImportFailures(ListImportFailuresRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportFailuresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportFailuresResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListImportFailures operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListImportFailures.</param>
///
/// <returns>Returns a ListImportFailuresResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
public virtual ListImportFailuresResponse EndListImportFailures(IAsyncResult asyncResult)
{
return EndInvoke<ListImportFailuresResponse>(asyncResult);
}
#endregion
#region ListImports
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
public virtual ListImportsResponse ListImports(ListImportsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;
return Invoke<ListImportsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListImports operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListImports operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListImports
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
public virtual IAsyncResult BeginListImports(ListImportsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListImports operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListImports.</param>
///
/// <returns>Returns a ListImportsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
public virtual ListImportsResponse EndListImports(IAsyncResult asyncResult)
{
return EndInvoke<ListImportsResponse>(asyncResult);
}
#endregion
#region ListPublicKeys
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual ListPublicKeysResponse ListPublicKeys(ListPublicKeysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPublicKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return Invoke<ListPublicKeysResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListPublicKeys operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListPublicKeys
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual IAsyncResult BeginListPublicKeys(ListPublicKeysRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPublicKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListPublicKeys operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListPublicKeys.</param>
///
/// <returns>Returns a ListPublicKeysResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual ListPublicKeysResponse EndListPublicKeys(IAsyncResult asyncResult)
{
return EndInvoke<ListPublicKeysResponse>(asyncResult);
}
#endregion
#region ListQueries
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
public virtual ListQueriesResponse ListQueries(ListQueriesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListQueriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListQueriesResponseUnmarshaller.Instance;
return Invoke<ListQueriesResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListQueries operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListQueries operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListQueries
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
public virtual IAsyncResult BeginListQueries(ListQueriesRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListQueriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListQueriesResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListQueries operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListQueries.</param>
///
/// <returns>Returns a ListQueriesResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
public virtual ListQueriesResponse EndListQueries(IAsyncResult asyncResult)
{
return EndInvoke<ListQueriesResponse>(asyncResult);
}
#endregion
#region ListTags
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual ListTagsResponse ListTags(ListTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return Invoke<ListTagsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListTags operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual IAsyncResult BeginListTags(ListTagsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListTags.</param>
///
/// <returns>Returns a ListTagsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual ListTagsResponse EndListTags(IAsyncResult asyncResult)
{
return EndInvoke<ListTagsResponse>(asyncResult);
}
#endregion
#region ListTrails
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
public virtual ListTrailsResponse ListTrails(ListTrailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTrailsResponseUnmarshaller.Instance;
return Invoke<ListTrailsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the ListTrails operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListTrails operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListTrails
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
public virtual IAsyncResult BeginListTrails(ListTrailsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTrailsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the ListTrails operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListTrails.</param>
///
/// <returns>Returns a ListTrailsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
public virtual ListTrailsResponse EndListTrails(IAsyncResult asyncResult)
{
return EndInvoke<ListTrailsResponse>(asyncResult);
}
#endregion
#region LookupEvents
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual LookupEventsResponse LookupEvents(LookupEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = LookupEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = LookupEventsResponseUnmarshaller.Instance;
return Invoke<LookupEventsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the LookupEvents operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the LookupEvents operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndLookupEvents
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual IAsyncResult BeginLookupEvents(LookupEventsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = LookupEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = LookupEventsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the LookupEvents operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginLookupEvents.</param>
///
/// <returns>Returns a LookupEventsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual LookupEventsResponse EndLookupEvents(IAsyncResult asyncResult)
{
return EndInvoke<LookupEventsResponse>(asyncResult);
}
#endregion
#region PutEventSelectors
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual PutEventSelectorsResponse PutEventSelectors(PutEventSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return Invoke<PutEventSelectorsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutEventSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutEventSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual IAsyncResult BeginPutEventSelectors(PutEventSelectorsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutEventSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutEventSelectors.</param>
///
/// <returns>Returns a PutEventSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual PutEventSelectorsResponse EndPutEventSelectors(IAsyncResult asyncResult)
{
return EndInvoke<PutEventSelectorsResponse>(asyncResult);
}
#endregion
#region PutInsightSelectors
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
public virtual PutInsightSelectorsResponse PutInsightSelectors(PutInsightSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutInsightSelectorsResponseUnmarshaller.Instance;
return Invoke<PutInsightSelectorsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutInsightSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutInsightSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
public virtual IAsyncResult BeginPutInsightSelectors(PutInsightSelectorsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutInsightSelectorsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutInsightSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutInsightSelectors.</param>
///
/// <returns>Returns a PutInsightSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
public virtual PutInsightSelectorsResponse EndPutInsightSelectors(IAsyncResult asyncResult)
{
return EndInvoke<PutInsightSelectorsResponse>(asyncResult);
}
#endregion
#region PutResourcePolicy
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
public virtual PutResourcePolicyResponse PutResourcePolicy(PutResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutResourcePolicyResponseUnmarshaller.Instance;
return Invoke<PutResourcePolicyResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutResourcePolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutResourcePolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
public virtual IAsyncResult BeginPutResourcePolicy(PutResourcePolicyRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutResourcePolicyResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutResourcePolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutResourcePolicy.</param>
///
/// <returns>Returns a PutResourcePolicyResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
public virtual PutResourcePolicyResponse EndPutResourcePolicy(IAsyncResult asyncResult)
{
return EndInvoke<PutResourcePolicyResponse>(asyncResult);
}
#endregion
#region RegisterOrganizationDelegatedAdmin
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
public virtual RegisterOrganizationDelegatedAdminResponse RegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return Invoke<RegisterOrganizationDelegatedAdminResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RegisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRegisterOrganizationDelegatedAdmin
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
public virtual IAsyncResult BeginRegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RegisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRegisterOrganizationDelegatedAdmin.</param>
///
/// <returns>Returns a RegisterOrganizationDelegatedAdminResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
public virtual RegisterOrganizationDelegatedAdminResponse EndRegisterOrganizationDelegatedAdmin(IAsyncResult asyncResult)
{
return EndInvoke<RegisterOrganizationDelegatedAdminResponse>(asyncResult);
}
#endregion
#region RemoveTags
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual RemoveTagsResponse RemoveTags(RemoveTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return Invoke<RemoveTagsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveTags operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemoveTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual IAsyncResult BeginRemoveTags(RemoveTagsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemoveTags.</param>
///
/// <returns>Returns a RemoveTagsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual RemoveTagsResponse EndRemoveTags(IAsyncResult asyncResult)
{
return EndInvoke<RemoveTagsResponse>(asyncResult);
}
#endregion
#region RestoreEventDataStore
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
public virtual RestoreEventDataStoreResponse RestoreEventDataStore(RestoreEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreEventDataStoreResponseUnmarshaller.Instance;
return Invoke<RestoreEventDataStoreResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the RestoreEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRestoreEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
public virtual IAsyncResult BeginRestoreEventDataStore(RestoreEventDataStoreRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreEventDataStoreResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the RestoreEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRestoreEventDataStore.</param>
///
/// <returns>Returns a RestoreEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
public virtual RestoreEventDataStoreResponse EndRestoreEventDataStore(IAsyncResult asyncResult)
{
return EndInvoke<RestoreEventDataStoreResponse>(asyncResult);
}
#endregion
#region StartEventDataStoreIngestion
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
public virtual StartEventDataStoreIngestionResponse StartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartEventDataStoreIngestionResponseUnmarshaller.Instance;
return Invoke<StartEventDataStoreIngestionResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StartEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartEventDataStoreIngestion
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
public virtual IAsyncResult BeginStartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartEventDataStoreIngestionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StartEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartEventDataStoreIngestion.</param>
///
/// <returns>Returns a StartEventDataStoreIngestionResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
public virtual StartEventDataStoreIngestionResponse EndStartEventDataStoreIngestion(IAsyncResult asyncResult)
{
return EndInvoke<StartEventDataStoreIngestionResponse>(asyncResult);
}
#endregion
#region StartImport
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
public virtual StartImportResponse StartImport(StartImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartImportResponseUnmarshaller.Instance;
return Invoke<StartImportResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StartImport operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartImport operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartImport
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
public virtual IAsyncResult BeginStartImport(StartImportRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartImportResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StartImport operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartImport.</param>
///
/// <returns>Returns a StartImportResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
public virtual StartImportResponse EndStartImport(IAsyncResult asyncResult)
{
return EndInvoke<StartImportResponse>(asyncResult);
}
#endregion
#region StartLogging
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual StartLoggingResponse StartLogging(StartLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance;
return Invoke<StartLoggingResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StartLogging operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartLogging operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartLogging
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual IAsyncResult BeginStartLogging(StartLoggingRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StartLogging operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartLogging.</param>
///
/// <returns>Returns a StartLoggingResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual StartLoggingResponse EndStartLogging(IAsyncResult asyncResult)
{
return EndInvoke<StartLoggingResponse>(asyncResult);
}
#endregion
#region StartQuery
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
public virtual StartQueryResponse StartQuery(StartQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartQueryResponseUnmarshaller.Instance;
return Invoke<StartQueryResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StartQuery operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartQuery operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartQuery
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
public virtual IAsyncResult BeginStartQuery(StartQueryRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartQueryResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StartQuery operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartQuery.</param>
///
/// <returns>Returns a StartQueryResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
public virtual StartQueryResponse EndStartQuery(IAsyncResult asyncResult)
{
return EndInvoke<StartQueryResponse>(asyncResult);
}
#endregion
#region StopEventDataStoreIngestion
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
public virtual StopEventDataStoreIngestionResponse StopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopEventDataStoreIngestionResponseUnmarshaller.Instance;
return Invoke<StopEventDataStoreIngestionResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StopEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopEventDataStoreIngestion
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
public virtual IAsyncResult BeginStopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopEventDataStoreIngestionResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StopEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopEventDataStoreIngestion.</param>
///
/// <returns>Returns a StopEventDataStoreIngestionResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
public virtual StopEventDataStoreIngestionResponse EndStopEventDataStoreIngestion(IAsyncResult asyncResult)
{
return EndInvoke<StopEventDataStoreIngestionResponse>(asyncResult);
}
#endregion
#region StopImport
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
public virtual StopImportResponse StopImport(StopImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopImportResponseUnmarshaller.Instance;
return Invoke<StopImportResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StopImport operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopImport operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopImport
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
public virtual IAsyncResult BeginStopImport(StopImportRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopImportResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StopImport operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopImport.</param>
///
/// <returns>Returns a StopImportResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
public virtual StopImportResponse EndStopImport(IAsyncResult asyncResult)
{
return EndInvoke<StopImportResponse>(asyncResult);
}
#endregion
#region StopLogging
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual StopLoggingResponse StopLogging(StopLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;
return Invoke<StopLoggingResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the StopLogging operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopLogging operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopLogging
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual IAsyncResult BeginStopLogging(StopLoggingRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the StopLogging operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopLogging.</param>
///
/// <returns>Returns a StopLoggingResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual StopLoggingResponse EndStopLogging(IAsyncResult asyncResult)
{
return EndInvoke<StopLoggingResponse>(asyncResult);
}
#endregion
#region UpdateChannel
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
public virtual UpdateChannelResponse UpdateChannel(UpdateChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateChannelResponseUnmarshaller.Instance;
return Invoke<UpdateChannelResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the UpdateChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
public virtual IAsyncResult BeginUpdateChannel(UpdateChannelRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateChannelResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the UpdateChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateChannel.</param>
///
/// <returns>Returns a UpdateChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
public virtual UpdateChannelResponse EndUpdateChannel(IAsyncResult asyncResult)
{
return EndInvoke<UpdateChannelResponse>(asyncResult);
}
#endregion
#region UpdateEventDataStore
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
public virtual UpdateEventDataStoreResponse UpdateEventDataStore(UpdateEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateEventDataStoreResponseUnmarshaller.Instance;
return Invoke<UpdateEventDataStoreResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the UpdateEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
public virtual IAsyncResult BeginUpdateEventDataStore(UpdateEventDataStoreRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateEventDataStoreResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the UpdateEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateEventDataStore.</param>
///
/// <returns>Returns a UpdateEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
public virtual UpdateEventDataStoreResponse EndUpdateEventDataStore(IAsyncResult asyncResult)
{
return EndInvoke<UpdateEventDataStoreResponse>(asyncResult);
}
#endregion
#region UpdateTrail
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual UpdateTrailResponse UpdateTrail(UpdateTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return Invoke<UpdateTrailResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the UpdateTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual IAsyncResult BeginUpdateTrail(UpdateTrailRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the UpdateTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateTrail.</param>
///
/// <returns>Returns a UpdateTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual UpdateTrailResponse EndUpdateTrail(IAsyncResult asyncResult)
{
return EndInvoke<UpdateTrailResponse>(asyncResult);
}
#endregion
}
} | 5,614 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.CloudTrail.Model;
namespace Amazon.CloudTrail
{
/// <summary>
/// Interface for accessing CloudTrail
///
/// CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records Amazon Web Services API calls for your Amazon
/// Web Services account and delivers log files to an Amazon S3 bucket. The recorded information
/// includes the identity of the user, the start time of the Amazon Web Services API call,
/// the source IP address, the request parameters, and the response elements returned
/// by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
/// consist of libraries and sample code for various programming languages and platforms
/// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail.
/// For example, the SDKs handle cryptographically signing requests, managing errors,
/// and retrying requests automatically. For more information about the Amazon Web Services
/// SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
/// to Build on Amazon Web Services</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
/// User Guide</a> for information about the data that is included with each Amazon Web
/// Services API call listed in the log files.
/// </para>
/// </summary>
public partial interface IAmazonCloudTrail : IAmazonService, IDisposable
{
#if BCL45 || AWS_ASYNC_ENUMERABLES_API
/// <summary>
/// Paginators for the service
/// </summary>
ICloudTrailPaginatorFactory Paginators { get; }
#endif
#region AddTags
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
AddTagsResponse AddTags(AddTagsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the AddTags operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
IAsyncResult BeginAddTags(AddTagsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the AddTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddTags.</param>
///
/// <returns>Returns a AddTagsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
AddTagsResponse EndAddTags(IAsyncResult asyncResult);
#endregion
#region CancelQuery
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
CancelQueryResponse CancelQuery(CancelQueryRequest request);
/// <summary>
/// Initiates the asynchronous execution of the CancelQuery operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CancelQuery operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCancelQuery
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
IAsyncResult BeginCancelQuery(CancelQueryRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the CancelQuery operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCancelQuery.</param>
///
/// <returns>Returns a CancelQueryResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
CancelQueryResponse EndCancelQuery(IAsyncResult asyncResult);
#endregion
#region CreateChannel
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
CreateChannelResponse CreateChannel(CreateChannelRequest request);
/// <summary>
/// Initiates the asynchronous execution of the CreateChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
IAsyncResult BeginCreateChannel(CreateChannelRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the CreateChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateChannel.</param>
///
/// <returns>Returns a CreateChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
CreateChannelResponse EndCreateChannel(IAsyncResult asyncResult);
#endregion
#region CreateEventDataStore
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
CreateEventDataStoreResponse CreateEventDataStore(CreateEventDataStoreRequest request);
/// <summary>
/// Initiates the asynchronous execution of the CreateEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
IAsyncResult BeginCreateEventDataStore(CreateEventDataStoreRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the CreateEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateEventDataStore.</param>
///
/// <returns>Returns a CreateEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
CreateEventDataStoreResponse EndCreateEventDataStore(IAsyncResult asyncResult);
#endregion
#region CreateTrail
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
CreateTrailResponse CreateTrail(CreateTrailRequest request);
/// <summary>
/// Initiates the asynchronous execution of the CreateTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the CreateTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
IAsyncResult BeginCreateTrail(CreateTrailRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the CreateTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateTrail.</param>
///
/// <returns>Returns a CreateTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
CreateTrailResponse EndCreateTrail(IAsyncResult asyncResult);
#endregion
#region DeleteChannel
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
DeleteChannelResponse DeleteChannel(DeleteChannelRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DeleteChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
IAsyncResult BeginDeleteChannel(DeleteChannelRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DeleteChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteChannel.</param>
///
/// <returns>Returns a DeleteChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
DeleteChannelResponse EndDeleteChannel(IAsyncResult asyncResult);
#endregion
#region DeleteEventDataStore
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
DeleteEventDataStoreResponse DeleteEventDataStore(DeleteEventDataStoreRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DeleteEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
IAsyncResult BeginDeleteEventDataStore(DeleteEventDataStoreRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DeleteEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteEventDataStore.</param>
///
/// <returns>Returns a DeleteEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
DeleteEventDataStoreResponse EndDeleteEventDataStore(IAsyncResult asyncResult);
#endregion
#region DeleteResourcePolicy
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
DeleteResourcePolicyResponse DeleteResourcePolicy(DeleteResourcePolicyRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DeleteResourcePolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteResourcePolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
IAsyncResult BeginDeleteResourcePolicy(DeleteResourcePolicyRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DeleteResourcePolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteResourcePolicy.</param>
///
/// <returns>Returns a DeleteResourcePolicyResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
DeleteResourcePolicyResponse EndDeleteResourcePolicy(IAsyncResult asyncResult);
#endregion
#region DeleteTrail
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
DeleteTrailResponse DeleteTrail(DeleteTrailRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DeleteTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
IAsyncResult BeginDeleteTrail(DeleteTrailRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DeleteTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteTrail.</param>
///
/// <returns>Returns a DeleteTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
DeleteTrailResponse EndDeleteTrail(IAsyncResult asyncResult);
#endregion
#region DeregisterOrganizationDelegatedAdmin
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
DeregisterOrganizationDelegatedAdminResponse DeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DeregisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeregisterOrganizationDelegatedAdmin
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
IAsyncResult BeginDeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DeregisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeregisterOrganizationDelegatedAdmin.</param>
///
/// <returns>Returns a DeregisterOrganizationDelegatedAdminResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
DeregisterOrganizationDelegatedAdminResponse EndDeregisterOrganizationDelegatedAdmin(IAsyncResult asyncResult);
#endregion
#region DescribeQuery
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
DescribeQueryResponse DescribeQuery(DescribeQueryRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DescribeQuery operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeQuery
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
IAsyncResult BeginDescribeQuery(DescribeQueryRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DescribeQuery operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeQuery.</param>
///
/// <returns>Returns a DescribeQueryResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
DescribeQueryResponse EndDescribeQuery(IAsyncResult asyncResult);
#endregion
#region DescribeTrails
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
DescribeTrailsResponse DescribeTrails();
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
DescribeTrailsResponse DescribeTrails(DescribeTrailsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the DescribeTrails operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeTrails
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
IAsyncResult BeginDescribeTrails(DescribeTrailsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the DescribeTrails operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginDescribeTrails.</param>
///
/// <returns>Returns a DescribeTrailsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
DescribeTrailsResponse EndDescribeTrails(IAsyncResult asyncResult);
#endregion
#region GetChannel
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
GetChannelResponse GetChannel(GetChannelRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
IAsyncResult BeginGetChannel(GetChannelRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetChannel.</param>
///
/// <returns>Returns a GetChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
GetChannelResponse EndGetChannel(IAsyncResult asyncResult);
#endregion
#region GetEventDataStore
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
GetEventDataStoreResponse GetEventDataStore(GetEventDataStoreRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
IAsyncResult BeginGetEventDataStore(GetEventDataStoreRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetEventDataStore.</param>
///
/// <returns>Returns a GetEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
GetEventDataStoreResponse EndGetEventDataStore(IAsyncResult asyncResult);
#endregion
#region GetEventSelectors
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
GetEventSelectorsResponse GetEventSelectors(GetEventSelectorsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetEventSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetEventSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
IAsyncResult BeginGetEventSelectors(GetEventSelectorsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetEventSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetEventSelectors.</param>
///
/// <returns>Returns a GetEventSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
GetEventSelectorsResponse EndGetEventSelectors(IAsyncResult asyncResult);
#endregion
#region GetImport
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
GetImportResponse GetImport(GetImportRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetImport operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetImport operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetImport
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
IAsyncResult BeginGetImport(GetImportRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetImport operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetImport.</param>
///
/// <returns>Returns a GetImportResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
GetImportResponse EndGetImport(IAsyncResult asyncResult);
#endregion
#region GetInsightSelectors
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
GetInsightSelectorsResponse GetInsightSelectors(GetInsightSelectorsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetInsightSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetInsightSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
IAsyncResult BeginGetInsightSelectors(GetInsightSelectorsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetInsightSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetInsightSelectors.</param>
///
/// <returns>Returns a GetInsightSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
GetInsightSelectorsResponse EndGetInsightSelectors(IAsyncResult asyncResult);
#endregion
#region GetQueryResults
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
GetQueryResultsResponse GetQueryResults(GetQueryResultsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetQueryResults operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetQueryResults
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
IAsyncResult BeginGetQueryResults(GetQueryResultsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetQueryResults operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetQueryResults.</param>
///
/// <returns>Returns a GetQueryResultsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
GetQueryResultsResponse EndGetQueryResults(IAsyncResult asyncResult);
#endregion
#region GetResourcePolicy
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
GetResourcePolicyResponse GetResourcePolicy(GetResourcePolicyRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetResourcePolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetResourcePolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
IAsyncResult BeginGetResourcePolicy(GetResourcePolicyRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetResourcePolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetResourcePolicy.</param>
///
/// <returns>Returns a GetResourcePolicyResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
GetResourcePolicyResponse EndGetResourcePolicy(IAsyncResult asyncResult);
#endregion
#region GetTrail
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
GetTrailResponse GetTrail(GetTrailRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
IAsyncResult BeginGetTrail(GetTrailRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetTrail.</param>
///
/// <returns>Returns a GetTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
GetTrailResponse EndGetTrail(IAsyncResult asyncResult);
#endregion
#region GetTrailStatus
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
GetTrailStatusResponse GetTrailStatus(GetTrailStatusRequest request);
/// <summary>
/// Initiates the asynchronous execution of the GetTrailStatus operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetTrailStatus
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
IAsyncResult BeginGetTrailStatus(GetTrailStatusRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the GetTrailStatus operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetTrailStatus.</param>
///
/// <returns>Returns a GetTrailStatusResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
GetTrailStatusResponse EndGetTrailStatus(IAsyncResult asyncResult);
#endregion
#region ListChannels
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
ListChannelsResponse ListChannels(ListChannelsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListChannels operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListChannels operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListChannels
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
IAsyncResult BeginListChannels(ListChannelsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListChannels operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListChannels.</param>
///
/// <returns>Returns a ListChannelsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
ListChannelsResponse EndListChannels(IAsyncResult asyncResult);
#endregion
#region ListEventDataStores
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
ListEventDataStoresResponse ListEventDataStores(ListEventDataStoresRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListEventDataStores operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListEventDataStores
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
IAsyncResult BeginListEventDataStores(ListEventDataStoresRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListEventDataStores operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListEventDataStores.</param>
///
/// <returns>Returns a ListEventDataStoresResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
ListEventDataStoresResponse EndListEventDataStores(IAsyncResult asyncResult);
#endregion
#region ListImportFailures
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
ListImportFailuresResponse ListImportFailures(ListImportFailuresRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListImportFailures operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListImportFailures
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
IAsyncResult BeginListImportFailures(ListImportFailuresRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListImportFailures operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListImportFailures.</param>
///
/// <returns>Returns a ListImportFailuresResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
ListImportFailuresResponse EndListImportFailures(IAsyncResult asyncResult);
#endregion
#region ListImports
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
ListImportsResponse ListImports(ListImportsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListImports operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListImports operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListImports
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
IAsyncResult BeginListImports(ListImportsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListImports operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListImports.</param>
///
/// <returns>Returns a ListImportsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
ListImportsResponse EndListImports(IAsyncResult asyncResult);
#endregion
#region ListPublicKeys
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
ListPublicKeysResponse ListPublicKeys(ListPublicKeysRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListPublicKeys operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListPublicKeys
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
IAsyncResult BeginListPublicKeys(ListPublicKeysRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListPublicKeys operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListPublicKeys.</param>
///
/// <returns>Returns a ListPublicKeysResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
ListPublicKeysResponse EndListPublicKeys(IAsyncResult asyncResult);
#endregion
#region ListQueries
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
ListQueriesResponse ListQueries(ListQueriesRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListQueries operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListQueries operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListQueries
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
IAsyncResult BeginListQueries(ListQueriesRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListQueries operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListQueries.</param>
///
/// <returns>Returns a ListQueriesResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
ListQueriesResponse EndListQueries(IAsyncResult asyncResult);
#endregion
#region ListTags
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
ListTagsResponse ListTags(ListTagsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListTags operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
IAsyncResult BeginListTags(ListTagsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListTags.</param>
///
/// <returns>Returns a ListTagsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
ListTagsResponse EndListTags(IAsyncResult asyncResult);
#endregion
#region ListTrails
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
ListTrailsResponse ListTrails(ListTrailsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the ListTrails operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the ListTrails operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListTrails
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
IAsyncResult BeginListTrails(ListTrailsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the ListTrails operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginListTrails.</param>
///
/// <returns>Returns a ListTrailsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
ListTrailsResponse EndListTrails(IAsyncResult asyncResult);
#endregion
#region LookupEvents
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
LookupEventsResponse LookupEvents(LookupEventsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the LookupEvents operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the LookupEvents operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndLookupEvents
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
IAsyncResult BeginLookupEvents(LookupEventsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the LookupEvents operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginLookupEvents.</param>
///
/// <returns>Returns a LookupEventsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
LookupEventsResponse EndLookupEvents(IAsyncResult asyncResult);
#endregion
#region PutEventSelectors
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
PutEventSelectorsResponse PutEventSelectors(PutEventSelectorsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the PutEventSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutEventSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
IAsyncResult BeginPutEventSelectors(PutEventSelectorsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the PutEventSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutEventSelectors.</param>
///
/// <returns>Returns a PutEventSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
PutEventSelectorsResponse EndPutEventSelectors(IAsyncResult asyncResult);
#endregion
#region PutInsightSelectors
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
PutInsightSelectorsResponse PutInsightSelectors(PutInsightSelectorsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the PutInsightSelectors operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutInsightSelectors
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
IAsyncResult BeginPutInsightSelectors(PutInsightSelectorsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the PutInsightSelectors operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutInsightSelectors.</param>
///
/// <returns>Returns a PutInsightSelectorsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
PutInsightSelectorsResponse EndPutInsightSelectors(IAsyncResult asyncResult);
#endregion
#region PutResourcePolicy
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
PutResourcePolicyResponse PutResourcePolicy(PutResourcePolicyRequest request);
/// <summary>
/// Initiates the asynchronous execution of the PutResourcePolicy operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutResourcePolicy
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
IAsyncResult BeginPutResourcePolicy(PutResourcePolicyRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the PutResourcePolicy operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutResourcePolicy.</param>
///
/// <returns>Returns a PutResourcePolicyResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
PutResourcePolicyResponse EndPutResourcePolicy(IAsyncResult asyncResult);
#endregion
#region RegisterOrganizationDelegatedAdmin
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
RegisterOrganizationDelegatedAdminResponse RegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request);
/// <summary>
/// Initiates the asynchronous execution of the RegisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRegisterOrganizationDelegatedAdmin
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
IAsyncResult BeginRegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the RegisterOrganizationDelegatedAdmin operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRegisterOrganizationDelegatedAdmin.</param>
///
/// <returns>Returns a RegisterOrganizationDelegatedAdminResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
RegisterOrganizationDelegatedAdminResponse EndRegisterOrganizationDelegatedAdmin(IAsyncResult asyncResult);
#endregion
#region RemoveTags
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
RemoveTagsResponse RemoveTags(RemoveTagsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RemoveTags operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemoveTags
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
IAsyncResult BeginRemoveTags(RemoveTagsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the RemoveTags operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemoveTags.</param>
///
/// <returns>Returns a RemoveTagsResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
RemoveTagsResponse EndRemoveTags(IAsyncResult asyncResult);
#endregion
#region RestoreEventDataStore
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
RestoreEventDataStoreResponse RestoreEventDataStore(RestoreEventDataStoreRequest request);
/// <summary>
/// Initiates the asynchronous execution of the RestoreEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRestoreEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
IAsyncResult BeginRestoreEventDataStore(RestoreEventDataStoreRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the RestoreEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginRestoreEventDataStore.</param>
///
/// <returns>Returns a RestoreEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
RestoreEventDataStoreResponse EndRestoreEventDataStore(IAsyncResult asyncResult);
#endregion
#region StartEventDataStoreIngestion
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
StartEventDataStoreIngestionResponse StartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StartEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartEventDataStoreIngestion
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
IAsyncResult BeginStartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StartEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartEventDataStoreIngestion.</param>
///
/// <returns>Returns a StartEventDataStoreIngestionResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
StartEventDataStoreIngestionResponse EndStartEventDataStoreIngestion(IAsyncResult asyncResult);
#endregion
#region StartImport
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
StartImportResponse StartImport(StartImportRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StartImport operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartImport operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartImport
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
IAsyncResult BeginStartImport(StartImportRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StartImport operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartImport.</param>
///
/// <returns>Returns a StartImportResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
StartImportResponse EndStartImport(IAsyncResult asyncResult);
#endregion
#region StartLogging
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
StartLoggingResponse StartLogging(StartLoggingRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StartLogging operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartLogging operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartLogging
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
IAsyncResult BeginStartLogging(StartLoggingRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StartLogging operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartLogging.</param>
///
/// <returns>Returns a StartLoggingResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
StartLoggingResponse EndStartLogging(IAsyncResult asyncResult);
#endregion
#region StartQuery
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
StartQueryResponse StartQuery(StartQueryRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StartQuery operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StartQuery operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartQuery
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
IAsyncResult BeginStartQuery(StartQueryRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StartQuery operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStartQuery.</param>
///
/// <returns>Returns a StartQueryResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
StartQueryResponse EndStartQuery(IAsyncResult asyncResult);
#endregion
#region StopEventDataStoreIngestion
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
StopEventDataStoreIngestionResponse StopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StopEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopEventDataStoreIngestion
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
IAsyncResult BeginStopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StopEventDataStoreIngestion operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopEventDataStoreIngestion.</param>
///
/// <returns>Returns a StopEventDataStoreIngestionResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
StopEventDataStoreIngestionResponse EndStopEventDataStoreIngestion(IAsyncResult asyncResult);
#endregion
#region StopImport
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
StopImportResponse StopImport(StopImportRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StopImport operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopImport operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopImport
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
IAsyncResult BeginStopImport(StopImportRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StopImport operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopImport.</param>
///
/// <returns>Returns a StopImportResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
StopImportResponse EndStopImport(IAsyncResult asyncResult);
#endregion
#region StopLogging
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
StopLoggingResponse StopLogging(StopLoggingRequest request);
/// <summary>
/// Initiates the asynchronous execution of the StopLogging operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the StopLogging operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStopLogging
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
IAsyncResult BeginStopLogging(StopLoggingRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the StopLogging operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginStopLogging.</param>
///
/// <returns>Returns a StopLoggingResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
StopLoggingResponse EndStopLogging(IAsyncResult asyncResult);
#endregion
#region UpdateChannel
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
UpdateChannelResponse UpdateChannel(UpdateChannelRequest request);
/// <summary>
/// Initiates the asynchronous execution of the UpdateChannel operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateChannel
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
IAsyncResult BeginUpdateChannel(UpdateChannelRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the UpdateChannel operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateChannel.</param>
///
/// <returns>Returns a UpdateChannelResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
UpdateChannelResponse EndUpdateChannel(IAsyncResult asyncResult);
#endregion
#region UpdateEventDataStore
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
UpdateEventDataStoreResponse UpdateEventDataStore(UpdateEventDataStoreRequest request);
/// <summary>
/// Initiates the asynchronous execution of the UpdateEventDataStore operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateEventDataStore
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
IAsyncResult BeginUpdateEventDataStore(UpdateEventDataStoreRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the UpdateEventDataStore operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateEventDataStore.</param>
///
/// <returns>Returns a UpdateEventDataStoreResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
UpdateEventDataStoreResponse EndUpdateEventDataStore(IAsyncResult asyncResult);
#endregion
#region UpdateTrail
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
UpdateTrailResponse UpdateTrail(UpdateTrailRequest request);
/// <summary>
/// Initiates the asynchronous execution of the UpdateTrail operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail operation on AmazonCloudTrailClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateTrail
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
IAsyncResult BeginUpdateTrail(UpdateTrailRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the UpdateTrail operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateTrail.</param>
///
/// <returns>Returns a UpdateTrailResult from CloudTrail.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
UpdateTrailResponse EndUpdateTrail(IAsyncResult asyncResult);
#endregion
}
} | 4,747 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.CloudTrail.Model;
using Amazon.CloudTrail.Model.Internal.MarshallTransformations;
using Amazon.CloudTrail.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrail
{
/// <summary>
/// Implementation for accessing CloudTrail
///
/// CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records Amazon Web Services API calls for your Amazon
/// Web Services account and delivers log files to an Amazon S3 bucket. The recorded information
/// includes the identity of the user, the start time of the Amazon Web Services API call,
/// the source IP address, the request parameters, and the response elements returned
/// by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
/// consist of libraries and sample code for various programming languages and platforms
/// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail.
/// For example, the SDKs handle cryptographically signing requests, managing errors,
/// and retrying requests automatically. For more information about the Amazon Web Services
/// SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
/// to Build on Amazon Web Services</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
/// User Guide</a> for information about the data that is included with each Amazon Web
/// Services API call listed in the log files.
/// </para>
/// </summary>
public partial class AmazonCloudTrailClient : AmazonServiceClient, IAmazonCloudTrail
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailMetadata();
private ICloudTrailPaginatorFactory _paginators;
/// <summary>
/// Paginators for the service
/// </summary>
public ICloudTrailPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new CloudTrailPaginatorFactory(this);
}
return this._paginators;
}
}
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AmazonCloudTrailConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AWSCredentials credentials, AmazonCloudTrailConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customize the pipeline
/// </summary>
/// <param name="pipeline"></param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler<Amazon.Runtime.Internal.EndpointResolver>();
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new AmazonCloudTrailEndpointResolver());
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AddTags
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual AddTagsResponse AddTags(AddTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return Invoke<AddTagsResponse>(request, options);
}
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return InvokeAsync<AddTagsResponse>(request, options, cancellationToken);
}
#endregion
#region CancelQuery
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
public virtual CancelQueryResponse CancelQuery(CancelQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance;
return Invoke<CancelQueryResponse>(request, options);
}
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
public virtual Task<CancelQueryResponse> CancelQueryAsync(CancelQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance;
return InvokeAsync<CancelQueryResponse>(request, options, cancellationToken);
}
#endregion
#region CreateChannel
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
public virtual CreateChannelResponse CreateChannel(CreateChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateChannelResponseUnmarshaller.Instance;
return Invoke<CreateChannelResponse>(request, options);
}
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
public virtual Task<CreateChannelResponse> CreateChannelAsync(CreateChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateChannelResponseUnmarshaller.Instance;
return InvokeAsync<CreateChannelResponse>(request, options, cancellationToken);
}
#endregion
#region CreateEventDataStore
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
public virtual CreateEventDataStoreResponse CreateEventDataStore(CreateEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventDataStoreResponseUnmarshaller.Instance;
return Invoke<CreateEventDataStoreResponse>(request, options);
}
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
public virtual Task<CreateEventDataStoreResponse> CreateEventDataStoreAsync(CreateEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<CreateEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTrail
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual CreateTrailResponse CreateTrail(CreateTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrailResponseUnmarshaller.Instance;
return Invoke<CreateTrailResponse>(request, options);
}
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual Task<CreateTrailResponse> CreateTrailAsync(CreateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrailResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrailResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteChannel
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
public virtual DeleteChannelResponse DeleteChannel(DeleteChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteChannelResponseUnmarshaller.Instance;
return Invoke<DeleteChannelResponse>(request, options);
}
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
public virtual Task<DeleteChannelResponse> DeleteChannelAsync(DeleteChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteChannelResponseUnmarshaller.Instance;
return InvokeAsync<DeleteChannelResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteEventDataStore
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
public virtual DeleteEventDataStoreResponse DeleteEventDataStore(DeleteEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventDataStoreResponseUnmarshaller.Instance;
return Invoke<DeleteEventDataStoreResponse>(request, options);
}
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
public virtual Task<DeleteEventDataStoreResponse> DeleteEventDataStoreAsync(DeleteEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<DeleteEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteResourcePolicy
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
public virtual DeleteResourcePolicyResponse DeleteResourcePolicy(DeleteResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteResourcePolicyResponseUnmarshaller.Instance;
return Invoke<DeleteResourcePolicyResponse>(request, options);
}
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
public virtual Task<DeleteResourcePolicyResponse> DeleteResourcePolicyAsync(DeleteResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteResourcePolicyResponseUnmarshaller.Instance;
return InvokeAsync<DeleteResourcePolicyResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTrail
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual DeleteTrailResponse DeleteTrail(DeleteTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return Invoke<DeleteTrailResponse>(request, options);
}
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual Task<DeleteTrailResponse> DeleteTrailAsync(DeleteTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrailResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterOrganizationDelegatedAdmin
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
public virtual DeregisterOrganizationDelegatedAdminResponse DeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return Invoke<DeregisterOrganizationDelegatedAdminResponse>(request, options);
}
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
public virtual Task<DeregisterOrganizationDelegatedAdminResponse> DeregisterOrganizationDelegatedAdminAsync(DeregisterOrganizationDelegatedAdminRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterOrganizationDelegatedAdminResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeQuery
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
public virtual DescribeQueryResponse DescribeQuery(DescribeQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeQueryResponseUnmarshaller.Instance;
return Invoke<DescribeQueryResponse>(request, options);
}
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
public virtual Task<DescribeQueryResponse> DescribeQueryAsync(DescribeQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeQueryResponseUnmarshaller.Instance;
return InvokeAsync<DescribeQueryResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTrails
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse DescribeTrails()
{
return DescribeTrails(new DescribeTrailsRequest());
}
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual DescribeTrailsResponse DescribeTrails(DescribeTrailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return Invoke<DescribeTrailsResponse>(request, options);
}
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual Task<DescribeTrailsResponse> DescribeTrailsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeTrailsAsync(new DescribeTrailsRequest(), cancellationToken);
}
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual Task<DescribeTrailsResponse> DescribeTrailsAsync(DescribeTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTrailsResponse>(request, options, cancellationToken);
}
#endregion
#region GetChannel
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
public virtual GetChannelResponse GetChannel(GetChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetChannelResponseUnmarshaller.Instance;
return Invoke<GetChannelResponse>(request, options);
}
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
public virtual Task<GetChannelResponse> GetChannelAsync(GetChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetChannelResponseUnmarshaller.Instance;
return InvokeAsync<GetChannelResponse>(request, options, cancellationToken);
}
#endregion
#region GetEventDataStore
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
public virtual GetEventDataStoreResponse GetEventDataStore(GetEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventDataStoreResponseUnmarshaller.Instance;
return Invoke<GetEventDataStoreResponse>(request, options);
}
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
public virtual Task<GetEventDataStoreResponse> GetEventDataStoreAsync(GetEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<GetEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region GetEventSelectors
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual GetEventSelectorsResponse GetEventSelectors(GetEventSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return Invoke<GetEventSelectorsResponse>(request, options);
}
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual Task<GetEventSelectorsResponse> GetEventSelectorsAsync(GetEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<GetEventSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region GetImport
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
public virtual GetImportResponse GetImport(GetImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetImportResponseUnmarshaller.Instance;
return Invoke<GetImportResponse>(request, options);
}
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
public virtual Task<GetImportResponse> GetImportAsync(GetImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetImportResponseUnmarshaller.Instance;
return InvokeAsync<GetImportResponse>(request, options, cancellationToken);
}
#endregion
#region GetInsightSelectors
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
public virtual GetInsightSelectorsResponse GetInsightSelectors(GetInsightSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetInsightSelectorsResponseUnmarshaller.Instance;
return Invoke<GetInsightSelectorsResponse>(request, options);
}
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
public virtual Task<GetInsightSelectorsResponse> GetInsightSelectorsAsync(GetInsightSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetInsightSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<GetInsightSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region GetQueryResults
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
public virtual GetQueryResultsResponse GetQueryResults(GetQueryResultsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetQueryResultsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetQueryResultsResponseUnmarshaller.Instance;
return Invoke<GetQueryResultsResponse>(request, options);
}
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
public virtual Task<GetQueryResultsResponse> GetQueryResultsAsync(GetQueryResultsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetQueryResultsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetQueryResultsResponseUnmarshaller.Instance;
return InvokeAsync<GetQueryResultsResponse>(request, options, cancellationToken);
}
#endregion
#region GetResourcePolicy
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
public virtual GetResourcePolicyResponse GetResourcePolicy(GetResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourcePolicyResponseUnmarshaller.Instance;
return Invoke<GetResourcePolicyResponse>(request, options);
}
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
public virtual Task<GetResourcePolicyResponse> GetResourcePolicyAsync(GetResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourcePolicyResponseUnmarshaller.Instance;
return InvokeAsync<GetResourcePolicyResponse>(request, options, cancellationToken);
}
#endregion
#region GetTrail
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
public virtual GetTrailResponse GetTrail(GetTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailResponseUnmarshaller.Instance;
return Invoke<GetTrailResponse>(request, options);
}
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
public virtual Task<GetTrailResponse> GetTrailAsync(GetTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailResponseUnmarshaller.Instance;
return InvokeAsync<GetTrailResponse>(request, options, cancellationToken);
}
#endregion
#region GetTrailStatus
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual GetTrailStatusResponse GetTrailStatus(GetTrailStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return Invoke<GetTrailStatusResponse>(request, options);
}
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual Task<GetTrailStatusResponse> GetTrailStatusAsync(GetTrailStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return InvokeAsync<GetTrailStatusResponse>(request, options, cancellationToken);
}
#endregion
#region ListChannels
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
public virtual ListChannelsResponse ListChannels(ListChannelsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListChannelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListChannelsResponseUnmarshaller.Instance;
return Invoke<ListChannelsResponse>(request, options);
}
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
public virtual Task<ListChannelsResponse> ListChannelsAsync(ListChannelsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListChannelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListChannelsResponseUnmarshaller.Instance;
return InvokeAsync<ListChannelsResponse>(request, options, cancellationToken);
}
#endregion
#region ListEventDataStores
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
public virtual ListEventDataStoresResponse ListEventDataStores(ListEventDataStoresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEventDataStoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEventDataStoresResponseUnmarshaller.Instance;
return Invoke<ListEventDataStoresResponse>(request, options);
}
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
public virtual Task<ListEventDataStoresResponse> ListEventDataStoresAsync(ListEventDataStoresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEventDataStoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEventDataStoresResponseUnmarshaller.Instance;
return InvokeAsync<ListEventDataStoresResponse>(request, options, cancellationToken);
}
#endregion
#region ListImportFailures
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
public virtual ListImportFailuresResponse ListImportFailures(ListImportFailuresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportFailuresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportFailuresResponseUnmarshaller.Instance;
return Invoke<ListImportFailuresResponse>(request, options);
}
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
public virtual Task<ListImportFailuresResponse> ListImportFailuresAsync(ListImportFailuresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportFailuresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportFailuresResponseUnmarshaller.Instance;
return InvokeAsync<ListImportFailuresResponse>(request, options, cancellationToken);
}
#endregion
#region ListImports
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
public virtual ListImportsResponse ListImports(ListImportsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;
return Invoke<ListImportsResponse>(request, options);
}
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
public virtual Task<ListImportsResponse> ListImportsAsync(ListImportsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;
return InvokeAsync<ListImportsResponse>(request, options, cancellationToken);
}
#endregion
#region ListPublicKeys
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual ListPublicKeysResponse ListPublicKeys(ListPublicKeysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPublicKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return Invoke<ListPublicKeysResponse>(request, options);
}
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual Task<ListPublicKeysResponse> ListPublicKeysAsync(ListPublicKeysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPublicKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return InvokeAsync<ListPublicKeysResponse>(request, options, cancellationToken);
}
#endregion
#region ListQueries
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
public virtual ListQueriesResponse ListQueries(ListQueriesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListQueriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListQueriesResponseUnmarshaller.Instance;
return Invoke<ListQueriesResponse>(request, options);
}
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
public virtual Task<ListQueriesResponse> ListQueriesAsync(ListQueriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListQueriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListQueriesResponseUnmarshaller.Instance;
return InvokeAsync<ListQueriesResponse>(request, options, cancellationToken);
}
#endregion
#region ListTags
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual ListTagsResponse ListTags(ListTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return Invoke<ListTagsResponse>(request, options);
}
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual Task<ListTagsResponse> ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return InvokeAsync<ListTagsResponse>(request, options, cancellationToken);
}
#endregion
#region ListTrails
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
public virtual ListTrailsResponse ListTrails(ListTrailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTrailsResponseUnmarshaller.Instance;
return Invoke<ListTrailsResponse>(request, options);
}
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
public virtual Task<ListTrailsResponse> ListTrailsAsync(ListTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTrailsResponseUnmarshaller.Instance;
return InvokeAsync<ListTrailsResponse>(request, options, cancellationToken);
}
#endregion
#region LookupEvents
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual LookupEventsResponse LookupEvents(LookupEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = LookupEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = LookupEventsResponseUnmarshaller.Instance;
return Invoke<LookupEventsResponse>(request, options);
}
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual Task<LookupEventsResponse> LookupEventsAsync(LookupEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = LookupEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = LookupEventsResponseUnmarshaller.Instance;
return InvokeAsync<LookupEventsResponse>(request, options, cancellationToken);
}
#endregion
#region PutEventSelectors
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual PutEventSelectorsResponse PutEventSelectors(PutEventSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return Invoke<PutEventSelectorsResponse>(request, options);
}
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual Task<PutEventSelectorsResponse> PutEventSelectorsAsync(PutEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<PutEventSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region PutInsightSelectors
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
public virtual PutInsightSelectorsResponse PutInsightSelectors(PutInsightSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutInsightSelectorsResponseUnmarshaller.Instance;
return Invoke<PutInsightSelectorsResponse>(request, options);
}
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
public virtual Task<PutInsightSelectorsResponse> PutInsightSelectorsAsync(PutInsightSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutInsightSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<PutInsightSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region PutResourcePolicy
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
public virtual PutResourcePolicyResponse PutResourcePolicy(PutResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutResourcePolicyResponseUnmarshaller.Instance;
return Invoke<PutResourcePolicyResponse>(request, options);
}
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
public virtual Task<PutResourcePolicyResponse> PutResourcePolicyAsync(PutResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutResourcePolicyResponseUnmarshaller.Instance;
return InvokeAsync<PutResourcePolicyResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterOrganizationDelegatedAdmin
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
public virtual RegisterOrganizationDelegatedAdminResponse RegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return Invoke<RegisterOrganizationDelegatedAdminResponse>(request, options);
}
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
public virtual Task<RegisterOrganizationDelegatedAdminResponse> RegisterOrganizationDelegatedAdminAsync(RegisterOrganizationDelegatedAdminRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return InvokeAsync<RegisterOrganizationDelegatedAdminResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveTags
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual RemoveTagsResponse RemoveTags(RemoveTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return Invoke<RemoveTagsResponse>(request, options);
}
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual Task<RemoveTagsResponse> RemoveTagsAsync(RemoveTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return InvokeAsync<RemoveTagsResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreEventDataStore
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
public virtual RestoreEventDataStoreResponse RestoreEventDataStore(RestoreEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreEventDataStoreResponseUnmarshaller.Instance;
return Invoke<RestoreEventDataStoreResponse>(request, options);
}
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
public virtual Task<RestoreEventDataStoreResponse> RestoreEventDataStoreAsync(RestoreEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<RestoreEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region StartEventDataStoreIngestion
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
public virtual StartEventDataStoreIngestionResponse StartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartEventDataStoreIngestionResponseUnmarshaller.Instance;
return Invoke<StartEventDataStoreIngestionResponse>(request, options);
}
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
public virtual Task<StartEventDataStoreIngestionResponse> StartEventDataStoreIngestionAsync(StartEventDataStoreIngestionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartEventDataStoreIngestionResponseUnmarshaller.Instance;
return InvokeAsync<StartEventDataStoreIngestionResponse>(request, options, cancellationToken);
}
#endregion
#region StartImport
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
public virtual StartImportResponse StartImport(StartImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartImportResponseUnmarshaller.Instance;
return Invoke<StartImportResponse>(request, options);
}
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
public virtual Task<StartImportResponse> StartImportAsync(StartImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartImportResponseUnmarshaller.Instance;
return InvokeAsync<StartImportResponse>(request, options, cancellationToken);
}
#endregion
#region StartLogging
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual StartLoggingResponse StartLogging(StartLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance;
return Invoke<StartLoggingResponse>(request, options);
}
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual Task<StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance;
return InvokeAsync<StartLoggingResponse>(request, options, cancellationToken);
}
#endregion
#region StartQuery
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
public virtual StartQueryResponse StartQuery(StartQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartQueryResponseUnmarshaller.Instance;
return Invoke<StartQueryResponse>(request, options);
}
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
public virtual Task<StartQueryResponse> StartQueryAsync(StartQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartQueryResponseUnmarshaller.Instance;
return InvokeAsync<StartQueryResponse>(request, options, cancellationToken);
}
#endregion
#region StopEventDataStoreIngestion
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
public virtual StopEventDataStoreIngestionResponse StopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopEventDataStoreIngestionResponseUnmarshaller.Instance;
return Invoke<StopEventDataStoreIngestionResponse>(request, options);
}
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
public virtual Task<StopEventDataStoreIngestionResponse> StopEventDataStoreIngestionAsync(StopEventDataStoreIngestionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopEventDataStoreIngestionResponseUnmarshaller.Instance;
return InvokeAsync<StopEventDataStoreIngestionResponse>(request, options, cancellationToken);
}
#endregion
#region StopImport
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
public virtual StopImportResponse StopImport(StopImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopImportResponseUnmarshaller.Instance;
return Invoke<StopImportResponse>(request, options);
}
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
public virtual Task<StopImportResponse> StopImportAsync(StopImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopImportResponseUnmarshaller.Instance;
return InvokeAsync<StopImportResponse>(request, options, cancellationToken);
}
#endregion
#region StopLogging
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual StopLoggingResponse StopLogging(StopLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;
return Invoke<StopLoggingResponse>(request, options);
}
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual Task<StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;
return InvokeAsync<StopLoggingResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateChannel
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
public virtual UpdateChannelResponse UpdateChannel(UpdateChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateChannelResponseUnmarshaller.Instance;
return Invoke<UpdateChannelResponse>(request, options);
}
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
public virtual Task<UpdateChannelResponse> UpdateChannelAsync(UpdateChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateChannelResponseUnmarshaller.Instance;
return InvokeAsync<UpdateChannelResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateEventDataStore
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
public virtual UpdateEventDataStoreResponse UpdateEventDataStore(UpdateEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateEventDataStoreResponseUnmarshaller.Instance;
return Invoke<UpdateEventDataStoreResponse>(request, options);
}
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
public virtual Task<UpdateEventDataStoreResponse> UpdateEventDataStoreAsync(UpdateEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<UpdateEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateTrail
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual UpdateTrailResponse UpdateTrail(UpdateTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return Invoke<UpdateTrailResponse>(request, options);
}
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return InvokeAsync<UpdateTrailResponse>(request, options, cancellationToken);
}
#endregion
}
} | 7,853 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.CloudTrail.Model;
namespace Amazon.CloudTrail
{
/// <summary>
/// Interface for accessing CloudTrail
///
/// CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records Amazon Web Services API calls for your Amazon
/// Web Services account and delivers log files to an Amazon S3 bucket. The recorded information
/// includes the identity of the user, the start time of the Amazon Web Services API call,
/// the source IP address, the request parameters, and the response elements returned
/// by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
/// consist of libraries and sample code for various programming languages and platforms
/// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail.
/// For example, the SDKs handle cryptographically signing requests, managing errors,
/// and retrying requests automatically. For more information about the Amazon Web Services
/// SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
/// to Build on Amazon Web Services</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
/// User Guide</a> for information about the data that is included with each Amazon Web
/// Services API call listed in the log files.
/// </para>
/// </summary>
public partial interface IAmazonCloudTrail : IAmazonService, IDisposable
{
/// <summary>
/// Paginators for the service
/// </summary>
ICloudTrailPaginatorFactory Paginators { get; }
#region AddTags
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
AddTagsResponse AddTags(AddTagsRequest request);
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CancelQuery
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
CancelQueryResponse CancelQuery(CancelQueryRequest request);
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
Task<CancelQueryResponse> CancelQueryAsync(CancelQueryRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateChannel
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
CreateChannelResponse CreateChannel(CreateChannelRequest request);
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
Task<CreateChannelResponse> CreateChannelAsync(CreateChannelRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateEventDataStore
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
CreateEventDataStoreResponse CreateEventDataStore(CreateEventDataStoreRequest request);
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
Task<CreateEventDataStoreResponse> CreateEventDataStoreAsync(CreateEventDataStoreRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateTrail
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
CreateTrailResponse CreateTrail(CreateTrailRequest request);
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
Task<CreateTrailResponse> CreateTrailAsync(CreateTrailRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteChannel
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
DeleteChannelResponse DeleteChannel(DeleteChannelRequest request);
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
Task<DeleteChannelResponse> DeleteChannelAsync(DeleteChannelRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteEventDataStore
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
DeleteEventDataStoreResponse DeleteEventDataStore(DeleteEventDataStoreRequest request);
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
Task<DeleteEventDataStoreResponse> DeleteEventDataStoreAsync(DeleteEventDataStoreRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteResourcePolicy
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
DeleteResourcePolicyResponse DeleteResourcePolicy(DeleteResourcePolicyRequest request);
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
Task<DeleteResourcePolicyResponse> DeleteResourcePolicyAsync(DeleteResourcePolicyRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteTrail
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
DeleteTrailResponse DeleteTrail(DeleteTrailRequest request);
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
Task<DeleteTrailResponse> DeleteTrailAsync(DeleteTrailRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeregisterOrganizationDelegatedAdmin
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
DeregisterOrganizationDelegatedAdminResponse DeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request);
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
Task<DeregisterOrganizationDelegatedAdminResponse> DeregisterOrganizationDelegatedAdminAsync(DeregisterOrganizationDelegatedAdminRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeQuery
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
DescribeQueryResponse DescribeQuery(DescribeQueryRequest request);
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
Task<DescribeQueryResponse> DescribeQueryAsync(DescribeQueryRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeTrails
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
DescribeTrailsResponse DescribeTrails();
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
DescribeTrailsResponse DescribeTrails(DescribeTrailsRequest request);
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
Task<DescribeTrailsResponse> DescribeTrailsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
Task<DescribeTrailsResponse> DescribeTrailsAsync(DescribeTrailsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetChannel
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
GetChannelResponse GetChannel(GetChannelRequest request);
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
Task<GetChannelResponse> GetChannelAsync(GetChannelRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetEventDataStore
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
GetEventDataStoreResponse GetEventDataStore(GetEventDataStoreRequest request);
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
Task<GetEventDataStoreResponse> GetEventDataStoreAsync(GetEventDataStoreRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetEventSelectors
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
GetEventSelectorsResponse GetEventSelectors(GetEventSelectorsRequest request);
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
Task<GetEventSelectorsResponse> GetEventSelectorsAsync(GetEventSelectorsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetImport
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
GetImportResponse GetImport(GetImportRequest request);
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
Task<GetImportResponse> GetImportAsync(GetImportRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetInsightSelectors
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
GetInsightSelectorsResponse GetInsightSelectors(GetInsightSelectorsRequest request);
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
Task<GetInsightSelectorsResponse> GetInsightSelectorsAsync(GetInsightSelectorsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetQueryResults
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
GetQueryResultsResponse GetQueryResults(GetQueryResultsRequest request);
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
Task<GetQueryResultsResponse> GetQueryResultsAsync(GetQueryResultsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetResourcePolicy
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
GetResourcePolicyResponse GetResourcePolicy(GetResourcePolicyRequest request);
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
Task<GetResourcePolicyResponse> GetResourcePolicyAsync(GetResourcePolicyRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetTrail
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
GetTrailResponse GetTrail(GetTrailRequest request);
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
Task<GetTrailResponse> GetTrailAsync(GetTrailRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetTrailStatus
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
GetTrailStatusResponse GetTrailStatus(GetTrailStatusRequest request);
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
Task<GetTrailStatusResponse> GetTrailStatusAsync(GetTrailStatusRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListChannels
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
ListChannelsResponse ListChannels(ListChannelsRequest request);
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
Task<ListChannelsResponse> ListChannelsAsync(ListChannelsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListEventDataStores
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
ListEventDataStoresResponse ListEventDataStores(ListEventDataStoresRequest request);
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
Task<ListEventDataStoresResponse> ListEventDataStoresAsync(ListEventDataStoresRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListImportFailures
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
ListImportFailuresResponse ListImportFailures(ListImportFailuresRequest request);
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
Task<ListImportFailuresResponse> ListImportFailuresAsync(ListImportFailuresRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListImports
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
ListImportsResponse ListImports(ListImportsRequest request);
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
Task<ListImportsResponse> ListImportsAsync(ListImportsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListPublicKeys
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
ListPublicKeysResponse ListPublicKeys(ListPublicKeysRequest request);
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
Task<ListPublicKeysResponse> ListPublicKeysAsync(ListPublicKeysRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListQueries
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
ListQueriesResponse ListQueries(ListQueriesRequest request);
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
Task<ListQueriesResponse> ListQueriesAsync(ListQueriesRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTags
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
ListTagsResponse ListTags(ListTagsRequest request);
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
Task<ListTagsResponse> ListTagsAsync(ListTagsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTrails
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
ListTrailsResponse ListTrails(ListTrailsRequest request);
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
Task<ListTrailsResponse> ListTrailsAsync(ListTrailsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region LookupEvents
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
LookupEventsResponse LookupEvents(LookupEventsRequest request);
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
Task<LookupEventsResponse> LookupEventsAsync(LookupEventsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutEventSelectors
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
PutEventSelectorsResponse PutEventSelectors(PutEventSelectorsRequest request);
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
Task<PutEventSelectorsResponse> PutEventSelectorsAsync(PutEventSelectorsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutInsightSelectors
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
PutInsightSelectorsResponse PutInsightSelectors(PutInsightSelectorsRequest request);
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
Task<PutInsightSelectorsResponse> PutInsightSelectorsAsync(PutInsightSelectorsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutResourcePolicy
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
PutResourcePolicyResponse PutResourcePolicy(PutResourcePolicyRequest request);
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
Task<PutResourcePolicyResponse> PutResourcePolicyAsync(PutResourcePolicyRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region RegisterOrganizationDelegatedAdmin
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
RegisterOrganizationDelegatedAdminResponse RegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request);
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
Task<RegisterOrganizationDelegatedAdminResponse> RegisterOrganizationDelegatedAdminAsync(RegisterOrganizationDelegatedAdminRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region RemoveTags
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
RemoveTagsResponse RemoveTags(RemoveTagsRequest request);
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
Task<RemoveTagsResponse> RemoveTagsAsync(RemoveTagsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region RestoreEventDataStore
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
RestoreEventDataStoreResponse RestoreEventDataStore(RestoreEventDataStoreRequest request);
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
Task<RestoreEventDataStoreResponse> RestoreEventDataStoreAsync(RestoreEventDataStoreRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartEventDataStoreIngestion
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
StartEventDataStoreIngestionResponse StartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request);
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
Task<StartEventDataStoreIngestionResponse> StartEventDataStoreIngestionAsync(StartEventDataStoreIngestionRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartImport
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
StartImportResponse StartImport(StartImportRequest request);
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
Task<StartImportResponse> StartImportAsync(StartImportRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartLogging
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
StartLoggingResponse StartLogging(StartLoggingRequest request);
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
Task<StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartQuery
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
StartQueryResponse StartQuery(StartQueryRequest request);
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
Task<StartQueryResponse> StartQueryAsync(StartQueryRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopEventDataStoreIngestion
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
StopEventDataStoreIngestionResponse StopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request);
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
Task<StopEventDataStoreIngestionResponse> StopEventDataStoreIngestionAsync(StopEventDataStoreIngestionRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopImport
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
StopImportResponse StopImport(StopImportRequest request);
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
Task<StopImportResponse> StopImportAsync(StopImportRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopLogging
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
StopLoggingResponse StopLogging(StopLoggingRequest request);
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
Task<StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateChannel
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
UpdateChannelResponse UpdateChannel(UpdateChannelRequest request);
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
Task<UpdateChannelResponse> UpdateChannelAsync(UpdateChannelRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateEventDataStore
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
UpdateEventDataStoreResponse UpdateEventDataStore(UpdateEventDataStoreRequest request);
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
Task<UpdateEventDataStoreResponse> UpdateEventDataStoreAsync(UpdateEventDataStoreRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateTrail
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
UpdateTrailResponse UpdateTrail(UpdateTrailRequest request);
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 7,029 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.CloudTrail.Model;
using Amazon.CloudTrail.Model.Internal.MarshallTransformations;
using Amazon.CloudTrail.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrail
{
/// <summary>
/// Implementation for accessing CloudTrail
///
/// CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records Amazon Web Services API calls for your Amazon
/// Web Services account and delivers log files to an Amazon S3 bucket. The recorded information
/// includes the identity of the user, the start time of the Amazon Web Services API call,
/// the source IP address, the request parameters, and the response elements returned
/// by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
/// consist of libraries and sample code for various programming languages and platforms
/// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail.
/// For example, the SDKs handle cryptographically signing requests, managing errors,
/// and retrying requests automatically. For more information about the Amazon Web Services
/// SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
/// to Build on Amazon Web Services</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
/// User Guide</a> for information about the data that is included with each Amazon Web
/// Services API call listed in the log files.
/// </para>
/// </summary>
public partial class AmazonCloudTrailClient : AmazonServiceClient, IAmazonCloudTrail
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailMetadata();
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AmazonCloudTrailConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Credentials and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(AWSCredentials credentials, AmazonCloudTrailConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailClient Configuration Object</param>
public AmazonCloudTrailClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#if AWS_ASYNC_ENUMERABLES_API
private ICloudTrailPaginatorFactory _paginators;
/// <summary>
/// Paginators for the service
/// </summary>
public ICloudTrailPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new CloudTrailPaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customizes the runtime pipeline.
/// </summary>
/// <param name="pipeline">Runtime pipeline for the current client.</param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler<Amazon.Runtime.Internal.EndpointResolver>();
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new AmazonCloudTrailEndpointResolver());
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AddTags
internal virtual AddTagsResponse AddTags(AddTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return Invoke<AddTagsResponse>(request, options);
}
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
public virtual Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AddTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AddTagsResponseUnmarshaller.Instance;
return InvokeAsync<AddTagsResponse>(request, options, cancellationToken);
}
#endregion
#region CancelQuery
internal virtual CancelQueryResponse CancelQuery(CancelQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance;
return Invoke<CancelQueryResponse>(request, options);
}
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
public virtual Task<CancelQueryResponse> CancelQueryAsync(CancelQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance;
return InvokeAsync<CancelQueryResponse>(request, options, cancellationToken);
}
#endregion
#region CreateChannel
internal virtual CreateChannelResponse CreateChannel(CreateChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateChannelResponseUnmarshaller.Instance;
return Invoke<CreateChannelResponse>(request, options);
}
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
public virtual Task<CreateChannelResponse> CreateChannelAsync(CreateChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateChannelResponseUnmarshaller.Instance;
return InvokeAsync<CreateChannelResponse>(request, options, cancellationToken);
}
#endregion
#region CreateEventDataStore
internal virtual CreateEventDataStoreResponse CreateEventDataStore(CreateEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventDataStoreResponseUnmarshaller.Instance;
return Invoke<CreateEventDataStoreResponse>(request, options);
}
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
public virtual Task<CreateEventDataStoreResponse> CreateEventDataStoreAsync(CreateEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<CreateEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTrail
internal virtual CreateTrailResponse CreateTrail(CreateTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrailResponseUnmarshaller.Instance;
return Invoke<CreateTrailResponse>(request, options);
}
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
public virtual Task<CreateTrailResponse> CreateTrailAsync(CreateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrailResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrailResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteChannel
internal virtual DeleteChannelResponse DeleteChannel(DeleteChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteChannelResponseUnmarshaller.Instance;
return Invoke<DeleteChannelResponse>(request, options);
}
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
public virtual Task<DeleteChannelResponse> DeleteChannelAsync(DeleteChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteChannelResponseUnmarshaller.Instance;
return InvokeAsync<DeleteChannelResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteEventDataStore
internal virtual DeleteEventDataStoreResponse DeleteEventDataStore(DeleteEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventDataStoreResponseUnmarshaller.Instance;
return Invoke<DeleteEventDataStoreResponse>(request, options);
}
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
public virtual Task<DeleteEventDataStoreResponse> DeleteEventDataStoreAsync(DeleteEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<DeleteEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteResourcePolicy
internal virtual DeleteResourcePolicyResponse DeleteResourcePolicy(DeleteResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteResourcePolicyResponseUnmarshaller.Instance;
return Invoke<DeleteResourcePolicyResponse>(request, options);
}
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
public virtual Task<DeleteResourcePolicyResponse> DeleteResourcePolicyAsync(DeleteResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteResourcePolicyResponseUnmarshaller.Instance;
return InvokeAsync<DeleteResourcePolicyResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTrail
internal virtual DeleteTrailResponse DeleteTrail(DeleteTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return Invoke<DeleteTrailResponse>(request, options);
}
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
public virtual Task<DeleteTrailResponse> DeleteTrailAsync(DeleteTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrailResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrailResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterOrganizationDelegatedAdmin
internal virtual DeregisterOrganizationDelegatedAdminResponse DeregisterOrganizationDelegatedAdmin(DeregisterOrganizationDelegatedAdminRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return Invoke<DeregisterOrganizationDelegatedAdminResponse>(request, options);
}
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
public virtual Task<DeregisterOrganizationDelegatedAdminResponse> DeregisterOrganizationDelegatedAdminAsync(DeregisterOrganizationDelegatedAdminRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterOrganizationDelegatedAdminResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeQuery
internal virtual DescribeQueryResponse DescribeQuery(DescribeQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeQueryResponseUnmarshaller.Instance;
return Invoke<DescribeQueryResponse>(request, options);
}
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
public virtual Task<DescribeQueryResponse> DescribeQueryAsync(DescribeQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeQueryResponseUnmarshaller.Instance;
return InvokeAsync<DescribeQueryResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTrails
internal virtual DescribeTrailsResponse DescribeTrails()
{
return DescribeTrails(new DescribeTrailsRequest());
}
internal virtual DescribeTrailsResponse DescribeTrails(DescribeTrailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return Invoke<DescribeTrailsResponse>(request, options);
}
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual Task<DescribeTrailsResponse> DescribeTrailsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeTrailsAsync(new DescribeTrailsRequest(), cancellationToken);
}
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
public virtual Task<DescribeTrailsResponse> DescribeTrailsAsync(DescribeTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrailsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTrailsResponse>(request, options, cancellationToken);
}
#endregion
#region GetChannel
internal virtual GetChannelResponse GetChannel(GetChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetChannelResponseUnmarshaller.Instance;
return Invoke<GetChannelResponse>(request, options);
}
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
public virtual Task<GetChannelResponse> GetChannelAsync(GetChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetChannelResponseUnmarshaller.Instance;
return InvokeAsync<GetChannelResponse>(request, options, cancellationToken);
}
#endregion
#region GetEventDataStore
internal virtual GetEventDataStoreResponse GetEventDataStore(GetEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventDataStoreResponseUnmarshaller.Instance;
return Invoke<GetEventDataStoreResponse>(request, options);
}
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
public virtual Task<GetEventDataStoreResponse> GetEventDataStoreAsync(GetEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<GetEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region GetEventSelectors
internal virtual GetEventSelectorsResponse GetEventSelectors(GetEventSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return Invoke<GetEventSelectorsResponse>(request, options);
}
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
public virtual Task<GetEventSelectorsResponse> GetEventSelectorsAsync(GetEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEventSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<GetEventSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region GetImport
internal virtual GetImportResponse GetImport(GetImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetImportResponseUnmarshaller.Instance;
return Invoke<GetImportResponse>(request, options);
}
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
public virtual Task<GetImportResponse> GetImportAsync(GetImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetImportResponseUnmarshaller.Instance;
return InvokeAsync<GetImportResponse>(request, options, cancellationToken);
}
#endregion
#region GetInsightSelectors
internal virtual GetInsightSelectorsResponse GetInsightSelectors(GetInsightSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetInsightSelectorsResponseUnmarshaller.Instance;
return Invoke<GetInsightSelectorsResponse>(request, options);
}
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
public virtual Task<GetInsightSelectorsResponse> GetInsightSelectorsAsync(GetInsightSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetInsightSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<GetInsightSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region GetQueryResults
internal virtual GetQueryResultsResponse GetQueryResults(GetQueryResultsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetQueryResultsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetQueryResultsResponseUnmarshaller.Instance;
return Invoke<GetQueryResultsResponse>(request, options);
}
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
public virtual Task<GetQueryResultsResponse> GetQueryResultsAsync(GetQueryResultsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetQueryResultsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetQueryResultsResponseUnmarshaller.Instance;
return InvokeAsync<GetQueryResultsResponse>(request, options, cancellationToken);
}
#endregion
#region GetResourcePolicy
internal virtual GetResourcePolicyResponse GetResourcePolicy(GetResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourcePolicyResponseUnmarshaller.Instance;
return Invoke<GetResourcePolicyResponse>(request, options);
}
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
public virtual Task<GetResourcePolicyResponse> GetResourcePolicyAsync(GetResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourcePolicyResponseUnmarshaller.Instance;
return InvokeAsync<GetResourcePolicyResponse>(request, options, cancellationToken);
}
#endregion
#region GetTrail
internal virtual GetTrailResponse GetTrail(GetTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailResponseUnmarshaller.Instance;
return Invoke<GetTrailResponse>(request, options);
}
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
public virtual Task<GetTrailResponse> GetTrailAsync(GetTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailResponseUnmarshaller.Instance;
return InvokeAsync<GetTrailResponse>(request, options, cancellationToken);
}
#endregion
#region GetTrailStatus
internal virtual GetTrailStatusResponse GetTrailStatus(GetTrailStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return Invoke<GetTrailStatusResponse>(request, options);
}
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
public virtual Task<GetTrailStatusResponse> GetTrailStatusAsync(GetTrailStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTrailStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTrailStatusResponseUnmarshaller.Instance;
return InvokeAsync<GetTrailStatusResponse>(request, options, cancellationToken);
}
#endregion
#region ListChannels
internal virtual ListChannelsResponse ListChannels(ListChannelsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListChannelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListChannelsResponseUnmarshaller.Instance;
return Invoke<ListChannelsResponse>(request, options);
}
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
public virtual Task<ListChannelsResponse> ListChannelsAsync(ListChannelsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListChannelsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListChannelsResponseUnmarshaller.Instance;
return InvokeAsync<ListChannelsResponse>(request, options, cancellationToken);
}
#endregion
#region ListEventDataStores
internal virtual ListEventDataStoresResponse ListEventDataStores(ListEventDataStoresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEventDataStoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEventDataStoresResponseUnmarshaller.Instance;
return Invoke<ListEventDataStoresResponse>(request, options);
}
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
public virtual Task<ListEventDataStoresResponse> ListEventDataStoresAsync(ListEventDataStoresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEventDataStoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEventDataStoresResponseUnmarshaller.Instance;
return InvokeAsync<ListEventDataStoresResponse>(request, options, cancellationToken);
}
#endregion
#region ListImportFailures
internal virtual ListImportFailuresResponse ListImportFailures(ListImportFailuresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportFailuresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportFailuresResponseUnmarshaller.Instance;
return Invoke<ListImportFailuresResponse>(request, options);
}
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
public virtual Task<ListImportFailuresResponse> ListImportFailuresAsync(ListImportFailuresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportFailuresRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportFailuresResponseUnmarshaller.Instance;
return InvokeAsync<ListImportFailuresResponse>(request, options, cancellationToken);
}
#endregion
#region ListImports
internal virtual ListImportsResponse ListImports(ListImportsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;
return Invoke<ListImportsResponse>(request, options);
}
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
public virtual Task<ListImportsResponse> ListImportsAsync(ListImportsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListImportsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListImportsResponseUnmarshaller.Instance;
return InvokeAsync<ListImportsResponse>(request, options, cancellationToken);
}
#endregion
#region ListPublicKeys
internal virtual ListPublicKeysResponse ListPublicKeys(ListPublicKeysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPublicKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return Invoke<ListPublicKeysResponse>(request, options);
}
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
public virtual Task<ListPublicKeysResponse> ListPublicKeysAsync(ListPublicKeysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListPublicKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListPublicKeysResponseUnmarshaller.Instance;
return InvokeAsync<ListPublicKeysResponse>(request, options, cancellationToken);
}
#endregion
#region ListQueries
internal virtual ListQueriesResponse ListQueries(ListQueriesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListQueriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListQueriesResponseUnmarshaller.Instance;
return Invoke<ListQueriesResponse>(request, options);
}
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
public virtual Task<ListQueriesResponse> ListQueriesAsync(ListQueriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListQueriesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListQueriesResponseUnmarshaller.Instance;
return InvokeAsync<ListQueriesResponse>(request, options, cancellationToken);
}
#endregion
#region ListTags
internal virtual ListTagsResponse ListTags(ListTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return Invoke<ListTagsResponse>(request, options);
}
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
public virtual Task<ListTagsResponse> ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsResponseUnmarshaller.Instance;
return InvokeAsync<ListTagsResponse>(request, options, cancellationToken);
}
#endregion
#region ListTrails
internal virtual ListTrailsResponse ListTrails(ListTrailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTrailsResponseUnmarshaller.Instance;
return Invoke<ListTrailsResponse>(request, options);
}
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
public virtual Task<ListTrailsResponse> ListTrailsAsync(ListTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTrailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTrailsResponseUnmarshaller.Instance;
return InvokeAsync<ListTrailsResponse>(request, options, cancellationToken);
}
#endregion
#region LookupEvents
internal virtual LookupEventsResponse LookupEvents(LookupEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = LookupEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = LookupEventsResponseUnmarshaller.Instance;
return Invoke<LookupEventsResponse>(request, options);
}
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
public virtual Task<LookupEventsResponse> LookupEventsAsync(LookupEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = LookupEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = LookupEventsResponseUnmarshaller.Instance;
return InvokeAsync<LookupEventsResponse>(request, options, cancellationToken);
}
#endregion
#region PutEventSelectors
internal virtual PutEventSelectorsResponse PutEventSelectors(PutEventSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return Invoke<PutEventSelectorsResponse>(request, options);
}
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
public virtual Task<PutEventSelectorsResponse> PutEventSelectorsAsync(PutEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutEventSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutEventSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<PutEventSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region PutInsightSelectors
internal virtual PutInsightSelectorsResponse PutInsightSelectors(PutInsightSelectorsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutInsightSelectorsResponseUnmarshaller.Instance;
return Invoke<PutInsightSelectorsResponse>(request, options);
}
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
public virtual Task<PutInsightSelectorsResponse> PutInsightSelectorsAsync(PutInsightSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutInsightSelectorsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutInsightSelectorsResponseUnmarshaller.Instance;
return InvokeAsync<PutInsightSelectorsResponse>(request, options, cancellationToken);
}
#endregion
#region PutResourcePolicy
internal virtual PutResourcePolicyResponse PutResourcePolicy(PutResourcePolicyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutResourcePolicyResponseUnmarshaller.Instance;
return Invoke<PutResourcePolicyResponse>(request, options);
}
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
public virtual Task<PutResourcePolicyResponse> PutResourcePolicyAsync(PutResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutResourcePolicyRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutResourcePolicyResponseUnmarshaller.Instance;
return InvokeAsync<PutResourcePolicyResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterOrganizationDelegatedAdmin
internal virtual RegisterOrganizationDelegatedAdminResponse RegisterOrganizationDelegatedAdmin(RegisterOrganizationDelegatedAdminRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return Invoke<RegisterOrganizationDelegatedAdminResponse>(request, options);
}
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
public virtual Task<RegisterOrganizationDelegatedAdminResponse> RegisterOrganizationDelegatedAdminAsync(RegisterOrganizationDelegatedAdminRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterOrganizationDelegatedAdminRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterOrganizationDelegatedAdminResponseUnmarshaller.Instance;
return InvokeAsync<RegisterOrganizationDelegatedAdminResponse>(request, options, cancellationToken);
}
#endregion
#region RemoveTags
internal virtual RemoveTagsResponse RemoveTags(RemoveTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return Invoke<RemoveTagsResponse>(request, options);
}
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
public virtual Task<RemoveTagsResponse> RemoveTagsAsync(RemoveTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RemoveTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RemoveTagsResponseUnmarshaller.Instance;
return InvokeAsync<RemoveTagsResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreEventDataStore
internal virtual RestoreEventDataStoreResponse RestoreEventDataStore(RestoreEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreEventDataStoreResponseUnmarshaller.Instance;
return Invoke<RestoreEventDataStoreResponse>(request, options);
}
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
public virtual Task<RestoreEventDataStoreResponse> RestoreEventDataStoreAsync(RestoreEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<RestoreEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region StartEventDataStoreIngestion
internal virtual StartEventDataStoreIngestionResponse StartEventDataStoreIngestion(StartEventDataStoreIngestionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartEventDataStoreIngestionResponseUnmarshaller.Instance;
return Invoke<StartEventDataStoreIngestionResponse>(request, options);
}
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
public virtual Task<StartEventDataStoreIngestionResponse> StartEventDataStoreIngestionAsync(StartEventDataStoreIngestionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartEventDataStoreIngestionResponseUnmarshaller.Instance;
return InvokeAsync<StartEventDataStoreIngestionResponse>(request, options, cancellationToken);
}
#endregion
#region StartImport
internal virtual StartImportResponse StartImport(StartImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartImportResponseUnmarshaller.Instance;
return Invoke<StartImportResponse>(request, options);
}
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
public virtual Task<StartImportResponse> StartImportAsync(StartImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartImportResponseUnmarshaller.Instance;
return InvokeAsync<StartImportResponse>(request, options, cancellationToken);
}
#endregion
#region StartLogging
internal virtual StartLoggingResponse StartLogging(StartLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance;
return Invoke<StartLoggingResponse>(request, options);
}
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
public virtual Task<StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance;
return InvokeAsync<StartLoggingResponse>(request, options, cancellationToken);
}
#endregion
#region StartQuery
internal virtual StartQueryResponse StartQuery(StartQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartQueryResponseUnmarshaller.Instance;
return Invoke<StartQueryResponse>(request, options);
}
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
public virtual Task<StartQueryResponse> StartQueryAsync(StartQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartQueryResponseUnmarshaller.Instance;
return InvokeAsync<StartQueryResponse>(request, options, cancellationToken);
}
#endregion
#region StopEventDataStoreIngestion
internal virtual StopEventDataStoreIngestionResponse StopEventDataStoreIngestion(StopEventDataStoreIngestionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopEventDataStoreIngestionResponseUnmarshaller.Instance;
return Invoke<StopEventDataStoreIngestionResponse>(request, options);
}
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
public virtual Task<StopEventDataStoreIngestionResponse> StopEventDataStoreIngestionAsync(StopEventDataStoreIngestionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopEventDataStoreIngestionRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopEventDataStoreIngestionResponseUnmarshaller.Instance;
return InvokeAsync<StopEventDataStoreIngestionResponse>(request, options, cancellationToken);
}
#endregion
#region StopImport
internal virtual StopImportResponse StopImport(StopImportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopImportResponseUnmarshaller.Instance;
return Invoke<StopImportResponse>(request, options);
}
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
public virtual Task<StopImportResponse> StopImportAsync(StopImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopImportRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopImportResponseUnmarshaller.Instance;
return InvokeAsync<StopImportResponse>(request, options, cancellationToken);
}
#endregion
#region StopLogging
internal virtual StopLoggingResponse StopLogging(StopLoggingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;
return Invoke<StopLoggingResponse>(request, options);
}
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
public virtual Task<StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopLoggingRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;
return InvokeAsync<StopLoggingResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateChannel
internal virtual UpdateChannelResponse UpdateChannel(UpdateChannelRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateChannelResponseUnmarshaller.Instance;
return Invoke<UpdateChannelResponse>(request, options);
}
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
public virtual Task<UpdateChannelResponse> UpdateChannelAsync(UpdateChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateChannelRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateChannelResponseUnmarshaller.Instance;
return InvokeAsync<UpdateChannelResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateEventDataStore
internal virtual UpdateEventDataStoreResponse UpdateEventDataStore(UpdateEventDataStoreRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateEventDataStoreResponseUnmarshaller.Instance;
return Invoke<UpdateEventDataStoreResponse>(request, options);
}
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
public virtual Task<UpdateEventDataStoreResponse> UpdateEventDataStoreAsync(UpdateEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateEventDataStoreRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateEventDataStoreResponseUnmarshaller.Instance;
return InvokeAsync<UpdateEventDataStoreResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateTrail
internal virtual UpdateTrailResponse UpdateTrail(UpdateTrailRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return Invoke<UpdateTrailResponse>(request, options);
}
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
public virtual Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateTrailRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateTrailResponseUnmarshaller.Instance;
return InvokeAsync<UpdateTrailResponse>(request, options, cancellationToken);
}
#endregion
}
} | 4,705 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-2013-11-01.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.CloudTrail.Model;
namespace Amazon.CloudTrail
{
/// <summary>
/// Interface for accessing CloudTrail
///
/// CloudTrail
/// <para>
/// This is the CloudTrail API Reference. It provides descriptions of actions, data types,
/// common parameters, and common errors for CloudTrail.
/// </para>
///
/// <para>
/// CloudTrail is a web service that records Amazon Web Services API calls for your Amazon
/// Web Services account and delivers log files to an Amazon S3 bucket. The recorded information
/// includes the identity of the user, the start time of the Amazon Web Services API call,
/// the source IP address, the request parameters, and the response elements returned
/// by the service.
/// </para>
/// <note>
/// <para>
/// As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
/// consist of libraries and sample code for various programming languages and platforms
/// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail.
/// For example, the SDKs handle cryptographically signing requests, managing errors,
/// and retrying requests automatically. For more information about the Amazon Web Services
/// SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
/// to Build on Amazon Web Services</a>.
/// </para>
/// </note>
/// <para>
/// See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
/// User Guide</a> for information about the data that is included with each Amazon Web
/// Services API call listed in the log files.
/// </para>
/// </summary>
public partial interface IAmazonCloudTrail : IAmazonService, IDisposable
{
#if AWS_ASYNC_ENUMERABLES_API
/// <summary>
/// Paginators for the service
/// </summary>
ICloudTrailPaginatorFactory Paginators { get; }
#endif
#region AddTags
/// <summary>
/// Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
/// Overwrites an existing tag's value when a new value is specified for an existing tag
/// key. Tag key names must be unique; you cannot have two keys with the same name but
/// different values. If you specify a key without a value, the tag will be created with
/// the specified key and a value of null. You can tag a trail or event data store that
/// applies to all Amazon Web Services Regions only from the Region in which the trail
/// or event data store was created (also known as its home Region).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AddTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AddTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags">REST API Reference for AddTags Operation</seealso>
Task<AddTagsResponse> AddTagsAsync(AddTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CancelQuery
/// <summary>
/// Cancels a query if the query is not in a terminated state, such as <code>CANCELLED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>FINISHED</code>. You must specify
/// an ARN value for <code>EventDataStore</code>. The ID of the query that you want to
/// cancel is also required. When you run <code>CancelQuery</code>, the query status might
/// show as <code>CANCELLED</code> even if the operation is not yet finished.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveQueryException">
/// The specified query cannot be canceled because it is in the <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code> state.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery">REST API Reference for CancelQuery Operation</seealso>
Task<CancelQueryResponse> CancelQueryAsync(CancelQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateChannel
/// <summary>
/// Creates a channel for CloudTrail to ingest events from a partner or external source.
/// After you create a channel, a CloudTrail Lake event data store can log events from
/// the partner or source that you specify.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelMaxLimitExceededException">
/// This exception is thrown when the maximum number of channels limit is exceeded.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSourceException">
/// This exception is thrown when the specified value of <code>Source</code> is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel">REST API Reference for CreateChannel Operation</seealso>
Task<CreateChannelResponse> CreateChannelAsync(CreateChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateEventDataStore
/// <summary>
/// Creates a new event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore">REST API Reference for CreateEventDataStore Operation</seealso>
Task<CreateEventDataStoreResponse> CreateEventDataStoreAsync(CreateEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region CreateTrail
/// <summary>
/// Creates a trail that specifies the settings for delivery of log data to an Amazon
/// S3 bucket.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaximumNumberOfTrailsExceededException">
/// This exception is thrown when the maximum number of trails is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TagsLimitExceededException">
/// The number of tags per trail, event data store, or channel has exceeded the permitted
/// amount. Currently, the limit is 50.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailAlreadyExistsException">
/// This exception is thrown when the specified trail already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail">REST API Reference for CreateTrail Operation</seealso>
Task<CreateTrailResponse> CreateTrailAsync(CreateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteChannel
/// <summary>
/// Deletes a channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel">REST API Reference for DeleteChannel Operation</seealso>
Task<DeleteChannelResponse> DeleteChannelAsync(DeleteChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteEventDataStore
/// <summary>
/// Disables the event data store specified by <code>EventDataStore</code>, which accepts
/// an event data store ARN. After you run <code>DeleteEventDataStore</code>, the event
/// data store enters a <code>PENDING_DELETION</code> state, and is automatically deleted
/// after a wait period of seven days. <code>TerminationProtectionEnabled</code> must
/// be set to <code>False</code> on the event data store; this operation cannot work if
/// <code>TerminationProtectionEnabled</code> is <code>True</code>.
///
///
/// <para>
/// After you run <code>DeleteEventDataStore</code> on an event data store, you cannot
/// run <code>ListQueries</code>, <code>DescribeQuery</code>, or <code>GetQueryResults</code>
/// on queries that are using an event data store in a <code>PENDING_DELETION</code> state.
/// An event data store in the <code>PENDING_DELETION</code> state does not incur costs.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelExistsForEDSException">
/// This exception is thrown when the specified event data store cannot yet be deleted
/// because it is in use by a channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreTerminationProtectedException">
/// The event data store cannot be deleted because termination protection is enabled for
/// it.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore">REST API Reference for DeleteEventDataStore Operation</seealso>
Task<DeleteEventDataStoreResponse> DeleteEventDataStoreAsync(DeleteEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteResourcePolicy
/// <summary>
/// Deletes the resource-based policy attached to the CloudTrail channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy">REST API Reference for DeleteResourcePolicy Operation</seealso>
Task<DeleteResourcePolicyResponse> DeleteResourcePolicyAsync(DeleteResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeleteTrail
/// <summary>
/// Deletes a trail. This operation must be called from the Region in which the trail
/// was created. <code>DeleteTrail</code> cannot be called on the shadow trails (replicated
/// trails in other Regions) of a trail that is enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail">REST API Reference for DeleteTrail Operation</seealso>
Task<DeleteTrailResponse> DeleteTrailAsync(DeleteTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DeregisterOrganizationDelegatedAdmin
/// <summary>
/// Removes CloudTrail delegated administrator permissions from a member account in an
/// organization.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotRegisteredException">
/// This exception is thrown when the specified account is not registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin">REST API Reference for DeregisterOrganizationDelegatedAdmin Operation</seealso>
Task<DeregisterOrganizationDelegatedAdminResponse> DeregisterOrganizationDelegatedAdminAsync(DeregisterOrganizationDelegatedAdminRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeQuery
/// <summary>
/// Returns metadata about a query, including query run time in milliseconds, number of
/// events scanned and matched, and query status. If the query results were delivered
/// to an S3 bucket, the response also provides the S3 URI and the delivery status.
///
///
/// <para>
/// You must specify either a <code>QueryID</code> or a <code>QueryAlias</code>. Specifying
/// the <code>QueryAlias</code> parameter returns information about the last query run
/// for the alias.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery">REST API Reference for DescribeQuery Operation</seealso>
Task<DescribeQueryResponse> DescribeQueryAsync(DescribeQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region DescribeTrails
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
Task<DescribeTrailsResponse> DescribeTrailsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieves settings for one or more trails associated with the current Region for your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails">REST API Reference for DescribeTrails Operation</seealso>
Task<DescribeTrailsResponse> DescribeTrailsAsync(DescribeTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetChannel
/// <summary>
/// Returns information about a specific channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel">REST API Reference for GetChannel Operation</seealso>
Task<GetChannelResponse> GetChannelAsync(GetChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetEventDataStore
/// <summary>
/// Returns information about an event data store specified as either an ARN or the ID
/// portion of the ARN.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore">REST API Reference for GetEventDataStore Operation</seealso>
Task<GetEventDataStoreResponse> GetEventDataStoreAsync(GetEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetEventSelectors
/// <summary>
/// Describes the settings for the event selectors that you configured for your trail.
/// The information returned for your event selectors includes the following:
///
/// <ul> <li>
/// <para>
/// If your event selector includes read-only events, write-only events, or all events.
/// This applies to both management events and data events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes management events.
/// </para>
/// </li> <li>
/// <para>
/// If your event selector includes data events, the resources on which you are logging
/// data events.
/// </para>
/// </li> </ul>
/// <para>
/// For more information about logging management and data events, see the following topics
/// in the <i>CloudTrail User Guide</i>:
/// </para>
/// <ul> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>
/// </para>
/// </li> <li>
/// <para>
/// <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors">REST API Reference for GetEventSelectors Operation</seealso>
Task<GetEventSelectorsResponse> GetEventSelectorsAsync(GetEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetImport
/// <summary>
/// Returns information about a specific import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport">REST API Reference for GetImport Operation</seealso>
Task<GetImportResponse> GetImportAsync(GetImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetInsightSelectors
/// <summary>
/// Describes the settings for the Insights event selectors that you configured for your
/// trail. <code>GetInsightSelectors</code> shows if CloudTrail Insights event logging
/// is enabled on the trail, and if it is, which insight types are enabled. If you run
/// <code>GetInsightSelectors</code> on a trail that does not have Insights events enabled,
/// the operation throws the exception <code>InsightNotEnabledException</code>
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// CloudTrail Insights Events for Trails </a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsightNotEnabledException">
/// If you run <code>GetInsightSelectors</code> on a trail that does not have Insights
/// events enabled, the operation throws the exception <code>InsightNotEnabledException</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors">REST API Reference for GetInsightSelectors Operation</seealso>
Task<GetInsightSelectorsResponse> GetInsightSelectorsAsync(GetInsightSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetQueryResults
/// <summary>
/// Gets event data results of a query. You must specify the <code>QueryID</code> value
/// returned by the <code>StartQuery</code> operation.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetQueryResults service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetQueryResults service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.QueryIdNotFoundException">
/// The query ID does not exist or does not map to a query.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults">REST API Reference for GetQueryResults Operation</seealso>
Task<GetQueryResultsResponse> GetQueryResultsAsync(GetQueryResultsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetResourcePolicy
/// <summary>
/// Retrieves the JSON text of the resource-based policy document attached to the CloudTrail
/// channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotFoundException">
/// This exception is thrown when the specified resource policy is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy">REST API Reference for GetResourcePolicy Operation</seealso>
Task<GetResourcePolicyResponse> GetResourcePolicyAsync(GetResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetTrail
/// <summary>
/// Returns settings information for a specified trail.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail">REST API Reference for GetTrail Operation</seealso>
Task<GetTrailResponse> GetTrailAsync(GetTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region GetTrailStatus
/// <summary>
/// Returns a JSON-formatted list of information about the specified trail. Fields include
/// information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop
/// logging times for each trail. This operation returns trail status from a single Region.
/// To return trail status from all Regions, you must call the operation on each Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTrailStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTrailStatus service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus">REST API Reference for GetTrailStatus Operation</seealso>
Task<GetTrailStatusResponse> GetTrailStatusAsync(GetTrailStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListChannels
/// <summary>
/// Lists the channels in the current account, and their source names.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListChannels service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListChannels service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels">REST API Reference for ListChannels Operation</seealso>
Task<ListChannelsResponse> ListChannelsAsync(ListChannelsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListEventDataStores
/// <summary>
/// Returns information about all event data stores in the account, in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListEventDataStores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListEventDataStores service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores">REST API Reference for ListEventDataStores Operation</seealso>
Task<ListEventDataStoresResponse> ListEventDataStoresAsync(ListEventDataStoresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListImportFailures
/// <summary>
/// Returns a list of failures for the specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImportFailures service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImportFailures service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures">REST API Reference for ListImportFailures Operation</seealso>
Task<ListImportFailuresResponse> ListImportFailuresAsync(ListImportFailuresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListImports
/// <summary>
/// Returns information on all imports, or a select set of imports by <code>ImportStatus</code>
/// or <code>Destination</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListImports service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListImports service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports">REST API Reference for ListImports Operation</seealso>
Task<ListImportsResponse> ListImportsAsync(ListImportsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListPublicKeys
/// <summary>
/// Returns all public keys whose private keys were used to sign the digest files within
/// the specified time range. The public key is needed to validate digest files that were
/// signed with its corresponding private key.
///
/// <note>
/// <para>
/// CloudTrail uses different private and public key pairs per Region. Each digest file
/// is signed with a private key unique to its Region. When you validate a digest file
/// from a specific Region, you must look in the same Region for its corresponding public
/// key.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListPublicKeys service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListPublicKeys service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys">REST API Reference for ListPublicKeys Operation</seealso>
Task<ListPublicKeysResponse> ListPublicKeysAsync(ListPublicKeysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListQueries
/// <summary>
/// Returns a list of queries and query statuses for the past seven days. You must specify
/// an ARN value for <code>EventDataStore</code>. Optionally, to shorten the list of results,
/// you can specify a time range, formatted as timestamps, by adding <code>StartTime</code>
/// and <code>EndTime</code> parameters, and a <code>QueryStatus</code> value. Valid values
/// for <code>QueryStatus</code> include <code>QUEUED</code>, <code>RUNNING</code>, <code>FINISHED</code>,
/// <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>CANCELLED</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListQueries service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListQueries service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidDateRangeException">
/// A date range for the query was specified that is not valid. Be sure that the start
/// time is chronologically before the end time. For more information about writing a
/// query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatusException">
/// The query status is not valid for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries">REST API Reference for ListQueries Operation</seealso>
Task<ListQueriesResponse> ListQueriesAsync(ListQueriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTags
/// <summary>
/// Lists the tags for the specified trails, event data stores, or channels in the current
/// Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException">
/// Reserved for future use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags">REST API Reference for ListTags Operation</seealso>
Task<ListTagsResponse> ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region ListTrails
/// <summary>
/// Lists trails that are in the current account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ListTrails service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ListTrails service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails">REST API Reference for ListTrails Operation</seealso>
Task<ListTrailsResponse> ListTrailsAsync(ListTrailsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region LookupEvents
/// <summary>
/// Looks up <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events">management
/// events</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events">CloudTrail
/// Insights events</a> that are captured by CloudTrail. You can look up events that occurred
/// in a Region within the last 90 days. Lookup supports the following attributes for
/// management events:
///
/// <ul> <li>
/// <para>
/// Amazon Web Services access key
/// </para>
/// </li> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> <li>
/// <para>
/// Read only
/// </para>
/// </li> <li>
/// <para>
/// Resource name
/// </para>
/// </li> <li>
/// <para>
/// Resource type
/// </para>
/// </li> <li>
/// <para>
/// User name
/// </para>
/// </li> </ul>
/// <para>
/// Lookup supports the following attributes for Insights events:
/// </para>
/// <ul> <li>
/// <para>
/// Event ID
/// </para>
/// </li> <li>
/// <para>
/// Event name
/// </para>
/// </li> <li>
/// <para>
/// Event source
/// </para>
/// </li> </ul>
/// <para>
/// All attributes are optional. The default number of results returned is 50, with a
/// maximum of 50 possible. The response includes a token that you can use to get the
/// next page of results.
/// </para>
/// <important>
/// <para>
/// The rate of lookup requests is limited to two per second, per account, per Region.
/// If this limit is exceeded, a throttling error occurs.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the LookupEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the LookupEvents service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventCategoryException">
/// Occurs if an event category that is not valid is specified as a value of <code>EventCategory</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidLookupAttributesException">
/// Occurs when a lookup attribute is specified that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidMaxResultsException">
/// This exception is thrown if the limit specified is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidNextTokenException">
/// A token that is not valid, or a token that was previously used in a request with different
/// parameters. This exception is thrown if the token is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTimeRangeException">
/// Occurs if the timestamp values are not valid. Either the start time occurs after the
/// end time, or the time range is outside the range of possible values.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents">REST API Reference for LookupEvents Operation</seealso>
Task<LookupEventsResponse> LookupEventsAsync(LookupEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutEventSelectors
/// <summary>
/// Configures an event selector or advanced event selectors for your trail. Use event
/// selectors or advanced event selectors to specify management and data event settings
/// for your trail. If you want your trail to log Insights events, be sure the event selector
/// enables logging of the Insights event types you want configured for your trail. For
/// more information about logging Insights events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html">Logging
/// Insights events for trails</a> in the <i>CloudTrail User Guide</i>. By default, trails
/// created without specific event selectors are configured to log all read and write
/// management events, and no data events.
///
///
/// <para>
/// When an event occurs in your account, CloudTrail evaluates the event selectors or
/// advanced event selectors in all trails. For each trail, if the event matches any event
/// selector, the trail processes and logs the event. If the event doesn't match any event
/// selector, the trail doesn't log the event.
/// </para>
///
/// <para>
/// Example
/// </para>
/// <ol> <li>
/// <para>
/// You create an event selector for a trail and specify that you want write-only events.
/// </para>
/// </li> <li>
/// <para>
/// The EC2 <code>GetConsoleOutput</code> and <code>RunInstances</code> API operations
/// occur in your account.
/// </para>
/// </li> <li>
/// <para>
/// CloudTrail evaluates whether the events match your event selectors.
/// </para>
/// </li> <li>
/// <para>
/// The <code>RunInstances</code> is a write-only event and it matches your event selector.
/// The trail logs the event.
/// </para>
/// </li> <li>
/// <para>
/// The <code>GetConsoleOutput</code> is a read-only event that doesn't match your event
/// selector. The trail doesn't log the event.
/// </para>
/// </li> </ol>
/// <para>
/// The <code>PutEventSelectors</code> operation must be called from the Region in which
/// the trail was created; otherwise, an <code>InvalidHomeRegionException</code> exception
/// is thrown.
/// </para>
///
/// <para>
/// You can configure up to five event selectors for each trail. For more information,
/// see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html">Logging
/// management events</a>, <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a>, and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html">Quotas
/// in CloudTrail</a> in the <i>CloudTrail User Guide</i>.
/// </para>
///
/// <para>
/// You can add advanced event selectors, and conditions for your advanced event selectors,
/// up to a maximum of 500 values for all conditions and selectors on a trail. You can
/// use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but
/// not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing
/// <code>EventSelectors</code> are overwritten. For more information about advanced event
/// selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging
/// data events</a> in the <i>CloudTrail User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutEventSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutEventSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors">REST API Reference for PutEventSelectors Operation</seealso>
Task<PutEventSelectorsResponse> PutEventSelectorsAsync(PutEventSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutInsightSelectors
/// <summary>
/// Lets you enable Insights event logging by specifying the Insights selectors that you
/// want to enable on an existing trail. You also use <code>PutInsightSelectors</code>
/// to turn off Insights event logging, by passing an empty list of insight types. The
/// valid Insights event types in this release are <code>ApiErrorRateInsight</code> and
/// <code>ApiCallRateInsight</code>.
///
///
/// <para>
/// To log CloudTrail Insights events on API call volume, the trail must log <code>write</code>
/// management events. To log CloudTrail Insights events on API error rate, the trail
/// must log <code>read</code> or <code>write</code> management events. You can call <code>GetEventSelectors</code>
/// on a trail to check whether the trail logs management events.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutInsightSelectors service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutInsightSelectors service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidInsightSelectorsException">
/// The formatting or syntax of the <code>InsightSelectors</code> JSON statement in your
/// <code>PutInsightSelectors</code> or <code>GetInsightSelectors</code> request is not
/// valid, or the specified insight type in the <code>InsightSelectors</code> statement
/// is not a valid insight type.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors">REST API Reference for PutInsightSelectors Operation</seealso>
Task<PutInsightSelectorsResponse> PutInsightSelectorsAsync(PutInsightSelectorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region PutResourcePolicy
/// <summary>
/// Attaches a resource-based permission policy to a CloudTrail channel that is used
/// for an integration with an event source outside of Amazon Web Services. For more information
/// about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail
/// resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutResourcePolicy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutResourcePolicy service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceARNNotValidException">
/// This exception is thrown when the provided resource does not exist, or the ARN format
/// of the resource is not valid. The following is the valid format for a resource ARN:
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourcePolicyNotValidException">
/// This exception is thrown when the resouce-based policy has syntax errors, or contains
/// a principal that is not valid.
///
///
/// <para>
/// The following are requirements for the resource policy:
/// </para>
/// <ul> <li>
/// <para>
/// Contains only one action: cloudtrail-data:PutAuditEvents
/// </para>
/// </li> <li>
/// <para>
/// Contains at least one statement. The policy can have a maximum of 20 statements.
///
/// </para>
/// </li> <li>
/// <para>
/// Each statement contains at least one principal. A statement can have a maximum of
/// 50 principals.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy">REST API Reference for PutResourcePolicy Operation</seealso>
Task<PutResourcePolicyResponse> PutResourcePolicyAsync(PutResourcePolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region RegisterOrganizationDelegatedAdmin
/// <summary>
/// Registers an organization’s member account as the CloudTrail delegated administrator.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterOrganizationDelegatedAdmin service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterOrganizationDelegatedAdmin service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountNotFoundException">
/// This exception is thrown when the specified account is not found or not part of an
/// organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.AccountRegisteredException">
/// This exception is thrown when the account is already registered as the CloudTrail
/// delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CannotDelegateManagementAccountException">
/// This exception is thrown when the management account of an organization is registered
/// as the CloudTrail delegated administrator.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.DelegatedAdminAccountLimitExceededException">
/// This exception is thrown when the maximum number of CloudTrail delegated administrators
/// is reached.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationManagementAccountException">
/// This exception is thrown when the account making the request is not the organization's
/// management account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin">REST API Reference for RegisterOrganizationDelegatedAdmin Operation</seealso>
Task<RegisterOrganizationDelegatedAdminResponse> RegisterOrganizationDelegatedAdminAsync(RegisterOrganizationDelegatedAdminRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region RemoveTags
/// <summary>
/// Removes the specified tags from a trail, event data store, or channel.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RemoveTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RemoveTags service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTagParameterException">
/// This exception is thrown when the specified tag key or values are not valid. It can
/// also occur if there are duplicate tags or too many tags on the resource.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException">
/// This exception is thrown when the specified resource is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException">
/// This exception is thrown when the specified resource type is not supported by CloudTrail.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags">REST API Reference for RemoveTags Operation</seealso>
Task<RemoveTagsResponse> RemoveTagsAsync(RemoveTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region RestoreEventDataStore
/// <summary>
/// Restores a deleted event data store specified by <code>EventDataStore</code>, which
/// accepts an event data store ARN. You can only restore a deleted event data store within
/// the seven-day wait period after deletion. Restoring an event data store can take several
/// minutes, depending on the size of the event data store.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreMaxLimitExceededException">
/// Your account has used the maximum number of event data stores.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore">REST API Reference for RestoreEventDataStore Operation</seealso>
Task<RestoreEventDataStoreResponse> RestoreEventDataStoreAsync(RestoreEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartEventDataStoreIngestion
/// <summary>
/// Starts the ingestion of live events on an event data store specified as either an
/// ARN or the ID portion of the ARN. To start ingestion, the event data store <code>Status</code>
/// must be <code>STOPPED_INGESTION</code> and the <code>eventCategory</code> must be
/// <code>Management</code>, <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion">REST API Reference for StartEventDataStoreIngestion Operation</seealso>
Task<StartEventDataStoreIngestionResponse> StartEventDataStoreIngestionAsync(StartEventDataStoreIngestionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartImport
/// <summary>
/// Starts an import of logged trail events from a source S3 bucket to a destination
/// event data store. By default, CloudTrail only imports events contained in the S3 bucket's
/// <code>CloudTrail</code> prefix and the prefixes inside the <code>CloudTrail</code>
/// prefix, and does not check prefixes for other Amazon Web Services services. If you
/// want to import CloudTrail events contained in another prefix, you must include the
/// prefix in the <code>S3LocationUri</code>. For more considerations about importing
/// trail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations">Considerations</a>.
///
///
///
/// <para>
/// When you start a new import, the <code>Destinations</code> and <code>ImportSource</code>
/// parameters are required. Before starting a new import, disable any access control
/// lists (ACLs) attached to the source S3 bucket. For more information about disabling
/// ACLs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling
/// ownership of objects and disabling ACLs for your bucket</a>.
/// </para>
///
/// <para>
/// When you retry an import, the <code>ImportID</code> parameter is required.
/// </para>
/// <note>
/// <para>
/// If the destination event data store is for an organization, you must use the management
/// account to import trail events. You cannot use the delegated administrator account
/// for the organization.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.AccountHasOngoingImportException">
/// This exception is thrown when you start a new import and a previous import is still
/// in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidImportSourceException">
/// This exception is thrown when the provided source S3 bucket is not valid for import.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport">REST API Reference for StartImport Operation</seealso>
Task<StartImportResponse> StartImportAsync(StartImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartLogging
/// <summary>
/// Starts the recording of Amazon Web Services API calls and log file delivery for a
/// trail. For a trail that is enabled in all Regions, this operation must be called from
/// the Region in which the trail was created. This operation cannot be called on the
/// shadow trails (replicated trails in other Regions) of a trail that is enabled in all
/// Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging">REST API Reference for StartLogging Operation</seealso>
Task<StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StartQuery
/// <summary>
/// Starts a CloudTrail Lake query. Use the <code>QueryStatement</code> parameter to provide
/// your SQL query, enclosed in single quotation marks. Use the optional <code>DeliveryS3Uri</code>
/// parameter to deliver the query results to an S3 bucket.
///
///
/// <para>
/// <code>StartQuery</code> requires you specify either the <code>QueryStatement</code>
/// parameter, or a <code>QueryAlias</code> and any <code>QueryParameters</code>. In the
/// current release, the <code>QueryAlias</code> and <code>QueryParameters</code> parameters
/// are used only for the queries that populate the CloudTrail Lake dashboards.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartQuery service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartQuery service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidQueryStatementException">
/// The query that was submitted has validation errors, or uses incorrect syntax or unsupported
/// keywords. For more information about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
/// or edit a query</a> in the <i>CloudTrail User Guide</i>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.MaxConcurrentQueriesException">
/// You are already running the maximum number of concurrent queries. Wait a minute for
/// some queries to finish, and then run the query again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery">REST API Reference for StartQuery Operation</seealso>
Task<StartQueryResponse> StartQueryAsync(StartQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopEventDataStoreIngestion
/// <summary>
/// Stops the ingestion of live events on an event data store specified as either an ARN
/// or the ID portion of the ARN. To stop ingestion, the event data store <code>Status</code>
/// must be <code>ENABLED</code> and the <code>eventCategory</code> must be <code>Management</code>,
/// <code>Data</code>, or <code>ConfigurationItem</code>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopEventDataStoreIngestion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopEventDataStoreIngestion service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreStatusException">
/// The event data store is not in a status that supports the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion">REST API Reference for StopEventDataStoreIngestion Operation</seealso>
Task<StopEventDataStoreIngestionResponse> StopEventDataStoreIngestionAsync(StopEventDataStoreIngestionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopImport
/// <summary>
/// Stops a specified import.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopImport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopImport service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ImportNotFoundException">
/// The specified import was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport">REST API Reference for StopImport Operation</seealso>
Task<StopImportResponse> StopImportAsync(StopImportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region StopLogging
/// <summary>
/// Suspends the recording of Amazon Web Services API calls and log file delivery for
/// the specified trail. Under most circumstances, there is no need to use this action.
/// You can update a trail without stopping it first. This action is the only way to stop
/// recording. For a trail enabled in all Regions, this operation must be called from
/// the Region in which the trail was created, or an <code>InvalidHomeRegionException</code>
/// will occur. This operation cannot be called on the shadow trails (replicated trails
/// in other Regions) of a trail enabled in all Regions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopLogging service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopLogging service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
Task<StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateChannel
/// <summary>
/// Updates a channel specified by a required channel ARN or UUID.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateChannel service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateChannel service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.ChannelAlreadyExistsException">
/// This exception is thrown when the provided channel already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelARNInvalidException">
/// This exception is thrown when the specified value of <code>ChannelARN</code> is not
/// valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ChannelNotFoundException">
/// This exception is thrown when CloudTrail cannot find the specified channel.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventDataStoreCategoryException">
/// This exception is thrown when event categories of specified event data stores are
/// not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel">REST API Reference for UpdateChannel Operation</seealso>
Task<UpdateChannelResponse> UpdateChannelAsync(UpdateChannelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateEventDataStore
/// <summary>
/// Updates an event data store. The required <code>EventDataStore</code> value is an
/// ARN or the ID portion of the ARN. Other parameters are optional, but at least one
/// optional parameter must be specified, or CloudTrail throws an error. <code>RetentionPeriod</code>
/// is in days, and valid values are integers between 90 and 2557. By default, <code>TerminationProtection</code>
/// is enabled.
///
///
/// <para>
/// For event data stores for CloudTrail events, <code>AdvancedEventSelectors</code> includes
/// or excludes management and data events in your event data store. For more information
/// about <code>AdvancedEventSelectors</code>, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html">AdvancedEventSelectors</a>.
/// </para>
///
/// <para>
/// For event data stores for Config configuration items, Audit Manager evidence, or
/// non-Amazon Web Services events, <code>AdvancedEventSelectors</code> includes events
/// of that type in your event data store.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateEventDataStore service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateEventDataStore service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreAlreadyExistsException">
/// An event data store with that name already exists.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreARNInvalidException">
/// The specified event data store ARN is not valid or does not map to an event data store
/// in your account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreHasOngoingImportException">
/// This exception is thrown when you try to update or delete an event data store that
/// currently has an import in progress.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.EventDataStoreNotFoundException">
/// The specified event data store was not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InactiveEventDataStoreException">
/// The event data store is inactive.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore">REST API Reference for UpdateEventDataStore Operation</seealso>
Task<UpdateEventDataStoreResponse> UpdateEventDataStoreAsync(UpdateEventDataStoreRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
#region UpdateTrail
/// <summary>
/// Updates trail settings that control what events you are logging, and how to handle
/// log files. Changes to a trail do not require stopping the CloudTrail service. Use
/// this action to designate an existing bucket for log delivery. If the existing bucket
/// has previously been a target for CloudTrail log files, an IAM policy exists for the
/// bucket. <code>UpdateTrail</code> must be called from the Region in which the trail
/// was created; otherwise, an <code>InvalidHomeRegionException</code> is thrown.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailAccessNotEnabledException">
/// This exception is thrown when trusted access has not been enabled between CloudTrail
/// and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html">Enabling
/// Trusted Access with Other Amazon Web Services Services</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException">
/// This exception is thrown when an operation is called with a trail ARN that is not
/// valid. The following is the format of a trail ARN.
///
///
/// <para>
/// <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
/// </para>
///
/// <para>
/// This exception is also thrown when you call <code>AddTags</code> or <code>RemoveTags</code>
/// on a trail, event data store, or channel with a resource ARN that is not valid.
/// </para>
///
/// <para>
/// The following is the format of an event data store ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
///
/// </para>
///
/// <para>
/// The following is the format of a channel ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
///
/// </para>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudTrailInvalidClientTokenIdException">
/// This exception is thrown when a call results in the <code>InvalidClientTokenId</code>
/// error code. This can occur when you are creating or updating a trail to send notifications
/// to an Amazon SNS topic that is in a suspended Amazon Web Services account.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException">
/// Cannot set a CloudWatch Logs delivery for this Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.ConflictException">
/// This exception is thrown when the specified resource is not ready for an operation.
/// This can occur when you try to run an operation on a resource before CloudTrail has
/// time to fully load the resource, or because another operation is modifying the resource.
/// If this exception occurs, wait a few minutes, and then try the operation again.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientDependencyServiceAccessPermissionException">
/// This exception is thrown when the IAM identity that is used to create the organization
/// resource lacks one or more required permissions for creating an organization resource
/// in a required service.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException">
/// This exception is thrown when the policy on the S3 bucket or KMS key does not have
/// sufficient permissions for the operation.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException">
/// This exception is thrown when the policy on the S3 bucket is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException">
/// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException">
/// This exception is thrown when the provided CloudWatch Logs log group is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException">
/// This exception is thrown when the provided role is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidEventSelectorsException">
/// This exception is thrown when the <code>PutEventSelectors</code> operation is called
/// with a number of event selectors, advanced event selectors, or data resources that
/// is not valid. The combination of event selectors or advanced event selectors and data
/// resources is not valid. A trail can have up to 5 event selectors. If a trail uses
/// advanced event selectors, a maximum of 500 total values for all conditions in all
/// advanced event selectors is allowed. A trail is limited to 250 data resources. These
/// data resources can be distributed across event selectors, but the overall total cannot
/// exceed 250.
///
///
/// <para>
/// You can:
/// </para>
/// <ul> <li>
/// <para>
/// Specify a valid number of event selectors (1 to 5) for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid number of data resources (1 to 250) for an event selector. The limit
/// of number of resources on an individual event selector is configurable up to 250.
/// However, this upper limit is allowed only if the total number of data resources does
/// not exceed 250 across all event selectors for a trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify up to 500 values for all conditions in all advanced event selectors for a
/// trail.
/// </para>
/// </li> <li>
/// <para>
/// Specify a valid value for a parameter. For example, specifying the <code>ReadWriteType</code>
/// parameter with a value of <code>read-only</code> is not valid.
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidHomeRegionException">
/// This exception is thrown when an operation is called on a trail from a Region other
/// than the Region in which the trail was created.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException">
/// This exception is thrown when the KMS key ARN is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterCombinationException">
/// This exception is thrown when the combination of parameters provided is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidParameterException">
/// The request includes a parameter that is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException">
/// This exception is thrown when the provided S3 bucket name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException">
/// This exception is thrown when the provided S3 prefix is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException">
/// This exception is thrown when the provided SNS topic name is not valid.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException">
/// This exception is thrown when the provided trail name is not valid. Trail names must
/// meet the following requirements:
///
/// <ul> <li>
/// <para>
/// Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_),
/// or dashes (-)
/// </para>
/// </li> <li>
/// <para>
/// Start with a letter or number, and end with a letter or number
/// </para>
/// </li> <li>
/// <para>
/// Be between 3 and 128 characters
/// </para>
/// </li> <li>
/// <para>
/// Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code>
/// and <code>my--namespace</code> are not valid.
/// </para>
/// </li> <li>
/// <para>
/// Not be in IP address format (for example, 192.168.5.4)
/// </para>
/// </li> </ul>
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsException">
/// This exception is thrown when there is an issue with the specified KMS key and the
/// trail or event data store can't be updated.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException">
/// This exception is thrown when the KMS key does not exist, when the S3 bucket and the
/// KMS key are not in the same Region, or when the KMS key associated with the Amazon
/// SNS topic either does not exist or is not in the same Region.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NoManagementAccountSLRExistsException">
/// This exception is thrown when the management account does not have a service-linked
/// role.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.NotOrganizationMasterAccountException">
/// This exception is thrown when the Amazon Web Services account making the request to
/// create or update an organization trail or event data store is not the management account
/// for an organization in Organizations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare
/// For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create
/// an event data store</a>.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException">
/// This exception is thrown when the requested operation is not permitted.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationNotInAllFeaturesModeException">
/// This exception is thrown when Organizations is not configured to support all features.
/// All features must be enabled in Organizations to support creating an organization
/// trail or event data store.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.OrganizationsNotInUseException">
/// This exception is thrown when the request is made from an Amazon Web Services account
/// that is not a member of an organization. To make this request, sign in using the credentials
/// of an account that belongs to an organization.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException">
/// This exception is thrown when the specified S3 bucket does not exist.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException">
/// This exception is thrown when the trail with the given name is not found.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException">
/// This exception is no longer in use.
/// </exception>
/// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException">
/// This exception is thrown when the requested operation is not supported.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail">REST API Reference for UpdateTrail Operation</seealso>
Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 3,737 |
aws-sdk-net | aws | C# | using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AWSSDK.CloudTrail")]
#if BCL35
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (3.5) - AWS CloudTrail. AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.")]
#elif BCL45
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (4.5) - AWS CloudTrail. AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.")]
#elif NETSTANDARD20
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (NetStandard 2.0) - AWS CloudTrail. AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.")]
#elif NETCOREAPP3_1
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (.NET Core 3.1) - AWS CloudTrail. AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.")]
#else
#error Unknown platform constant - unable to set correct AssemblyDescription
#endif
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Amazon Web Services SDK for .NET")]
[assembly: AssemblyCompany("Amazon.com, Inc")]
[assembly: AssemblyCopyright("Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.3")]
[assembly: AssemblyFileVersion("3.7.107.2")]
[assembly: System.CLSCompliant(true)]
#if BCL
[assembly: System.Security.AllowPartiallyTrustedCallers]
#endif | 51 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Util.Internal;
using Amazon.CloudTrailData.Internal;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Configuration for accessing Amazon CloudTrailData service
/// </summary>
[AWSSignerType("v4")]
public partial class AmazonCloudTrailDataConfig : ClientConfig
{
private static readonly string UserAgentString =
InternalSDKUtils.BuildUserAgentString("3.7.100.84");
private string _userAgent = UserAgentString;
/// <summary>
/// Default constructor
/// </summary>
public AmazonCloudTrailDataConfig()
: base(new Amazon.Runtime.Internal.DefaultConfigurationProvider(AmazonCloudTrailDataDefaultConfiguration.GetAllConfigurations()))
{
this.AuthenticationServiceName = "cloudtrail-data";
this.EndpointProvider = new AmazonCloudTrailDataEndpointProvider();
}
/// <summary>
/// The constant used to lookup in the region hash the endpoint.
/// </summary>
public override string RegionEndpointServiceName
{
get
{
return "cloudtrail-data";
}
}
/// <summary>
/// Gets the ServiceVersion property.
/// </summary>
public override string ServiceVersion
{
get
{
return "2021-08-11";
}
}
/// <summary>
/// Gets the value of UserAgent property.
/// </summary>
public override string UserAgent
{
get
{
return _userAgent;
}
}
}
} | 83 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Amazon.Runtime;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Configuration for accessing Amazon CloudTrailData service
/// </summary>
public static class AmazonCloudTrailDataDefaultConfiguration
{
/// <summary>
/// Collection of all <see cref="DefaultConfiguration"/>s supported by
/// CloudTrailData
/// </summary>
public static ReadOnlyCollection<IDefaultConfiguration> GetAllConfigurations()
{
return new ReadOnlyCollection<IDefaultConfiguration>(new List<IDefaultConfiguration>
{
Standard,
InRegion,
CrossRegion,
Mobile,
Auto,
Legacy
});
}
/// <summary>
/// <p>The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration Standard {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Standard,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:03.1
ConnectTimeout = TimeSpan.FromMilliseconds(3100L),
// 0:00:03.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(3100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration InRegion {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.InRegion,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:01.1
ConnectTimeout = TimeSpan.FromMilliseconds(1100L),
// 0:00:01.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(1100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration CrossRegion {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.CrossRegion,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:03.1
ConnectTimeout = TimeSpan.FromMilliseconds(3100L),
// 0:00:03.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(3100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration Mobile {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Mobile,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:30
ConnectTimeout = TimeSpan.FromMilliseconds(30000L),
// 0:00:30
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(30000L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.</p><p>Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">EC2 Instance Metadata service</a>, which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application</p>
/// </summary>
public static IDefaultConfiguration Auto {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Auto,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:01.1
ConnectTimeout = TimeSpan.FromMilliseconds(1100L),
// 0:00:01.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(1100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The LEGACY mode provides default settings that vary per SDK and were used prior to establishment of defaults_mode</p>
/// </summary>
public static IDefaultConfiguration Legacy {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Legacy,
RetryMode = RequestRetryMode.Legacy,
StsRegionalEndpoints = StsRegionalEndpointsValue.Legacy,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Legacy,
ConnectTimeout = null,
TlsNegotiationTimeout = null,
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
}
} | 146 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using Amazon.Runtime;
using Amazon.Runtime.Endpoints;
namespace Amazon.CloudTrailData.Endpoints
{
/// <summary>
/// Contains parameters used for resolving CloudTrailData endpoints
/// Parameters can be sourced from client config and service operations
/// Used by internal CloudTrailDataEndpointProvider and CloudTrailDataEndpointResolver
/// Can be used by custom EndpointProvider, see ClientConfig.EndpointProvider
/// </summary>
public class CloudTrailDataEndpointParameters : EndpointParameters
{
/// <summary>
/// CloudTrailDataEndpointParameters constructor
/// </summary>
public CloudTrailDataEndpointParameters()
{
UseDualStack = false;
UseFIPS = false;
}
/// <summary>
/// Region parameter
/// </summary>
public string Region
{
get { return (string)this["Region"]; }
set { this["Region"] = value; }
}
/// <summary>
/// UseDualStack parameter
/// </summary>
public bool? UseDualStack
{
get { return (bool?)this["UseDualStack"]; }
set { this["UseDualStack"] = value; }
}
/// <summary>
/// UseFIPS parameter
/// </summary>
public bool? UseFIPS
{
get { return (bool?)this["UseFIPS"]; }
set { this["UseFIPS"] = value; }
}
/// <summary>
/// Endpoint parameter
/// </summary>
public string Endpoint
{
get { return (string)this["Endpoint"]; }
set { this["Endpoint"] = value; }
}
}
} | 78 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using Amazon.Runtime;
namespace Amazon.CloudTrailData
{
///<summary>
/// Common exception for the CloudTrailData service.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class AmazonCloudTrailDataException : AmazonServiceException
{
/// <summary>
/// Construct instance of AmazonCloudTrailDataException
/// </summary>
/// <param name="message"></param>
public AmazonCloudTrailDataException(string message)
: base(message)
{
}
/// <summary>
/// Construct instance of AmazonCloudTrailDataException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public AmazonCloudTrailDataException(string message, Exception innerException)
: base(message, innerException)
{
}
/// <summary>
/// Construct instance of AmazonCloudTrailDataException
/// </summary>
/// <param name="innerException"></param>
public AmazonCloudTrailDataException(Exception innerException)
: base(innerException.Message, innerException)
{
}
/// <summary>
/// Construct instance of AmazonCloudTrailDataException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public AmazonCloudTrailDataException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode)
{
}
/// <summary>
/// Construct instance of AmazonCloudTrailDataException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public AmazonCloudTrailDataException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode)
{
}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the AmazonCloudTrailDataException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected AmazonCloudTrailDataException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
#endif
}
} | 105 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using Amazon.Runtime;
namespace Amazon.CloudTrailData
{
} | 26 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.Runtime.Endpoints;
using static Amazon.Runtime.Internal.Endpoints.StandardLibrary.Fn;
namespace Amazon.CloudTrailData.Internal
{
/// <summary>
/// Amazon CloudTrailData endpoint provider.
/// Resolves endpoint for given set of CloudTrailDataEndpointParameters.
/// Can throw AmazonClientException if endpoint resolution is unsuccessful.
/// </summary>
public class AmazonCloudTrailDataEndpointProvider : IEndpointProvider
{
/// <summary>
/// Resolve endpoint for CloudTrailDataEndpointParameters
/// </summary>
public Endpoint ResolveEndpoint(EndpointParameters parameters)
{
if (parameters == null)
throw new ArgumentNullException("parameters");
if (parameters["Region"] == null)
throw new AmazonClientException("Region parameter must be set for endpoint resolution");
if (parameters["UseDualStack"] == null)
throw new AmazonClientException("UseDualStack parameter must be set for endpoint resolution");
if (parameters["UseFIPS"] == null)
throw new AmazonClientException("UseFIPS parameter must be set for endpoint resolution");
var refs = new Dictionary<string, object>()
{
["Region"] = parameters["Region"],
["UseDualStack"] = parameters["UseDualStack"],
["UseFIPS"] = parameters["UseFIPS"],
["Endpoint"] = parameters["Endpoint"],
};
if ((refs["PartitionResult"] = Partition((string)refs["Region"])) != null)
{
if (IsSet(refs["Endpoint"]))
{
if (Equals(refs["UseFIPS"], true))
{
throw new AmazonClientException("Invalid Configuration: FIPS and custom endpoint are not supported");
}
if (Equals(refs["UseDualStack"], true))
{
throw new AmazonClientException("Invalid Configuration: Dualstack and custom endpoint are not supported");
}
return new Endpoint((string)refs["Endpoint"], InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
if (Equals(refs["UseFIPS"], true) && Equals(refs["UseDualStack"], true))
{
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")) && Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
{
return new Endpoint(Interpolate(@"https://cloudtrail-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("FIPS and DualStack are enabled, but this partition does not support one or both");
}
if (Equals(refs["UseFIPS"], true))
{
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")))
{
return new Endpoint(Interpolate(@"https://cloudtrail-data-fips.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("FIPS is enabled but this partition does not support FIPS");
}
if (Equals(refs["UseDualStack"], true))
{
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
{
return new Endpoint(Interpolate(@"https://cloudtrail-data.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("DualStack is enabled but this partition does not support DualStack");
}
return new Endpoint(Interpolate(@"https://cloudtrail-data.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("Cannot resolve endpoint");
}
}
} | 101 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Endpoints;
using Amazon.Util;
using Amazon.CloudTrailData.Endpoints;
#pragma warning disable 1591
namespace Amazon.CloudTrailData.Internal
{
/// <summary>
/// Amazon CloudTrailData endpoint resolver.
/// Custom PipelineHandler responsible for resolving endpoint and setting authentication parameters for CloudTrailData service requests.
/// Collects values for CloudTrailDataEndpointParameters and then tries to resolve endpoint by calling
/// ResolveEndpoint method on GlobalEndpoints.Provider if present, otherwise uses CloudTrailDataEndpointProvider.
/// Responsible for setting authentication and http headers provided by resolved endpoint.
/// </summary>
public class AmazonCloudTrailDataEndpointResolver : BaseEndpointResolver
{
protected override void ServiceSpecificHandler(IExecutionContext executionContext, EndpointParameters parameters)
{
InjectHostPrefix(executionContext.RequestContext);
}
protected override EndpointParameters MapEndpointsParameters(IRequestContext requestContext)
{
var config = (AmazonCloudTrailDataConfig)requestContext.ClientConfig;
var result = new CloudTrailDataEndpointParameters();
result.Region = config.RegionEndpoint?.SystemName;
result.UseDualStack = config.UseDualstackEndpoint;
result.UseFIPS = config.UseFIPSEndpoint;
result.Endpoint = config.ServiceURL;
// The region needs to be determined from the ServiceURL if not set.
var regionEndpoint = config.RegionEndpoint;
if (regionEndpoint == null && !string.IsNullOrEmpty(config.ServiceURL))
{
var regionName = AWSSDKUtils.DetermineRegion(config.ServiceURL);
result.Region = RegionEndpoint.GetBySystemName(regionName).SystemName;
}
// To support legacy endpoint overridding rules in the endpoints.json
if (result.Region == "us-east-1-regional")
{
result.Region = "us-east-1";
}
// Use AlternateEndpoint region override if set
if (requestContext.Request.AlternateEndpoint != null)
{
result.Region = requestContext.Request.AlternateEndpoint.SystemName;
}
// Assign staticContextParams and contextParam per operation
return result;
}
}
} | 83 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using Amazon.Runtime.Internal;
namespace Amazon.CloudTrailData.Internal
{
/// <summary>
/// Service metadata for Amazon CloudTrailData service
/// </summary>
public partial class AmazonCloudTrailDataMetadata : IServiceMetadata
{
/// <summary>
/// Gets the value of the Service Id.
/// </summary>
public string ServiceId
{
get
{
return "CloudTrail Data";
}
}
/// <summary>
/// Gets the dictionary that gives mapping of renamed operations
/// </summary>
public System.Collections.Generic.IDictionary<string, string> OperationNameMapping
{
get
{
return new System.Collections.Generic.Dictionary<string, string>(0)
{
};
}
}
}
} | 55 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Base class for CloudTrailData operation requests.
/// </summary>
public partial class AmazonCloudTrailDataRequest : AmazonWebServiceRequest
{
}
} | 30 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// An event from a source outside of Amazon Web Services that you want CloudTrail to
/// log.
/// </summary>
public partial class AuditEvent
{
private string _eventData;
private string _eventDataChecksum;
private string _id;
/// <summary>
/// Gets and sets the property EventData.
/// <para>
/// The content of an audit event that comes from the event, such as <code>userIdentity</code>,
/// <code>userAgent</code>, and <code>eventSource</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string EventData
{
get { return this._eventData; }
set { this._eventData = value; }
}
// Check to see if EventData property is set
internal bool IsSetEventData()
{
return this._eventData != null;
}
/// <summary>
/// Gets and sets the property EventDataChecksum.
/// <para>
/// A checksum is a base64-SHA256 algorithm that helps you verify that CloudTrail receives
/// the event that matches with the checksum. Calculate the checksum by running a command
/// like the following:
/// </para>
///
/// <para>
/// <code>printf %s <i>$eventdata</i> | openssl dgst -binary -sha256 | base64</code>
///
/// </para>
/// </summary>
public string EventDataChecksum
{
get { return this._eventDataChecksum; }
set { this._eventDataChecksum = value; }
}
// Check to see if EventDataChecksum property is set
internal bool IsSetEventDataChecksum()
{
return this._eventDataChecksum != null;
}
/// <summary>
/// Gets and sets the property Id.
/// <para>
/// The original event ID from the source event.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string Id
{
get { return this._id; }
set { this._id = value; }
}
// Check to see if Id property is set
internal bool IsSetId()
{
return this._id != null;
}
}
} | 106 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// A response that includes successful and failed event results.
/// </summary>
public partial class AuditEventResultEntry
{
private string _eventid;
private string _id;
/// <summary>
/// Gets and sets the property EventID.
/// <para>
/// The event ID assigned by CloudTrail.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string EventID
{
get { return this._eventid; }
set { this._eventid = value; }
}
// Check to see if EventID property is set
internal bool IsSetEventID()
{
return this._eventid != null;
}
/// <summary>
/// Gets and sets the property Id.
/// <para>
/// The original event ID from the source event.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string Id
{
get { return this._id; }
set { this._id = value; }
}
// Check to see if Id property is set
internal bool IsSetId()
{
return this._id != null;
}
}
} | 78 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// The caller's account ID must be the same as the channel owner's account ID.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ChannelInsufficientPermissionException : AmazonCloudTrailDataException
{
/// <summary>
/// Constructs a new ChannelInsufficientPermissionException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ChannelInsufficientPermissionException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ChannelInsufficientPermissionException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ChannelInsufficientPermissionException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ChannelInsufficientPermissionException
/// </summary>
/// <param name="innerException"></param>
public ChannelInsufficientPermissionException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ChannelInsufficientPermissionException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ChannelInsufficientPermissionException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ChannelInsufficientPermissionException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ChannelInsufficientPermissionException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ChannelInsufficientPermissionException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ChannelInsufficientPermissionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// The channel could not be found.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ChannelNotFoundException : AmazonCloudTrailDataException
{
/// <summary>
/// Constructs a new ChannelNotFoundException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ChannelNotFoundException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ChannelNotFoundException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ChannelNotFoundException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ChannelNotFoundException
/// </summary>
/// <param name="innerException"></param>
public ChannelNotFoundException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ChannelNotFoundException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ChannelNotFoundException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ChannelNotFoundException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ChannelNotFoundException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ChannelNotFoundException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ChannelNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// The schema type of the event is not supported.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ChannelUnsupportedSchemaException : AmazonCloudTrailDataException
{
/// <summary>
/// Constructs a new ChannelUnsupportedSchemaException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ChannelUnsupportedSchemaException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ChannelUnsupportedSchemaException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ChannelUnsupportedSchemaException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ChannelUnsupportedSchemaException
/// </summary>
/// <param name="innerException"></param>
public ChannelUnsupportedSchemaException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ChannelUnsupportedSchemaException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ChannelUnsupportedSchemaException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ChannelUnsupportedSchemaException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ChannelUnsupportedSchemaException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ChannelUnsupportedSchemaException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ChannelUnsupportedSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// Two or more entries in the request have the same event ID.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class DuplicatedAuditEventIdException : AmazonCloudTrailDataException
{
/// <summary>
/// Constructs a new DuplicatedAuditEventIdException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public DuplicatedAuditEventIdException(string message)
: base(message) {}
/// <summary>
/// Construct instance of DuplicatedAuditEventIdException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public DuplicatedAuditEventIdException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of DuplicatedAuditEventIdException
/// </summary>
/// <param name="innerException"></param>
public DuplicatedAuditEventIdException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of DuplicatedAuditEventIdException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public DuplicatedAuditEventIdException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of DuplicatedAuditEventIdException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public DuplicatedAuditEventIdException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the DuplicatedAuditEventIdException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected DuplicatedAuditEventIdException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// The specified channel ARN is not a valid channel ARN.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class InvalidChannelARNException : AmazonCloudTrailDataException
{
/// <summary>
/// Constructs a new InvalidChannelARNException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public InvalidChannelARNException(string message)
: base(message) {}
/// <summary>
/// Construct instance of InvalidChannelARNException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public InvalidChannelARNException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of InvalidChannelARNException
/// </summary>
/// <param name="innerException"></param>
public InvalidChannelARNException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of InvalidChannelARNException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InvalidChannelARNException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of InvalidChannelARNException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InvalidChannelARNException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the InvalidChannelARNException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected InvalidChannelARNException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// Container for the parameters to the PutAuditEvents operation.
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
public partial class PutAuditEventsRequest : AmazonCloudTrailDataRequest
{
private List<AuditEvent> _auditEvents = new List<AuditEvent>();
private string _channelArn;
private string _externalId;
/// <summary>
/// Gets and sets the property AuditEvents.
/// <para>
/// The JSON payload of events that you want to ingest. You can also point to the JSON
/// event payload in a file.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=100)]
public List<AuditEvent> AuditEvents
{
get { return this._auditEvents; }
set { this._auditEvents = value; }
}
// Check to see if AuditEvents property is set
internal bool IsSetAuditEvents()
{
return this._auditEvents != null && this._auditEvents.Count > 0;
}
/// <summary>
/// Gets and sets the property ChannelArn.
/// <para>
/// The ARN or ID (the ARN suffix) of a channel.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string ChannelArn
{
get { return this._channelArn; }
set { this._channelArn = value; }
}
// Check to see if ChannelArn property is set
internal bool IsSetChannelArn()
{
return this._channelArn != null;
}
/// <summary>
/// Gets and sets the property ExternalId.
/// <para>
/// A unique identifier that is conditionally required when the channel's resource policy
/// includes an external ID. This value can be any string, such as a passphrase or account
/// number.
/// </para>
/// </summary>
[AWSProperty(Min=2, Max=1224)]
public string ExternalId
{
get { return this._externalId; }
set { this._externalId = value; }
}
// Check to see if ExternalId property is set
internal bool IsSetExternalId()
{
return this._externalId != null;
}
}
} | 105 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// This is the response object from the PutAuditEvents operation.
/// </summary>
public partial class PutAuditEventsResponse : AmazonWebServiceResponse
{
private List<ResultErrorEntry> _failed = new List<ResultErrorEntry>();
private List<AuditEventResultEntry> _successful = new List<AuditEventResultEntry>();
/// <summary>
/// Gets and sets the property Failed.
/// <para>
/// Lists events in the provided event payload that could not be ingested into CloudTrail,
/// and includes the error code and error message returned for events that could not be
/// ingested.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=0, Max=100)]
public List<ResultErrorEntry> Failed
{
get { return this._failed; }
set { this._failed = value; }
}
// Check to see if Failed property is set
internal bool IsSetFailed()
{
return this._failed != null && this._failed.Count > 0;
}
/// <summary>
/// Gets and sets the property Successful.
/// <para>
/// Lists events in the provided event payload that were successfully ingested into CloudTrail.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=0, Max=100)]
public List<AuditEventResultEntry> Successful
{
get { return this._successful; }
set { this._successful = value; }
}
// Check to see if Successful property is set
internal bool IsSetSuccessful()
{
return this._successful != null && this._successful.Count > 0;
}
}
} | 80 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// Includes the error code and error message for events that could not be ingested by
/// CloudTrail.
/// </summary>
public partial class ResultErrorEntry
{
private string _errorCode;
private string _errorMessage;
private string _id;
/// <summary>
/// Gets and sets the property ErrorCode.
/// <para>
/// The error code for events that could not be ingested by CloudTrail. Possible error
/// codes include: <code>FieldTooLong</code>, <code>FieldNotFound</code>, <code>InvalidChecksum</code>,
/// <code>InvalidData</code>, <code>InvalidRecipient</code>, <code>InvalidEventSource</code>,
/// <code>AccountNotSubscribed</code>, <code>Throttling</code>, and <code>InternalFailure</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string ErrorCode
{
get { return this._errorCode; }
set { this._errorCode = value; }
}
// Check to see if ErrorCode property is set
internal bool IsSetErrorCode()
{
return this._errorCode != null;
}
/// <summary>
/// Gets and sets the property ErrorMessage.
/// <para>
/// The message that describes the error for events that could not be ingested by CloudTrail.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=1024)]
public string ErrorMessage
{
get { return this._errorMessage; }
set { this._errorMessage = value; }
}
// Check to see if ErrorMessage property is set
internal bool IsSetErrorMessage()
{
return this._errorMessage != null;
}
/// <summary>
/// Gets and sets the property Id.
/// <para>
/// The original event ID from the source event that could not be ingested by CloudTrail.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=128)]
public string Id
{
get { return this._id; }
set { this._id = value; }
}
// Check to see if Id property is set
internal bool IsSetId()
{
return this._id != null;
}
}
} | 102 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.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.CloudTrailData.Model
{
/// <summary>
/// The operation requested is not supported in this region or account.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class UnsupportedOperationException : AmazonCloudTrailDataException
{
/// <summary>
/// Constructs a new UnsupportedOperationException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public UnsupportedOperationException(string message)
: base(message) {}
/// <summary>
/// Construct instance of UnsupportedOperationException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public UnsupportedOperationException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of UnsupportedOperationException
/// </summary>
/// <param name="innerException"></param>
public UnsupportedOperationException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of UnsupportedOperationException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public UnsupportedOperationException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of UnsupportedOperationException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public UnsupportedOperationException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the UnsupportedOperationException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected UnsupportedOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// AuditEvent Marshaller
/// </summary>
public class AuditEventMarshaller : IRequestMarshaller<AuditEvent, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(AuditEvent requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetEventData())
{
context.Writer.WritePropertyName("eventData");
context.Writer.Write(requestObject.EventData);
}
if(requestObject.IsSetEventDataChecksum())
{
context.Writer.WritePropertyName("eventDataChecksum");
context.Writer.Write(requestObject.EventDataChecksum);
}
if(requestObject.IsSetId())
{
context.Writer.WritePropertyName("id");
context.Writer.Write(requestObject.Id);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static AuditEventMarshaller Instance = new AuditEventMarshaller();
}
} | 74 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AuditEventResultEntry Object
/// </summary>
public class AuditEventResultEntryUnmarshaller : IUnmarshaller<AuditEventResultEntry, XmlUnmarshallerContext>, IUnmarshaller<AuditEventResultEntry, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
AuditEventResultEntry IUnmarshaller<AuditEventResultEntry, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AuditEventResultEntry Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
AuditEventResultEntry unmarshalledObject = new AuditEventResultEntry();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("eventID", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EventID = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AuditEventResultEntryUnmarshaller _instance = new AuditEventResultEntryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AuditEventResultEntryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 98 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ChannelInsufficientPermissionException Object
/// </summary>
public class ChannelInsufficientPermissionExceptionUnmarshaller : IErrorResponseUnmarshaller<ChannelInsufficientPermissionException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ChannelInsufficientPermissionException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public ChannelInsufficientPermissionException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ChannelInsufficientPermissionException unmarshalledObject = new ChannelInsufficientPermissionException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ChannelInsufficientPermissionExceptionUnmarshaller _instance = new ChannelInsufficientPermissionExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ChannelInsufficientPermissionExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ChannelNotFoundException Object
/// </summary>
public class ChannelNotFoundExceptionUnmarshaller : IErrorResponseUnmarshaller<ChannelNotFoundException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ChannelNotFoundException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public ChannelNotFoundException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ChannelNotFoundException unmarshalledObject = new ChannelNotFoundException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ChannelNotFoundExceptionUnmarshaller _instance = new ChannelNotFoundExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ChannelNotFoundExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ChannelUnsupportedSchemaException Object
/// </summary>
public class ChannelUnsupportedSchemaExceptionUnmarshaller : IErrorResponseUnmarshaller<ChannelUnsupportedSchemaException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ChannelUnsupportedSchemaException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public ChannelUnsupportedSchemaException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ChannelUnsupportedSchemaException unmarshalledObject = new ChannelUnsupportedSchemaException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ChannelUnsupportedSchemaExceptionUnmarshaller _instance = new ChannelUnsupportedSchemaExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ChannelUnsupportedSchemaExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DuplicatedAuditEventIdException Object
/// </summary>
public class DuplicatedAuditEventIdExceptionUnmarshaller : IErrorResponseUnmarshaller<DuplicatedAuditEventIdException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DuplicatedAuditEventIdException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public DuplicatedAuditEventIdException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
DuplicatedAuditEventIdException unmarshalledObject = new DuplicatedAuditEventIdException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static DuplicatedAuditEventIdExceptionUnmarshaller _instance = new DuplicatedAuditEventIdExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DuplicatedAuditEventIdExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for InvalidChannelARNException Object
/// </summary>
public class InvalidChannelARNExceptionUnmarshaller : IErrorResponseUnmarshaller<InvalidChannelARNException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public InvalidChannelARNException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public InvalidChannelARNException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
InvalidChannelARNException unmarshalledObject = new InvalidChannelARNException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static InvalidChannelARNExceptionUnmarshaller _instance = new InvalidChannelARNExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InvalidChannelARNExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// PutAuditEvents Request Marshaller
/// </summary>
public class PutAuditEventsRequestMarshaller : IMarshaller<IRequest, PutAuditEventsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((PutAuditEventsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(PutAuditEventsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudTrailData");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-08-11";
request.HttpMethod = "POST";
if (publicRequest.IsSetChannelArn())
request.Parameters.Add("channelArn", StringUtils.FromString(publicRequest.ChannelArn));
if (publicRequest.IsSetExternalId())
request.Parameters.Add("externalId", StringUtils.FromString(publicRequest.ExternalId));
request.ResourcePath = "/PutAuditEvents";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetAuditEvents())
{
context.Writer.WritePropertyName("auditEvents");
context.Writer.WriteArrayStart();
foreach(var publicRequestAuditEventsListValue in publicRequest.AuditEvents)
{
context.Writer.WriteObjectStart();
var marshaller = AuditEventMarshaller.Instance;
marshaller.Marshall(publicRequestAuditEventsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
request.UseQueryString = true;
return request;
}
private static PutAuditEventsRequestMarshaller _instance = new PutAuditEventsRequestMarshaller();
internal static PutAuditEventsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutAuditEventsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 118 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for PutAuditEvents operation
/// </summary>
public class PutAuditEventsResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
PutAuditEventsResponse response = new PutAuditEventsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("failed", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ResultErrorEntry, ResultErrorEntryUnmarshaller>(ResultErrorEntryUnmarshaller.Instance);
response.Failed = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("successful", targetDepth))
{
var unmarshaller = new ListUnmarshaller<AuditEventResultEntry, AuditEventResultEntryUnmarshaller>(AuditEventResultEntryUnmarshaller.Instance);
response.Successful = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ChannelInsufficientPermission"))
{
return ChannelInsufficientPermissionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ChannelNotFound"))
{
return ChannelNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ChannelUnsupportedSchema"))
{
return ChannelUnsupportedSchemaExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("DuplicatedAuditEventId"))
{
return DuplicatedAuditEventIdExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidChannelARN"))
{
return InvalidChannelARNExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperationException"))
{
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudTrailDataException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static PutAuditEventsResponseUnmarshaller _instance = new PutAuditEventsResponseUnmarshaller();
internal static PutAuditEventsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static PutAuditEventsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 136 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ResultErrorEntry Object
/// </summary>
public class ResultErrorEntryUnmarshaller : IUnmarshaller<ResultErrorEntry, XmlUnmarshallerContext>, IUnmarshaller<ResultErrorEntry, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
ResultErrorEntry IUnmarshaller<ResultErrorEntry, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ResultErrorEntry Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
ResultErrorEntry unmarshalledObject = new ResultErrorEntry();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("errorCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ErrorCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("errorMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ErrorMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ResultErrorEntryUnmarshaller _instance = new ResultErrorEntryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ResultErrorEntryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 104 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudTrailData.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CloudTrailData.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for UnsupportedOperationException Object
/// </summary>
public class UnsupportedOperationExceptionUnmarshaller : IErrorResponseUnmarshaller<UnsupportedOperationException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public UnsupportedOperationException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public UnsupportedOperationException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
UnsupportedOperationException unmarshalledObject = new UnsupportedOperationException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static UnsupportedOperationExceptionUnmarshaller _instance = new UnsupportedOperationExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static UnsupportedOperationExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using Amazon.CloudTrailData.Model;
using Amazon.CloudTrailData.Model.Internal.MarshallTransformations;
using Amazon.CloudTrailData.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Implementation for accessing CloudTrailData
///
/// The CloudTrail Data Service lets you ingest events into CloudTrail from any source
/// in your hybrid environments, such as in-house or SaaS applications hosted on-premises
/// or in the cloud, virtual machines, or containers. You can store, access, analyze,
/// troubleshoot and take action on this data without maintaining multiple log aggregators
/// and reporting tools. After you run <code>PutAuditEvents</code> to ingest your application
/// activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze
/// the data that is logged from your applications.
/// </summary>
public partial class AmazonCloudTrailDataClient : AmazonServiceClient, IAmazonCloudTrailData
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailDataMetadata();
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailDataClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailDataConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailDataConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(AmazonCloudTrailDataConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailDataConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials, AmazonCloudTrailDataConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailDataConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailDataConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailDataConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailDataConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customize the pipeline
/// </summary>
/// <param name="pipeline"></param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler<Amazon.Runtime.Internal.EndpointResolver>();
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new AmazonCloudTrailDataEndpointResolver());
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region PutAuditEvents
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
public virtual PutAuditEventsResponse PutAuditEvents(PutAuditEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAuditEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAuditEventsResponseUnmarshaller.Instance;
return Invoke<PutAuditEventsResponse>(request, options);
}
/// <summary>
/// Initiates the asynchronous execution of the PutAuditEvents operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents operation on AmazonCloudTrailDataClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutAuditEvents
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
public virtual IAsyncResult BeginPutAuditEvents(PutAuditEventsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAuditEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAuditEventsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
/// <summary>
/// Finishes the asynchronous execution of the PutAuditEvents operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutAuditEvents.</param>
///
/// <returns>Returns a PutAuditEventsResult from CloudTrailData.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
public virtual PutAuditEventsResponse EndPutAuditEvents(IAsyncResult asyncResult)
{
return EndInvoke<PutAuditEventsResponse>(asyncResult);
}
#endregion
}
} | 331 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.CloudTrailData.Model;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Interface for accessing CloudTrailData
///
/// The CloudTrail Data Service lets you ingest events into CloudTrail from any source
/// in your hybrid environments, such as in-house or SaaS applications hosted on-premises
/// or in the cloud, virtual machines, or containers. You can store, access, analyze,
/// troubleshoot and take action on this data without maintaining multiple log aggregators
/// and reporting tools. After you run <code>PutAuditEvents</code> to ingest your application
/// activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze
/// the data that is logged from your applications.
/// </summary>
public partial interface IAmazonCloudTrailData : IAmazonService, IDisposable
{
#region PutAuditEvents
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
PutAuditEventsResponse PutAuditEvents(PutAuditEventsRequest request);
/// <summary>
/// Initiates the asynchronous execution of the PutAuditEvents operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents operation on AmazonCloudTrailDataClient.</param>
/// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
/// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
///
/// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutAuditEvents
/// operation.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
IAsyncResult BeginPutAuditEvents(PutAuditEventsRequest request, AsyncCallback callback, object state);
/// <summary>
/// Finishes the asynchronous execution of the PutAuditEvents operation.
/// </summary>
///
/// <param name="asyncResult">The IAsyncResult returned by the call to BeginPutAuditEvents.</param>
///
/// <returns>Returns a PutAuditEventsResult from CloudTrailData.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
PutAuditEventsResponse EndPutAuditEvents(IAsyncResult asyncResult);
#endregion
}
} | 109 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.CloudTrailData.Model;
using Amazon.CloudTrailData.Model.Internal.MarshallTransformations;
using Amazon.CloudTrailData.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Implementation for accessing CloudTrailData
///
/// The CloudTrail Data Service lets you ingest events into CloudTrail from any source
/// in your hybrid environments, such as in-house or SaaS applications hosted on-premises
/// or in the cloud, virtual machines, or containers. You can store, access, analyze,
/// troubleshoot and take action on this data without maintaining multiple log aggregators
/// and reporting tools. After you run <code>PutAuditEvents</code> to ingest your application
/// activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze
/// the data that is logged from your applications.
/// </summary>
public partial class AmazonCloudTrailDataClient : AmazonServiceClient, IAmazonCloudTrailData
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailDataMetadata();
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailDataClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailDataConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailDataConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(AmazonCloudTrailDataConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailDataConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials, AmazonCloudTrailDataConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailDataConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailDataConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailDataConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailDataConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customize the pipeline
/// </summary>
/// <param name="pipeline"></param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler<Amazon.Runtime.Internal.EndpointResolver>();
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new AmazonCloudTrailDataEndpointResolver());
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region PutAuditEvents
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
public virtual PutAuditEventsResponse PutAuditEvents(PutAuditEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAuditEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAuditEventsResponseUnmarshaller.Instance;
return Invoke<PutAuditEventsResponse>(request, options);
}
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
public virtual Task<PutAuditEventsResponse> PutAuditEventsAsync(PutAuditEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAuditEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAuditEventsResponseUnmarshaller.Instance;
return InvokeAsync<PutAuditEventsResponse>(request, options, cancellationToken);
}
#endregion
}
} | 340 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.CloudTrailData.Model;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Interface for accessing CloudTrailData
///
/// The CloudTrail Data Service lets you ingest events into CloudTrail from any source
/// in your hybrid environments, such as in-house or SaaS applications hosted on-premises
/// or in the cloud, virtual machines, or containers. You can store, access, analyze,
/// troubleshoot and take action on this data without maintaining multiple log aggregators
/// and reporting tools. After you run <code>PutAuditEvents</code> to ingest your application
/// activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze
/// the data that is logged from your applications.
/// </summary>
public partial interface IAmazonCloudTrailData : IAmazonService, IDisposable
{
#region PutAuditEvents
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
PutAuditEventsResponse PutAuditEvents(PutAuditEventsRequest request);
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
Task<PutAuditEventsResponse> PutAuditEventsAsync(PutAuditEventsRequest request, CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 118 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.CloudTrailData.Model;
using Amazon.CloudTrailData.Model.Internal.MarshallTransformations;
using Amazon.CloudTrailData.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Implementation for accessing CloudTrailData
///
/// The CloudTrail Data Service lets you ingest events into CloudTrail from any source
/// in your hybrid environments, such as in-house or SaaS applications hosted on-premises
/// or in the cloud, virtual machines, or containers. You can store, access, analyze,
/// troubleshoot and take action on this data without maintaining multiple log aggregators
/// and reporting tools. After you run <code>PutAuditEvents</code> to ingest your application
/// activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze
/// the data that is logged from your applications.
/// </summary>
public partial class AmazonCloudTrailDataClient : AmazonServiceClient, IAmazonCloudTrailData
{
private static IServiceMetadata serviceMetadata = new AmazonCloudTrailDataMetadata();
#region Constructors
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonCloudTrailDataClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailDataConfig()) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonCloudTrailDataConfig{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(AmazonCloudTrailDataConfig config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials)
: this(credentials, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonCloudTrailDataConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Credentials and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(AWSCredentials credentials, AmazonCloudTrailDataConfig clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonCloudTrailDataConfig() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonCloudTrailDataConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailDataConfig())
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCloudTrailDataConfig{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonCloudTrailDataClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonCloudTrailDataClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonCloudTrailDataClient Configuration Object</param>
public AmazonCloudTrailDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonCloudTrailDataConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customizes the runtime pipeline.
/// </summary>
/// <param name="pipeline">Runtime pipeline for the current client.</param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler<Amazon.Runtime.Internal.EndpointResolver>();
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new AmazonCloudTrailDataEndpointResolver());
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region PutAuditEvents
internal virtual PutAuditEventsResponse PutAuditEvents(PutAuditEventsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAuditEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAuditEventsResponseUnmarshaller.Instance;
return Invoke<PutAuditEventsResponse>(request, options);
}
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
public virtual Task<PutAuditEventsResponse> PutAuditEventsAsync(PutAuditEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutAuditEventsRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutAuditEventsResponseUnmarshaller.Instance;
return InvokeAsync<PutAuditEventsResponse>(request, options, cancellationToken);
}
#endregion
}
} | 314 |
aws-sdk-net | aws | C# | /*
* 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 cloudtrail-data-2021-08-11.normal.json service model.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.CloudTrailData.Model;
namespace Amazon.CloudTrailData
{
/// <summary>
/// Interface for accessing CloudTrailData
///
/// The CloudTrail Data Service lets you ingest events into CloudTrail from any source
/// in your hybrid environments, such as in-house or SaaS applications hosted on-premises
/// or in the cloud, virtual machines, or containers. You can store, access, analyze,
/// troubleshoot and take action on this data without maintaining multiple log aggregators
/// and reporting tools. After you run <code>PutAuditEvents</code> to ingest your application
/// activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze
/// the data that is logged from your applications.
/// </summary>
public partial interface IAmazonCloudTrailData : IAmazonService, IDisposable
{
#region PutAuditEvents
/// <summary>
/// Ingests your application events into CloudTrail Lake. A required parameter, <code>auditEvents</code>,
/// accepts the JSON records (also called <i>payload</i>) of events that you want CloudTrail
/// to ingest. You can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
/// request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PutAuditEvents service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PutAuditEvents service method, as returned by CloudTrailData.</returns>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelInsufficientPermissionException">
/// The caller's account ID must be the same as the channel owner's account ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelNotFoundException">
/// The channel could not be found.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.ChannelUnsupportedSchemaException">
/// The schema type of the event is not supported.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.DuplicatedAuditEventIdException">
/// Two or more entries in the request have the same event ID.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.InvalidChannelARNException">
/// The specified channel ARN is not a valid channel ARN.
/// </exception>
/// <exception cref="Amazon.CloudTrailData.Model.UnsupportedOperationException">
/// The operation requested is not supported in this region or account.
/// </exception>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-data-2021-08-11/PutAuditEvents">REST API Reference for PutAuditEvents Operation</seealso>
Task<PutAuditEventsResponse> PutAuditEventsAsync(PutAuditEventsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
#endregion
}
} | 85 |
aws-sdk-net | aws | C# | using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AWSSDK.CloudTrailData")]
#if BCL35
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (3.5) - AWS CloudTrail Data Service. Add CloudTrail Data Service to enable users to ingest activity events from non-AWS sources into CloudTrail Lake.")]
#elif BCL45
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (4.5) - AWS CloudTrail Data Service. Add CloudTrail Data Service to enable users to ingest activity events from non-AWS sources into CloudTrail Lake.")]
#elif NETSTANDARD20
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (NetStandard 2.0) - AWS CloudTrail Data Service. Add CloudTrail Data Service to enable users to ingest activity events from non-AWS sources into CloudTrail Lake.")]
#elif NETCOREAPP3_1
[assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (.NET Core 3.1) - AWS CloudTrail Data Service. Add CloudTrail Data Service to enable users to ingest activity events from non-AWS sources into CloudTrail Lake.")]
#else
#error Unknown platform constant - unable to set correct AssemblyDescription
#endif
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Amazon Web Services SDK for .NET")]
[assembly: AssemblyCompany("Amazon.com, Inc")]
[assembly: AssemblyCopyright("Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.3")]
[assembly: AssemblyFileVersion("3.7.100.84")]
[assembly: System.CLSCompliant(true)]
#if BCL
[assembly: System.Security.AllowPartiallyTrustedCallers]
#endif | 51 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using System;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Util.Internal;
using Amazon.CloudWatch.Internal;
namespace Amazon.CloudWatch
{
/// <summary>
/// Configuration for accessing Amazon CloudWatch service
/// </summary>
[AWSSignerType("v4")]
public partial class AmazonCloudWatchConfig : ClientConfig
{
private static readonly string UserAgentString =
InternalSDKUtils.BuildUserAgentString("3.7.104.22");
private string _userAgent = UserAgentString;
/// <summary>
/// Default constructor
/// </summary>
public AmazonCloudWatchConfig()
: base(new Amazon.Runtime.Internal.DefaultConfigurationProvider(AmazonCloudWatchDefaultConfiguration.GetAllConfigurations()))
{
this.AuthenticationServiceName = "monitoring";
this.EndpointProvider = new AmazonCloudWatchEndpointProvider();
}
/// <summary>
/// The constant used to lookup in the region hash the endpoint.
/// </summary>
public override string RegionEndpointServiceName
{
get
{
return "monitoring";
}
}
/// <summary>
/// Gets the ServiceVersion property.
/// </summary>
public override string ServiceVersion
{
get
{
return "2010-08-01";
}
}
/// <summary>
/// Gets the value of UserAgent property.
/// </summary>
public override string UserAgent
{
get
{
return _userAgent;
}
}
}
} | 83 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Amazon.Runtime;
namespace Amazon.CloudWatch
{
/// <summary>
/// Configuration for accessing Amazon CloudWatch service
/// </summary>
public static class AmazonCloudWatchDefaultConfiguration
{
/// <summary>
/// Collection of all <see cref="DefaultConfiguration"/>s supported by
/// CloudWatch
/// </summary>
public static ReadOnlyCollection<IDefaultConfiguration> GetAllConfigurations()
{
return new ReadOnlyCollection<IDefaultConfiguration>(new List<IDefaultConfiguration>
{
Standard,
InRegion,
CrossRegion,
Mobile,
Auto,
Legacy
});
}
/// <summary>
/// <p>The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration Standard {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Standard,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:03.1
ConnectTimeout = TimeSpan.FromMilliseconds(3100L),
// 0:00:03.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(3100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration InRegion {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.InRegion,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:01.1
ConnectTimeout = TimeSpan.FromMilliseconds(1100L),
// 0:00:01.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(1100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration CrossRegion {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.CrossRegion,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:03.1
ConnectTimeout = TimeSpan.FromMilliseconds(3100L),
// 0:00:03.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(3100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications</p><p>Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK</p>
/// </summary>
public static IDefaultConfiguration Mobile {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Mobile,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:30
ConnectTimeout = TimeSpan.FromMilliseconds(30000L),
// 0:00:30
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(30000L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.</p><p>Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">EC2 Instance Metadata service</a>, which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application</p>
/// </summary>
public static IDefaultConfiguration Auto {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Auto,
RetryMode = RequestRetryMode.Standard,
StsRegionalEndpoints = StsRegionalEndpointsValue.Regional,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
// 0:00:01.1
ConnectTimeout = TimeSpan.FromMilliseconds(1100L),
// 0:00:01.1
TlsNegotiationTimeout = TimeSpan.FromMilliseconds(1100L),
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
/// <summary>
/// <p>The LEGACY mode provides default settings that vary per SDK and were used prior to establishment of defaults_mode</p>
/// </summary>
public static IDefaultConfiguration Legacy {get;} = new DefaultConfiguration
{
Name = DefaultConfigurationMode.Legacy,
RetryMode = RequestRetryMode.Legacy,
StsRegionalEndpoints = StsRegionalEndpointsValue.Legacy,
S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Legacy,
ConnectTimeout = null,
TlsNegotiationTimeout = null,
TimeToFirstByteTimeout = null,
HttpRequestTimeout = null
};
}
} | 146 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using Amazon.Runtime;
using Amazon.Runtime.Endpoints;
namespace Amazon.CloudWatch.Endpoints
{
/// <summary>
/// Contains parameters used for resolving CloudWatch endpoints
/// Parameters can be sourced from client config and service operations
/// Used by internal CloudWatchEndpointProvider and CloudWatchEndpointResolver
/// Can be used by custom EndpointProvider, see ClientConfig.EndpointProvider
/// </summary>
public class CloudWatchEndpointParameters : EndpointParameters
{
/// <summary>
/// CloudWatchEndpointParameters constructor
/// </summary>
public CloudWatchEndpointParameters()
{
UseDualStack = false;
UseFIPS = false;
}
/// <summary>
/// Region parameter
/// </summary>
public string Region
{
get { return (string)this["Region"]; }
set { this["Region"] = value; }
}
/// <summary>
/// UseDualStack parameter
/// </summary>
public bool? UseDualStack
{
get { return (bool?)this["UseDualStack"]; }
set { this["UseDualStack"] = value; }
}
/// <summary>
/// UseFIPS parameter
/// </summary>
public bool? UseFIPS
{
get { return (bool?)this["UseFIPS"]; }
set { this["UseFIPS"] = value; }
}
/// <summary>
/// Endpoint parameter
/// </summary>
public string Endpoint
{
get { return (string)this["Endpoint"]; }
set { this["Endpoint"] = value; }
}
}
} | 78 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using Amazon.Runtime;
namespace Amazon.CloudWatch
{
///<summary>
/// Common exception for the CloudWatch service.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class AmazonCloudWatchException : AmazonServiceException
{
/// <summary>
/// Construct instance of AmazonCloudWatchException
/// </summary>
/// <param name="message"></param>
public AmazonCloudWatchException(string message)
: base(message)
{
}
/// <summary>
/// Construct instance of AmazonCloudWatchException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public AmazonCloudWatchException(string message, Exception innerException)
: base(message, innerException)
{
}
/// <summary>
/// Construct instance of AmazonCloudWatchException
/// </summary>
/// <param name="innerException"></param>
public AmazonCloudWatchException(Exception innerException)
: base(innerException.Message, innerException)
{
}
/// <summary>
/// Construct instance of AmazonCloudWatchException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public AmazonCloudWatchException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode)
{
}
/// <summary>
/// Construct instance of AmazonCloudWatchException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public AmazonCloudWatchException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode)
{
}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the AmazonCloudWatchException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected AmazonCloudWatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
#endif
}
} | 105 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using System;
using Amazon.Runtime;
namespace Amazon.CloudWatch
{
/// <summary>
/// Constants used for properties of type ActionsSuppressedBy.
/// </summary>
public class ActionsSuppressedBy : ConstantClass
{
/// <summary>
/// Constant Alarm for ActionsSuppressedBy
/// </summary>
public static readonly ActionsSuppressedBy Alarm = new ActionsSuppressedBy("Alarm");
/// <summary>
/// Constant ExtensionPeriod for ActionsSuppressedBy
/// </summary>
public static readonly ActionsSuppressedBy ExtensionPeriod = new ActionsSuppressedBy("ExtensionPeriod");
/// <summary>
/// Constant WaitPeriod for ActionsSuppressedBy
/// </summary>
public static readonly ActionsSuppressedBy WaitPeriod = new ActionsSuppressedBy("WaitPeriod");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public ActionsSuppressedBy(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static ActionsSuppressedBy FindValue(string value)
{
return FindValue<ActionsSuppressedBy>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator ActionsSuppressedBy(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type AlarmType.
/// </summary>
public class AlarmType : ConstantClass
{
/// <summary>
/// Constant CompositeAlarm for AlarmType
/// </summary>
public static readonly AlarmType CompositeAlarm = new AlarmType("CompositeAlarm");
/// <summary>
/// Constant MetricAlarm for AlarmType
/// </summary>
public static readonly AlarmType MetricAlarm = new AlarmType("MetricAlarm");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public AlarmType(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static AlarmType FindValue(string value)
{
return FindValue<AlarmType>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator AlarmType(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type AnomalyDetectorStateValue.
/// </summary>
public class AnomalyDetectorStateValue : ConstantClass
{
/// <summary>
/// Constant PENDING_TRAINING for AnomalyDetectorStateValue
/// </summary>
public static readonly AnomalyDetectorStateValue PENDING_TRAINING = new AnomalyDetectorStateValue("PENDING_TRAINING");
/// <summary>
/// Constant TRAINED for AnomalyDetectorStateValue
/// </summary>
public static readonly AnomalyDetectorStateValue TRAINED = new AnomalyDetectorStateValue("TRAINED");
/// <summary>
/// Constant TRAINED_INSUFFICIENT_DATA for AnomalyDetectorStateValue
/// </summary>
public static readonly AnomalyDetectorStateValue TRAINED_INSUFFICIENT_DATA = new AnomalyDetectorStateValue("TRAINED_INSUFFICIENT_DATA");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public AnomalyDetectorStateValue(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static AnomalyDetectorStateValue FindValue(string value)
{
return FindValue<AnomalyDetectorStateValue>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator AnomalyDetectorStateValue(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type AnomalyDetectorType.
/// </summary>
public class AnomalyDetectorType : ConstantClass
{
/// <summary>
/// Constant METRIC_MATH for AnomalyDetectorType
/// </summary>
public static readonly AnomalyDetectorType METRIC_MATH = new AnomalyDetectorType("METRIC_MATH");
/// <summary>
/// Constant SINGLE_METRIC for AnomalyDetectorType
/// </summary>
public static readonly AnomalyDetectorType SINGLE_METRIC = new AnomalyDetectorType("SINGLE_METRIC");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public AnomalyDetectorType(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static AnomalyDetectorType FindValue(string value)
{
return FindValue<AnomalyDetectorType>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator AnomalyDetectorType(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type ComparisonOperator.
/// </summary>
public class ComparisonOperator : ConstantClass
{
/// <summary>
/// Constant GreaterThanOrEqualToThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator GreaterThanOrEqualToThreshold = new ComparisonOperator("GreaterThanOrEqualToThreshold");
/// <summary>
/// Constant GreaterThanThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator GreaterThanThreshold = new ComparisonOperator("GreaterThanThreshold");
/// <summary>
/// Constant GreaterThanUpperThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator GreaterThanUpperThreshold = new ComparisonOperator("GreaterThanUpperThreshold");
/// <summary>
/// Constant LessThanLowerOrGreaterThanUpperThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator LessThanLowerOrGreaterThanUpperThreshold = new ComparisonOperator("LessThanLowerOrGreaterThanUpperThreshold");
/// <summary>
/// Constant LessThanLowerThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator LessThanLowerThreshold = new ComparisonOperator("LessThanLowerThreshold");
/// <summary>
/// Constant LessThanOrEqualToThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator LessThanOrEqualToThreshold = new ComparisonOperator("LessThanOrEqualToThreshold");
/// <summary>
/// Constant LessThanThreshold for ComparisonOperator
/// </summary>
public static readonly ComparisonOperator LessThanThreshold = new ComparisonOperator("LessThanThreshold");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public ComparisonOperator(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static ComparisonOperator FindValue(string value)
{
return FindValue<ComparisonOperator>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator ComparisonOperator(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type EvaluationState.
/// </summary>
public class EvaluationState : ConstantClass
{
/// <summary>
/// Constant PARTIAL_DATA for EvaluationState
/// </summary>
public static readonly EvaluationState PARTIAL_DATA = new EvaluationState("PARTIAL_DATA");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public EvaluationState(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static EvaluationState FindValue(string value)
{
return FindValue<EvaluationState>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator EvaluationState(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type HistoryItemType.
/// </summary>
public class HistoryItemType : ConstantClass
{
/// <summary>
/// Constant Action for HistoryItemType
/// </summary>
public static readonly HistoryItemType Action = new HistoryItemType("Action");
/// <summary>
/// Constant ConfigurationUpdate for HistoryItemType
/// </summary>
public static readonly HistoryItemType ConfigurationUpdate = new HistoryItemType("ConfigurationUpdate");
/// <summary>
/// Constant StateUpdate for HistoryItemType
/// </summary>
public static readonly HistoryItemType StateUpdate = new HistoryItemType("StateUpdate");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public HistoryItemType(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static HistoryItemType FindValue(string value)
{
return FindValue<HistoryItemType>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator HistoryItemType(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type MetricStreamOutputFormat.
/// </summary>
public class MetricStreamOutputFormat : ConstantClass
{
/// <summary>
/// Constant Json for MetricStreamOutputFormat
/// </summary>
public static readonly MetricStreamOutputFormat Json = new MetricStreamOutputFormat("json");
/// <summary>
/// Constant Opentelemetry07 for MetricStreamOutputFormat
/// </summary>
public static readonly MetricStreamOutputFormat Opentelemetry07 = new MetricStreamOutputFormat("opentelemetry0.7");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public MetricStreamOutputFormat(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static MetricStreamOutputFormat FindValue(string value)
{
return FindValue<MetricStreamOutputFormat>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator MetricStreamOutputFormat(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type RecentlyActive.
/// </summary>
public class RecentlyActive : ConstantClass
{
/// <summary>
/// Constant PT3H for RecentlyActive
/// </summary>
public static readonly RecentlyActive PT3H = new RecentlyActive("PT3H");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public RecentlyActive(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static RecentlyActive FindValue(string value)
{
return FindValue<RecentlyActive>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator RecentlyActive(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type ScanBy.
/// </summary>
public class ScanBy : ConstantClass
{
/// <summary>
/// Constant TimestampAscending for ScanBy
/// </summary>
public static readonly ScanBy TimestampAscending = new ScanBy("TimestampAscending");
/// <summary>
/// Constant TimestampDescending for ScanBy
/// </summary>
public static readonly ScanBy TimestampDescending = new ScanBy("TimestampDescending");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public ScanBy(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static ScanBy FindValue(string value)
{
return FindValue<ScanBy>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator ScanBy(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type StandardUnit.
/// </summary>
public class StandardUnit : ConstantClass
{
/// <summary>
/// Constant Bits for StandardUnit
/// </summary>
public static readonly StandardUnit Bits = new StandardUnit("Bits");
/// <summary>
/// Constant BitsSecond for StandardUnit
/// </summary>
public static readonly StandardUnit BitsSecond = new StandardUnit("Bits/Second");
/// <summary>
/// Constant Bytes for StandardUnit
/// </summary>
public static readonly StandardUnit Bytes = new StandardUnit("Bytes");
/// <summary>
/// Constant BytesSecond for StandardUnit
/// </summary>
public static readonly StandardUnit BytesSecond = new StandardUnit("Bytes/Second");
/// <summary>
/// Constant Count for StandardUnit
/// </summary>
public static readonly StandardUnit Count = new StandardUnit("Count");
/// <summary>
/// Constant CountSecond for StandardUnit
/// </summary>
public static readonly StandardUnit CountSecond = new StandardUnit("Count/Second");
/// <summary>
/// Constant Gigabits for StandardUnit
/// </summary>
public static readonly StandardUnit Gigabits = new StandardUnit("Gigabits");
/// <summary>
/// Constant GigabitsSecond for StandardUnit
/// </summary>
public static readonly StandardUnit GigabitsSecond = new StandardUnit("Gigabits/Second");
/// <summary>
/// Constant Gigabytes for StandardUnit
/// </summary>
public static readonly StandardUnit Gigabytes = new StandardUnit("Gigabytes");
/// <summary>
/// Constant GigabytesSecond for StandardUnit
/// </summary>
public static readonly StandardUnit GigabytesSecond = new StandardUnit("Gigabytes/Second");
/// <summary>
/// Constant Kilobits for StandardUnit
/// </summary>
public static readonly StandardUnit Kilobits = new StandardUnit("Kilobits");
/// <summary>
/// Constant KilobitsSecond for StandardUnit
/// </summary>
public static readonly StandardUnit KilobitsSecond = new StandardUnit("Kilobits/Second");
/// <summary>
/// Constant Kilobytes for StandardUnit
/// </summary>
public static readonly StandardUnit Kilobytes = new StandardUnit("Kilobytes");
/// <summary>
/// Constant KilobytesSecond for StandardUnit
/// </summary>
public static readonly StandardUnit KilobytesSecond = new StandardUnit("Kilobytes/Second");
/// <summary>
/// Constant Megabits for StandardUnit
/// </summary>
public static readonly StandardUnit Megabits = new StandardUnit("Megabits");
/// <summary>
/// Constant MegabitsSecond for StandardUnit
/// </summary>
public static readonly StandardUnit MegabitsSecond = new StandardUnit("Megabits/Second");
/// <summary>
/// Constant Megabytes for StandardUnit
/// </summary>
public static readonly StandardUnit Megabytes = new StandardUnit("Megabytes");
/// <summary>
/// Constant MegabytesSecond for StandardUnit
/// </summary>
public static readonly StandardUnit MegabytesSecond = new StandardUnit("Megabytes/Second");
/// <summary>
/// Constant Microseconds for StandardUnit
/// </summary>
public static readonly StandardUnit Microseconds = new StandardUnit("Microseconds");
/// <summary>
/// Constant Milliseconds for StandardUnit
/// </summary>
public static readonly StandardUnit Milliseconds = new StandardUnit("Milliseconds");
/// <summary>
/// Constant None for StandardUnit
/// </summary>
public static readonly StandardUnit None = new StandardUnit("None");
/// <summary>
/// Constant Percent for StandardUnit
/// </summary>
public static readonly StandardUnit Percent = new StandardUnit("Percent");
/// <summary>
/// Constant Seconds for StandardUnit
/// </summary>
public static readonly StandardUnit Seconds = new StandardUnit("Seconds");
/// <summary>
/// Constant Terabits for StandardUnit
/// </summary>
public static readonly StandardUnit Terabits = new StandardUnit("Terabits");
/// <summary>
/// Constant TerabitsSecond for StandardUnit
/// </summary>
public static readonly StandardUnit TerabitsSecond = new StandardUnit("Terabits/Second");
/// <summary>
/// Constant Terabytes for StandardUnit
/// </summary>
public static readonly StandardUnit Terabytes = new StandardUnit("Terabytes");
/// <summary>
/// Constant TerabytesSecond for StandardUnit
/// </summary>
public static readonly StandardUnit TerabytesSecond = new StandardUnit("Terabytes/Second");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public StandardUnit(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static StandardUnit FindValue(string value)
{
return FindValue<StandardUnit>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator StandardUnit(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type StateValue.
/// </summary>
public class StateValue : ConstantClass
{
/// <summary>
/// Constant ALARM for StateValue
/// </summary>
public static readonly StateValue ALARM = new StateValue("ALARM");
/// <summary>
/// Constant INSUFFICIENT_DATA for StateValue
/// </summary>
public static readonly StateValue INSUFFICIENT_DATA = new StateValue("INSUFFICIENT_DATA");
/// <summary>
/// Constant OK for StateValue
/// </summary>
public static readonly StateValue OK = new StateValue("OK");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public StateValue(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static StateValue FindValue(string value)
{
return FindValue<StateValue>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator StateValue(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type Statistic.
/// </summary>
public class Statistic : ConstantClass
{
/// <summary>
/// Constant Average for Statistic
/// </summary>
public static readonly Statistic Average = new Statistic("Average");
/// <summary>
/// Constant Maximum for Statistic
/// </summary>
public static readonly Statistic Maximum = new Statistic("Maximum");
/// <summary>
/// Constant Minimum for Statistic
/// </summary>
public static readonly Statistic Minimum = new Statistic("Minimum");
/// <summary>
/// Constant SampleCount for Statistic
/// </summary>
public static readonly Statistic SampleCount = new Statistic("SampleCount");
/// <summary>
/// Constant Sum for Statistic
/// </summary>
public static readonly Statistic Sum = new Statistic("Sum");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public Statistic(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static Statistic FindValue(string value)
{
return FindValue<Statistic>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator Statistic(string value)
{
return FindValue(value);
}
}
/// <summary>
/// Constants used for properties of type StatusCode.
/// </summary>
public class StatusCode : ConstantClass
{
/// <summary>
/// Constant Complete for StatusCode
/// </summary>
public static readonly StatusCode Complete = new StatusCode("Complete");
/// <summary>
/// Constant Forbidden for StatusCode
/// </summary>
public static readonly StatusCode Forbidden = new StatusCode("Forbidden");
/// <summary>
/// Constant InternalError for StatusCode
/// </summary>
public static readonly StatusCode InternalError = new StatusCode("InternalError");
/// <summary>
/// Constant PartialData for StatusCode
/// </summary>
public static readonly StatusCode PartialData = new StatusCode("PartialData");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public StatusCode(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static StatusCode FindValue(string value)
{
return FindValue<StatusCode>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator StatusCode(string value)
{
return FindValue(value);
}
}
} | 874 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using Amazon.Runtime;
using Amazon.Runtime.Endpoints;
using static Amazon.Runtime.Internal.Endpoints.StandardLibrary.Fn;
namespace Amazon.CloudWatch.Internal
{
/// <summary>
/// Amazon CloudWatch endpoint provider.
/// Resolves endpoint for given set of CloudWatchEndpointParameters.
/// Can throw AmazonClientException if endpoint resolution is unsuccessful.
/// </summary>
public class AmazonCloudWatchEndpointProvider : IEndpointProvider
{
/// <summary>
/// Resolve endpoint for CloudWatchEndpointParameters
/// </summary>
public Endpoint ResolveEndpoint(EndpointParameters parameters)
{
if (parameters == null)
throw new ArgumentNullException("parameters");
if (parameters["UseDualStack"] == null)
throw new AmazonClientException("UseDualStack parameter must be set for endpoint resolution");
if (parameters["UseFIPS"] == null)
throw new AmazonClientException("UseFIPS parameter must be set for endpoint resolution");
var refs = new Dictionary<string, object>()
{
["Region"] = parameters["Region"],
["UseDualStack"] = parameters["UseDualStack"],
["UseFIPS"] = parameters["UseFIPS"],
["Endpoint"] = parameters["Endpoint"],
};
if (IsSet(refs["Endpoint"]))
{
if (Equals(refs["UseFIPS"], true))
{
throw new AmazonClientException("Invalid Configuration: FIPS and custom endpoint are not supported");
}
if (Equals(refs["UseDualStack"], true))
{
throw new AmazonClientException("Invalid Configuration: Dualstack and custom endpoint are not supported");
}
return new Endpoint((string)refs["Endpoint"], InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
if (IsSet(refs["Region"]))
{
if ((refs["PartitionResult"] = Partition((string)refs["Region"])) != null)
{
if (Equals(refs["UseFIPS"], true) && Equals(refs["UseDualStack"], true))
{
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")) && Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
{
return new Endpoint(Interpolate(@"https://monitoring-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("FIPS and DualStack are enabled, but this partition does not support one or both");
}
if (Equals(refs["UseFIPS"], true))
{
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")))
{
if (Equals("aws-us-gov", GetAttr(refs["PartitionResult"], "name")))
{
return new Endpoint(Interpolate(@"https://monitoring.{Region}.amazonaws.com", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
return new Endpoint(Interpolate(@"https://monitoring-fips.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("FIPS is enabled but this partition does not support FIPS");
}
if (Equals(refs["UseDualStack"], true))
{
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
{
return new Endpoint(Interpolate(@"https://monitoring.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
throw new AmazonClientException("DualStack is enabled but this partition does not support DualStack");
}
return new Endpoint(Interpolate(@"https://monitoring.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
}
}
throw new AmazonClientException("Invalid Configuration: Missing Region");
throw new AmazonClientException("Cannot resolve endpoint");
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using System;
using Amazon.CloudWatch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Endpoints;
using Amazon.Util;
using Amazon.CloudWatch.Endpoints;
#pragma warning disable 1591
namespace Amazon.CloudWatch.Internal
{
/// <summary>
/// Amazon CloudWatch endpoint resolver.
/// Custom PipelineHandler responsible for resolving endpoint and setting authentication parameters for CloudWatch service requests.
/// Collects values for CloudWatchEndpointParameters and then tries to resolve endpoint by calling
/// ResolveEndpoint method on GlobalEndpoints.Provider if present, otherwise uses CloudWatchEndpointProvider.
/// Responsible for setting authentication and http headers provided by resolved endpoint.
/// </summary>
public class AmazonCloudWatchEndpointResolver : BaseEndpointResolver
{
protected override void ServiceSpecificHandler(IExecutionContext executionContext, EndpointParameters parameters)
{
InjectHostPrefix(executionContext.RequestContext);
}
protected override EndpointParameters MapEndpointsParameters(IRequestContext requestContext)
{
var config = (AmazonCloudWatchConfig)requestContext.ClientConfig;
var result = new CloudWatchEndpointParameters();
result.Region = config.RegionEndpoint?.SystemName;
result.UseDualStack = config.UseDualstackEndpoint;
result.UseFIPS = config.UseFIPSEndpoint;
result.Endpoint = config.ServiceURL;
// The region needs to be determined from the ServiceURL if not set.
var regionEndpoint = config.RegionEndpoint;
if (regionEndpoint == null && !string.IsNullOrEmpty(config.ServiceURL))
{
var regionName = AWSSDKUtils.DetermineRegion(config.ServiceURL);
result.Region = RegionEndpoint.GetBySystemName(regionName).SystemName;
}
// To support legacy endpoint overridding rules in the endpoints.json
if (result.Region == "us-east-1-regional")
{
result.Region = "us-east-1";
}
// Use AlternateEndpoint region override if set
if (requestContext.Request.AlternateEndpoint != null)
{
result.Region = requestContext.Request.AlternateEndpoint.SystemName;
}
// Assign staticContextParams and contextParam per operation
return result;
}
}
} | 83 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using Amazon.Runtime.Internal;
namespace Amazon.CloudWatch.Internal
{
/// <summary>
/// Service metadata for Amazon CloudWatch service
/// </summary>
public partial class AmazonCloudWatchMetadata : IServiceMetadata
{
/// <summary>
/// Gets the value of the Service Id.
/// </summary>
public string ServiceId
{
get
{
return "CloudWatch";
}
}
/// <summary>
/// Gets the dictionary that gives mapping of renamed operations
/// </summary>
public System.Collections.Generic.IDictionary<string, string> OperationNameMapping
{
get
{
return new System.Collections.Generic.Dictionary<string, string>(0)
{
};
}
}
}
} | 55 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Represents the history of a specific alarm.
/// </summary>
public partial class AlarmHistoryItem
{
private string _alarmName;
private AlarmType _alarmType;
private string _historyData;
private HistoryItemType _historyItemType;
private string _historySummary;
private DateTime? _timestamp;
/// <summary>
/// Gets and sets the property AlarmName.
/// <para>
/// The descriptive name for the alarm.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=255)]
public string AlarmName
{
get { return this._alarmName; }
set { this._alarmName = value; }
}
// Check to see if AlarmName property is set
internal bool IsSetAlarmName()
{
return this._alarmName != null;
}
/// <summary>
/// Gets and sets the property AlarmType.
/// <para>
/// The type of alarm, either metric alarm or composite alarm.
/// </para>
/// </summary>
public AlarmType AlarmType
{
get { return this._alarmType; }
set { this._alarmType = value; }
}
// Check to see if AlarmType property is set
internal bool IsSetAlarmType()
{
return this._alarmType != null;
}
/// <summary>
/// Gets and sets the property HistoryData.
/// <para>
/// Data about the alarm, in JSON format.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=4095)]
public string HistoryData
{
get { return this._historyData; }
set { this._historyData = value; }
}
// Check to see if HistoryData property is set
internal bool IsSetHistoryData()
{
return this._historyData != null;
}
/// <summary>
/// Gets and sets the property HistoryItemType.
/// <para>
/// The type of alarm history item.
/// </para>
/// </summary>
public HistoryItemType HistoryItemType
{
get { return this._historyItemType; }
set { this._historyItemType = value; }
}
// Check to see if HistoryItemType property is set
internal bool IsSetHistoryItemType()
{
return this._historyItemType != null;
}
/// <summary>
/// Gets and sets the property HistorySummary.
/// <para>
/// A summary of the alarm history, in text format.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=255)]
public string HistorySummary
{
get { return this._historySummary; }
set { this._historySummary = value; }
}
// Check to see if HistorySummary property is set
internal bool IsSetHistorySummary()
{
return this._historySummary != null;
}
/// <summary>
/// Gets and sets the property Timestamp.
/// <para>
/// The time stamp for the alarm history item.
/// </para>
/// </summary>
public DateTime Timestamp
{
get { return this._timestamp.GetValueOrDefault(); }
set { this._timestamp = value; }
}
// Check to see if Timestamp property is set
internal bool IsSetTimestamp()
{
return this._timestamp.HasValue;
}
}
} | 155 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.normal.json service model.
*/
using Amazon.Runtime;
namespace Amazon.CloudWatch
{
/// <summary>
/// Base class for CloudWatch operation requests.
/// </summary>
public partial class AmazonCloudWatchRequest : AmazonWebServiceRequest
{
}
} | 30 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// An anomaly detection model associated with a particular CloudWatch metric, statistic,
/// or metric math expression. You can use the model to display a band of expected, normal
/// values when the metric is graphed.
/// </summary>
public partial class AnomalyDetector
{
private AnomalyDetectorConfiguration _configuration;
private List<Dimension> _dimensions = new List<Dimension>();
private MetricMathAnomalyDetector _metricMathAnomalyDetector;
private string _metricName;
private string _awsNamespace;
private SingleMetricAnomalyDetector _singleMetricAnomalyDetector;
private string _stat;
private AnomalyDetectorStateValue _stateValue;
/// <summary>
/// Gets and sets the property Configuration.
/// <para>
/// The configuration specifies details about how the anomaly detection model is to be
/// trained, including time ranges to exclude from use for training the model, and the
/// time zone to use for the metric.
/// </para>
/// </summary>
public AnomalyDetectorConfiguration Configuration
{
get { return this._configuration; }
set { this._configuration = value; }
}
// Check to see if Configuration property is set
internal bool IsSetConfiguration()
{
return this._configuration != null;
}
/// <summary>
/// Gets and sets the property Dimensions.
/// <para>
/// The metric dimensions associated with the anomaly detection model.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.Dimensions property.")]
[AWSProperty(Max=30)]
public List<Dimension> Dimensions
{
get { return this._dimensions; }
set { this._dimensions = value; }
}
// Check to see if Dimensions property is set
internal bool IsSetDimensions()
{
return this._dimensions != null && this._dimensions.Count > 0;
}
/// <summary>
/// Gets and sets the property MetricMathAnomalyDetector.
/// <para>
/// The CloudWatch metric math expression for this anomaly detector.
/// </para>
/// </summary>
public MetricMathAnomalyDetector MetricMathAnomalyDetector
{
get { return this._metricMathAnomalyDetector; }
set { this._metricMathAnomalyDetector = value; }
}
// Check to see if MetricMathAnomalyDetector property is set
internal bool IsSetMetricMathAnomalyDetector()
{
return this._metricMathAnomalyDetector != null;
}
/// <summary>
/// Gets and sets the property MetricName.
/// <para>
/// The name of the metric associated with the anomaly detection model.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.MetricName property.")]
[AWSProperty(Min=1, Max=255)]
public string MetricName
{
get { return this._metricName; }
set { this._metricName = value; }
}
// Check to see if MetricName property is set
internal bool IsSetMetricName()
{
return this._metricName != null;
}
/// <summary>
/// Gets and sets the property Namespace.
/// <para>
/// The namespace of the metric associated with the anomaly detection model.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.Namespace property.")]
[AWSProperty(Min=1, Max=255)]
public string Namespace
{
get { return this._awsNamespace; }
set { this._awsNamespace = value; }
}
// Check to see if Namespace property is set
internal bool IsSetNamespace()
{
return this._awsNamespace != null;
}
/// <summary>
/// Gets and sets the property SingleMetricAnomalyDetector.
/// <para>
/// The CloudWatch metric and statistic for this anomaly detector.
/// </para>
/// </summary>
public SingleMetricAnomalyDetector SingleMetricAnomalyDetector
{
get { return this._singleMetricAnomalyDetector; }
set { this._singleMetricAnomalyDetector = value; }
}
// Check to see if SingleMetricAnomalyDetector property is set
internal bool IsSetSingleMetricAnomalyDetector()
{
return this._singleMetricAnomalyDetector != null;
}
/// <summary>
/// Gets and sets the property Stat.
/// <para>
/// The statistic associated with the anomaly detection model.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.Stat property.")]
[AWSProperty(Max=50)]
public string Stat
{
get { return this._stat; }
set { this._stat = value; }
}
// Check to see if Stat property is set
internal bool IsSetStat()
{
return this._stat != null;
}
/// <summary>
/// Gets and sets the property StateValue.
/// <para>
/// The current status of the anomaly detector's training. The possible values are <code>TRAINED
/// | PENDING_TRAINING | TRAINED_INSUFFICIENT_DATA</code>
/// </para>
/// </summary>
public AnomalyDetectorStateValue StateValue
{
get { return this._stateValue; }
set { this._stateValue = value; }
}
// Check to see if StateValue property is set
internal bool IsSetStateValue()
{
return this._stateValue != null;
}
}
} | 203 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// The configuration specifies details about how the anomaly detection model is to be
/// trained, including time ranges to exclude from use for training the model and the
/// time zone to use for the metric.
/// </summary>
public partial class AnomalyDetectorConfiguration
{
private List<Range> _excludedTimeRanges = new List<Range>();
private string _metricTimezone;
/// <summary>
/// Gets and sets the property ExcludedTimeRanges.
/// <para>
/// An array of time ranges to exclude from use when the anomaly detection model is trained.
/// Use this to make sure that events that could cause unusual values for the metric,
/// such as deployments, aren't used when CloudWatch creates the model.
/// </para>
/// </summary>
public List<Range> ExcludedTimeRanges
{
get { return this._excludedTimeRanges; }
set { this._excludedTimeRanges = value; }
}
// Check to see if ExcludedTimeRanges property is set
internal bool IsSetExcludedTimeRanges()
{
return this._excludedTimeRanges != null && this._excludedTimeRanges.Count > 0;
}
/// <summary>
/// Gets and sets the property MetricTimezone.
/// <para>
/// The time zone to use for the metric. This is useful to enable the model to automatically
/// account for daylight savings time changes if the metric is sensitive to such time
/// changes.
/// </para>
///
/// <para>
/// To specify a time zone, use the name of the time zone as specified in the standard
/// tz database. For more information, see <a href="https://en.wikipedia.org/wiki/Tz_database">tz
/// database</a>.
/// </para>
/// </summary>
[AWSProperty(Max=50)]
public string MetricTimezone
{
get { return this._metricTimezone; }
set { this._metricTimezone = value; }
}
// Check to see if MetricTimezone property is set
internal bool IsSetMetricTimezone()
{
return this._metricTimezone != null;
}
}
} | 89 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// The details about a composite alarm.
/// </summary>
public partial class CompositeAlarm
{
private bool? _actionsEnabled;
private ActionsSuppressedBy _actionsSuppressedBy;
private string _actionsSuppressedReason;
private string _actionsSuppressor;
private int? _actionsSuppressorExtensionPeriod;
private int? _actionsSuppressorWaitPeriod;
private List<string> _alarmActions = new List<string>();
private string _alarmArn;
private DateTime? _alarmConfigurationUpdatedTimestamp;
private string _alarmDescription;
private string _alarmName;
private string _alarmRule;
private List<string> _insufficientDataActions = new List<string>();
private List<string> _okActions = new List<string>();
private string _stateReason;
private string _stateReasonData;
private DateTime? _stateTransitionedTimestamp;
private DateTime? _stateUpdatedTimestamp;
private StateValue _stateValue;
/// <summary>
/// Gets and sets the property ActionsEnabled.
/// <para>
/// Indicates whether actions should be executed during any changes to the alarm state.
/// </para>
/// </summary>
public bool ActionsEnabled
{
get { return this._actionsEnabled.GetValueOrDefault(); }
set { this._actionsEnabled = value; }
}
// Check to see if ActionsEnabled property is set
internal bool IsSetActionsEnabled()
{
return this._actionsEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ActionsSuppressedBy.
/// <para>
/// When the value is <code>ALARM</code>, it means that the actions are suppressed because
/// the suppressor alarm is in <code>ALARM</code> When the value is <code>WaitPeriod</code>,
/// it means that the actions are suppressed because the composite alarm is waiting for
/// the suppressor alarm to go into into the <code>ALARM</code> state. The maximum waiting
/// time is as specified in <code>ActionsSuppressorWaitPeriod</code>. After this time,
/// the composite alarm performs its actions. When the value is <code>ExtensionPeriod</code>,
/// it means that the actions are suppressed because the composite alarm is waiting after
/// the suppressor alarm went out of the <code>ALARM</code> state. The maximum waiting
/// time is as specified in <code>ActionsSuppressorExtensionPeriod</code>. After this
/// time, the composite alarm performs its actions.
/// </para>
/// </summary>
public ActionsSuppressedBy ActionsSuppressedBy
{
get { return this._actionsSuppressedBy; }
set { this._actionsSuppressedBy = value; }
}
// Check to see if ActionsSuppressedBy property is set
internal bool IsSetActionsSuppressedBy()
{
return this._actionsSuppressedBy != null;
}
/// <summary>
/// Gets and sets the property ActionsSuppressedReason.
/// <para>
/// Captures the reason for action suppression.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string ActionsSuppressedReason
{
get { return this._actionsSuppressedReason; }
set { this._actionsSuppressedReason = value; }
}
// Check to see if ActionsSuppressedReason property is set
internal bool IsSetActionsSuppressedReason()
{
return this._actionsSuppressedReason != null;
}
/// <summary>
/// Gets and sets the property ActionsSuppressor.
/// <para>
/// Actions will be suppressed if the suppressor alarm is in the <code>ALARM</code> state.
/// <code>ActionsSuppressor</code> can be an AlarmName or an Amazon Resource Name (ARN)
/// from an existing alarm.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string ActionsSuppressor
{
get { return this._actionsSuppressor; }
set { this._actionsSuppressor = value; }
}
// Check to see if ActionsSuppressor property is set
internal bool IsSetActionsSuppressor()
{
return this._actionsSuppressor != null;
}
/// <summary>
/// Gets and sets the property ActionsSuppressorExtensionPeriod.
/// <para>
/// The maximum time in seconds that the composite alarm waits after suppressor alarm
/// goes out of the <code>ALARM</code> state. After this time, the composite alarm performs
/// its actions.
/// </para>
/// <important>
/// <para>
/// <code>ExtensionPeriod</code> is required only when <code>ActionsSuppressor</code>
/// is specified.
/// </para>
/// </important>
/// </summary>
public int ActionsSuppressorExtensionPeriod
{
get { return this._actionsSuppressorExtensionPeriod.GetValueOrDefault(); }
set { this._actionsSuppressorExtensionPeriod = value; }
}
// Check to see if ActionsSuppressorExtensionPeriod property is set
internal bool IsSetActionsSuppressorExtensionPeriod()
{
return this._actionsSuppressorExtensionPeriod.HasValue;
}
/// <summary>
/// Gets and sets the property ActionsSuppressorWaitPeriod.
/// <para>
/// The maximum time in seconds that the composite alarm waits for the suppressor alarm
/// to go into the <code>ALARM</code> state. After this time, the composite alarm performs
/// its actions.
/// </para>
/// <important>
/// <para>
/// <code>WaitPeriod</code> is required only when <code>ActionsSuppressor</code> is specified.
///
/// </para>
/// </important>
/// </summary>
public int ActionsSuppressorWaitPeriod
{
get { return this._actionsSuppressorWaitPeriod.GetValueOrDefault(); }
set { this._actionsSuppressorWaitPeriod = value; }
}
// Check to see if ActionsSuppressorWaitPeriod property is set
internal bool IsSetActionsSuppressorWaitPeriod()
{
return this._actionsSuppressorWaitPeriod.HasValue;
}
/// <summary>
/// Gets and sets the property AlarmActions.
/// <para>
/// The actions to execute when this alarm transitions to the ALARM state from any other
/// state. Each action is specified as an Amazon Resource Name (ARN).
/// </para>
/// </summary>
[AWSProperty(Max=5)]
public List<string> AlarmActions
{
get { return this._alarmActions; }
set { this._alarmActions = value; }
}
// Check to see if AlarmActions property is set
internal bool IsSetAlarmActions()
{
return this._alarmActions != null && this._alarmActions.Count > 0;
}
/// <summary>
/// Gets and sets the property AlarmArn.
/// <para>
/// The Amazon Resource Name (ARN) of the alarm.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1600)]
public string AlarmArn
{
get { return this._alarmArn; }
set { this._alarmArn = value; }
}
// Check to see if AlarmArn property is set
internal bool IsSetAlarmArn()
{
return this._alarmArn != null;
}
/// <summary>
/// Gets and sets the property AlarmConfigurationUpdatedTimestamp.
/// <para>
/// The time stamp of the last update to the alarm configuration.
/// </para>
/// </summary>
public DateTime AlarmConfigurationUpdatedTimestamp
{
get { return this._alarmConfigurationUpdatedTimestamp.GetValueOrDefault(); }
set { this._alarmConfigurationUpdatedTimestamp = value; }
}
// Check to see if AlarmConfigurationUpdatedTimestamp property is set
internal bool IsSetAlarmConfigurationUpdatedTimestamp()
{
return this._alarmConfigurationUpdatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property AlarmDescription.
/// <para>
/// The description of the alarm.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string AlarmDescription
{
get { return this._alarmDescription; }
set { this._alarmDescription = value; }
}
// Check to see if AlarmDescription property is set
internal bool IsSetAlarmDescription()
{
return this._alarmDescription != null;
}
/// <summary>
/// Gets and sets the property AlarmName.
/// <para>
/// The name of the alarm.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=255)]
public string AlarmName
{
get { return this._alarmName; }
set { this._alarmName = value; }
}
// Check to see if AlarmName property is set
internal bool IsSetAlarmName()
{
return this._alarmName != null;
}
/// <summary>
/// Gets and sets the property AlarmRule.
/// <para>
/// The rule that this alarm uses to evaluate its alarm state.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=10240)]
public string AlarmRule
{
get { return this._alarmRule; }
set { this._alarmRule = value; }
}
// Check to see if AlarmRule property is set
internal bool IsSetAlarmRule()
{
return this._alarmRule != null;
}
/// <summary>
/// Gets and sets the property InsufficientDataActions.
/// <para>
/// The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state
/// from any other state. Each action is specified as an Amazon Resource Name (ARN).
/// </para>
/// </summary>
[AWSProperty(Max=5)]
public List<string> InsufficientDataActions
{
get { return this._insufficientDataActions; }
set { this._insufficientDataActions = value; }
}
// Check to see if InsufficientDataActions property is set
internal bool IsSetInsufficientDataActions()
{
return this._insufficientDataActions != null && this._insufficientDataActions.Count > 0;
}
/// <summary>
/// Gets and sets the property OKActions.
/// <para>
/// The actions to execute when this alarm transitions to the OK state from any other
/// state. Each action is specified as an Amazon Resource Name (ARN).
/// </para>
/// </summary>
[AWSProperty(Max=5)]
public List<string> OKActions
{
get { return this._okActions; }
set { this._okActions = value; }
}
// Check to see if OKActions property is set
internal bool IsSetOKActions()
{
return this._okActions != null && this._okActions.Count > 0;
}
/// <summary>
/// Gets and sets the property StateReason.
/// <para>
/// An explanation for the alarm state, in text format.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1023)]
public string StateReason
{
get { return this._stateReason; }
set { this._stateReason = value; }
}
// Check to see if StateReason property is set
internal bool IsSetStateReason()
{
return this._stateReason != null;
}
/// <summary>
/// Gets and sets the property StateReasonData.
/// <para>
/// An explanation for the alarm state, in JSON format.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=4000)]
public string StateReasonData
{
get { return this._stateReasonData; }
set { this._stateReasonData = value; }
}
// Check to see if StateReasonData property is set
internal bool IsSetStateReasonData()
{
return this._stateReasonData != null;
}
/// <summary>
/// Gets and sets the property StateTransitionedTimestamp.
/// <para>
/// The timestamp of the last change to the alarm's <code>StateValue</code>.
/// </para>
/// </summary>
public DateTime StateTransitionedTimestamp
{
get { return this._stateTransitionedTimestamp.GetValueOrDefault(); }
set { this._stateTransitionedTimestamp = value; }
}
// Check to see if StateTransitionedTimestamp property is set
internal bool IsSetStateTransitionedTimestamp()
{
return this._stateTransitionedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property StateUpdatedTimestamp.
/// <para>
/// Tracks the timestamp of any state update, even if <code>StateValue</code> doesn't
/// change.
/// </para>
/// </summary>
public DateTime StateUpdatedTimestamp
{
get { return this._stateUpdatedTimestamp.GetValueOrDefault(); }
set { this._stateUpdatedTimestamp = value; }
}
// Check to see if StateUpdatedTimestamp property is set
internal bool IsSetStateUpdatedTimestamp()
{
return this._stateUpdatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property StateValue.
/// <para>
/// The state value for the alarm.
/// </para>
/// </summary>
public StateValue StateValue
{
get { return this._stateValue; }
set { this._stateValue = value; }
}
// Check to see if StateValue property is set
internal bool IsSetStateValue()
{
return this._stateValue != null;
}
}
} | 441 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// More than one process tried to modify a resource at the same time.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ConcurrentModificationException : AmazonCloudWatchException
{
/// <summary>
/// Constructs a new ConcurrentModificationException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ConcurrentModificationException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ConcurrentModificationException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ConcurrentModificationException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ConcurrentModificationException
/// </summary>
/// <param name="innerException"></param>
public ConcurrentModificationException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ConcurrentModificationException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ConcurrentModificationException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ConcurrentModificationException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ConcurrentModificationException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ConcurrentModificationException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ConcurrentModificationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Represents a specific dashboard.
/// </summary>
public partial class DashboardEntry
{
private string _dashboardArn;
private string _dashboardName;
private DateTime? _lastModified;
private long? _size;
/// <summary>
/// Gets and sets the property DashboardArn.
/// <para>
/// The Amazon Resource Name (ARN) of the dashboard.
/// </para>
/// </summary>
public string DashboardArn
{
get { return this._dashboardArn; }
set { this._dashboardArn = value; }
}
// Check to see if DashboardArn property is set
internal bool IsSetDashboardArn()
{
return this._dashboardArn != null;
}
/// <summary>
/// Gets and sets the property DashboardName.
/// <para>
/// The name of the dashboard.
/// </para>
/// </summary>
public string DashboardName
{
get { return this._dashboardName; }
set { this._dashboardName = value; }
}
// Check to see if DashboardName property is set
internal bool IsSetDashboardName()
{
return this._dashboardName != null;
}
/// <summary>
/// Gets and sets the property LastModified.
/// <para>
/// The time stamp of when the dashboard was last modified, either by an API call or through
/// the console. This number is expressed as the number of milliseconds since Jan 1, 1970
/// 00:00:00 UTC.
/// </para>
/// </summary>
public DateTime LastModified
{
get { return this._lastModified.GetValueOrDefault(); }
set { this._lastModified = value; }
}
// Check to see if LastModified property is set
internal bool IsSetLastModified()
{
return this._lastModified.HasValue;
}
/// <summary>
/// Gets and sets the property Size.
/// <para>
/// The size of the dashboard, in bytes.
/// </para>
/// </summary>
public long Size
{
get { return this._size.GetValueOrDefault(); }
set { this._size = value; }
}
// Check to see if Size property is set
internal bool IsSetSize()
{
return this._size.HasValue;
}
}
} | 116 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Some part of the dashboard data is invalid.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class DashboardInvalidInputErrorException : AmazonCloudWatchException
{
private List<DashboardValidationMessage> _dashboardValidationMessages = new List<DashboardValidationMessage>();
/// <summary>
/// Constructs a new DashboardInvalidInputErrorException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public DashboardInvalidInputErrorException(string message)
: base(message) {}
/// <summary>
/// Construct instance of DashboardInvalidInputErrorException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public DashboardInvalidInputErrorException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of DashboardInvalidInputErrorException
/// </summary>
/// <param name="innerException"></param>
public DashboardInvalidInputErrorException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of DashboardInvalidInputErrorException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public DashboardInvalidInputErrorException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of DashboardInvalidInputErrorException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public DashboardInvalidInputErrorException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the DashboardInvalidInputErrorException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected DashboardInvalidInputErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
this.DashboardValidationMessages = (List<DashboardValidationMessage>)info.GetValue("DashboardValidationMessages", typeof(List<DashboardValidationMessage>));
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("DashboardValidationMessages", this.DashboardValidationMessages);
}
#endif
/// <summary>
/// Gets and sets the property DashboardValidationMessages.
/// </summary>
public List<DashboardValidationMessage> DashboardValidationMessages
{
get { return this._dashboardValidationMessages; }
set { this._dashboardValidationMessages = value; }
}
// Check to see if DashboardValidationMessages property is set
internal bool IsSetDashboardValidationMessages()
{
return this._dashboardValidationMessages != null && this._dashboardValidationMessages.Count > 0;
}
}
} | 142 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// The specified dashboard does not exist.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class DashboardNotFoundErrorException : AmazonCloudWatchException
{
/// <summary>
/// Constructs a new DashboardNotFoundErrorException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public DashboardNotFoundErrorException(string message)
: base(message) {}
/// <summary>
/// Construct instance of DashboardNotFoundErrorException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public DashboardNotFoundErrorException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of DashboardNotFoundErrorException
/// </summary>
/// <param name="innerException"></param>
public DashboardNotFoundErrorException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of DashboardNotFoundErrorException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public DashboardNotFoundErrorException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of DashboardNotFoundErrorException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public DashboardNotFoundErrorException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the DashboardNotFoundErrorException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected DashboardNotFoundErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// An error or warning for the operation.
/// </summary>
public partial class DashboardValidationMessage
{
private string _dataPath;
private string _message;
/// <summary>
/// Gets and sets the property DataPath.
/// <para>
/// The data path related to the message.
/// </para>
/// </summary>
public string DataPath
{
get { return this._dataPath; }
set { this._dataPath = value; }
}
// Check to see if DataPath property is set
internal bool IsSetDataPath()
{
return this._dataPath != null;
}
/// <summary>
/// Gets and sets the property Message.
/// <para>
/// A message describing the error or warning.
/// </para>
/// </summary>
public string Message
{
get { return this._message; }
set { this._message = value; }
}
// Check to see if Message property is set
internal bool IsSetMessage()
{
return this._message != null;
}
}
} | 76 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Encapsulates the statistical data that CloudWatch computes from metric data.
/// </summary>
public partial class Datapoint
{
private double? _average;
private Dictionary<string, double> _extendedStatistics = new Dictionary<string, double>();
private double? _maximum;
private double? _minimum;
private double? _sampleCount;
private double? _sum;
private DateTime? _timestamp;
private StandardUnit _unit;
/// <summary>
/// Gets and sets the property Average.
/// <para>
/// The average of the metric values that correspond to the data point.
/// </para>
/// </summary>
public double Average
{
get { return this._average.GetValueOrDefault(); }
set { this._average = value; }
}
// Check to see if Average property is set
internal bool IsSetAverage()
{
return this._average.HasValue;
}
/// <summary>
/// Gets and sets the property ExtendedStatistics.
/// <para>
/// The percentile statistic for the data point.
/// </para>
/// </summary>
public Dictionary<string, double> ExtendedStatistics
{
get { return this._extendedStatistics; }
set { this._extendedStatistics = value; }
}
// Check to see if ExtendedStatistics property is set
internal bool IsSetExtendedStatistics()
{
return this._extendedStatistics != null && this._extendedStatistics.Count > 0;
}
/// <summary>
/// Gets and sets the property Maximum.
/// <para>
/// The maximum metric value for the data point.
/// </para>
/// </summary>
public double Maximum
{
get { return this._maximum.GetValueOrDefault(); }
set { this._maximum = value; }
}
// Check to see if Maximum property is set
internal bool IsSetMaximum()
{
return this._maximum.HasValue;
}
/// <summary>
/// Gets and sets the property Minimum.
/// <para>
/// The minimum metric value for the data point.
/// </para>
/// </summary>
public double Minimum
{
get { return this._minimum.GetValueOrDefault(); }
set { this._minimum = value; }
}
// Check to see if Minimum property is set
internal bool IsSetMinimum()
{
return this._minimum.HasValue;
}
/// <summary>
/// Gets and sets the property SampleCount.
/// <para>
/// The number of metric values that contributed to the aggregate value of this data point.
/// </para>
/// </summary>
public double SampleCount
{
get { return this._sampleCount.GetValueOrDefault(); }
set { this._sampleCount = value; }
}
// Check to see if SampleCount property is set
internal bool IsSetSampleCount()
{
return this._sampleCount.HasValue;
}
/// <summary>
/// Gets and sets the property Sum.
/// <para>
/// The sum of the metric values for the data point.
/// </para>
/// </summary>
public double Sum
{
get { return this._sum.GetValueOrDefault(); }
set { this._sum = value; }
}
// Check to see if Sum property is set
internal bool IsSetSum()
{
return this._sum.HasValue;
}
/// <summary>
/// Gets and sets the property Timestamp.
/// <para>
/// The time stamp used for the data point.
/// </para>
/// </summary>
public DateTime Timestamp
{
get { return this._timestamp.GetValueOrDefault(); }
set { this._timestamp = value; }
}
// Check to see if Timestamp property is set
internal bool IsSetTimestamp()
{
return this._timestamp.HasValue;
}
/// <summary>
/// Gets and sets the property Unit.
/// <para>
/// The standard unit for the data point.
/// </para>
/// </summary>
public StandardUnit Unit
{
get { return this._unit; }
set { this._unit = value; }
}
// Check to see if Unit property is set
internal bool IsSetUnit()
{
return this._unit != null;
}
}
} | 190 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Container for the parameters to the DeleteAlarms operation.
/// Deletes the specified alarms. You can delete up to 100 alarms in one operation. However,
/// this total can include no more than one composite alarm. For example, you could delete
/// 99 metric alarms and one composite alarms with one operation, but you can't delete
/// two composite alarms with one operation.
///
///
/// <para>
/// If you specify an incorrect alarm name or make any other error in the operation,
/// no alarms are deleted. To confirm that alarms were deleted successfully, you can use
/// the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html">DescribeAlarms</a>
/// operation after using <code>DeleteAlarms</code>.
/// </para>
/// <note>
/// <para>
/// It is possible to create a loop or cycle of composite alarms, where composite alarm
/// A depends on composite alarm B, and composite alarm B also depends on composite alarm
/// A. In this scenario, you can't delete any composite alarm that is part of the cycle
/// because there is always still a composite alarm that depends on that alarm that you
/// want to delete.
/// </para>
///
/// <para>
/// To get out of such a situation, you must break the cycle by changing the rule of one
/// of the composite alarms in the cycle to remove a dependency that creates the cycle.
/// The simplest change to make to break a cycle is to change the <code>AlarmRule</code>
/// of one of the alarms to <code>false</code>.
/// </para>
///
/// <para>
/// Additionally, the evaluation of composite alarms stops if CloudWatch detects a cycle
/// in the evaluation path.
/// </para>
/// </note>
/// </summary>
public partial class DeleteAlarmsRequest : AmazonCloudWatchRequest
{
private List<string> _alarmNames = new List<string>();
/// <summary>
/// Gets and sets the property AlarmNames.
/// <para>
/// The alarms to be deleted. Do not enclose the alarm names in quote marks.
/// </para>
/// </summary>
[AWSProperty(Required=true, Max=100)]
public List<string> AlarmNames
{
get { return this._alarmNames; }
set { this._alarmNames = value; }
}
// Check to see if AlarmNames property is set
internal bool IsSetAlarmNames()
{
return this._alarmNames != null && this._alarmNames.Count > 0;
}
}
} | 91 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// This is the response object from the DeleteAlarms operation.
/// </summary>
public partial class DeleteAlarmsResponse : AmazonWebServiceResponse
{
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Container for the parameters to the DeleteAnomalyDetector operation.
/// Deletes the specified anomaly detection model from your account. For more information
/// about how to delete an anomaly detection model, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Anomaly_Detection_Alarm.html#Delete_Anomaly_Detection_Model">Deleting
/// an anomaly detection model</a> in the <i>CloudWatch User Guide</i>.
/// </summary>
public partial class DeleteAnomalyDetectorRequest : AmazonCloudWatchRequest
{
private List<Dimension> _dimensions = new List<Dimension>();
private MetricMathAnomalyDetector _metricMathAnomalyDetector;
private string _metricName;
private string _awsNamespace;
private SingleMetricAnomalyDetector _singleMetricAnomalyDetector;
private string _stat;
/// <summary>
/// Gets and sets the property Dimensions.
/// <para>
/// The metric dimensions associated with the anomaly detection model to delete.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.")]
[AWSProperty(Max=30)]
public List<Dimension> Dimensions
{
get { return this._dimensions; }
set { this._dimensions = value; }
}
// Check to see if Dimensions property is set
internal bool IsSetDimensions()
{
return this._dimensions != null && this._dimensions.Count > 0;
}
/// <summary>
/// Gets and sets the property MetricMathAnomalyDetector.
/// <para>
/// The metric math anomaly detector to be deleted.
/// </para>
///
/// <para>
/// When using <code>MetricMathAnomalyDetector</code>, you cannot include following parameters
/// in the same operation:
/// </para>
/// <ul> <li>
/// <para>
/// <code>Dimensions</code>,
/// </para>
/// </li> <li>
/// <para>
/// <code>MetricName</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>Namespace</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>Stat</code>
/// </para>
/// </li> <li>
/// <para>
/// the <code>SingleMetricAnomalyDetector</code> parameters of <code>DeleteAnomalyDetectorInput</code>
///
/// </para>
/// </li> </ul>
/// <para>
/// Instead, specify the metric math anomaly detector attributes as part of the <code>MetricMathAnomalyDetector</code>
/// property.
/// </para>
/// </summary>
public MetricMathAnomalyDetector MetricMathAnomalyDetector
{
get { return this._metricMathAnomalyDetector; }
set { this._metricMathAnomalyDetector = value; }
}
// Check to see if MetricMathAnomalyDetector property is set
internal bool IsSetMetricMathAnomalyDetector()
{
return this._metricMathAnomalyDetector != null;
}
/// <summary>
/// Gets and sets the property MetricName.
/// <para>
/// The metric name associated with the anomaly detection model to delete.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.")]
[AWSProperty(Min=1, Max=255)]
public string MetricName
{
get { return this._metricName; }
set { this._metricName = value; }
}
// Check to see if MetricName property is set
internal bool IsSetMetricName()
{
return this._metricName != null;
}
/// <summary>
/// Gets and sets the property Namespace.
/// <para>
/// The namespace associated with the anomaly detection model to delete.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.")]
[AWSProperty(Min=1, Max=255)]
public string Namespace
{
get { return this._awsNamespace; }
set { this._awsNamespace = value; }
}
// Check to see if Namespace property is set
internal bool IsSetNamespace()
{
return this._awsNamespace != null;
}
/// <summary>
/// Gets and sets the property SingleMetricAnomalyDetector.
/// <para>
/// A single metric anomaly detector to be deleted.
/// </para>
///
/// <para>
/// When using <code>SingleMetricAnomalyDetector</code>, you cannot include the following
/// parameters in the same operation:
/// </para>
/// <ul> <li>
/// <para>
/// <code>Dimensions</code>,
/// </para>
/// </li> <li>
/// <para>
/// <code>MetricName</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>Namespace</code>
/// </para>
/// </li> <li>
/// <para>
/// <code>Stat</code>
/// </para>
/// </li> <li>
/// <para>
/// the <code>MetricMathAnomalyDetector</code> parameters of <code>DeleteAnomalyDetectorInput</code>
///
/// </para>
/// </li> </ul>
/// <para>
/// Instead, specify the single metric anomaly detector attributes as part of the <code>SingleMetricAnomalyDetector</code>
/// property.
/// </para>
/// </summary>
public SingleMetricAnomalyDetector SingleMetricAnomalyDetector
{
get { return this._singleMetricAnomalyDetector; }
set { this._singleMetricAnomalyDetector = value; }
}
// Check to see if SingleMetricAnomalyDetector property is set
internal bool IsSetSingleMetricAnomalyDetector()
{
return this._singleMetricAnomalyDetector != null;
}
/// <summary>
/// Gets and sets the property Stat.
/// <para>
/// The statistic associated with the anomaly detection model to delete.
/// </para>
/// </summary>
[Obsolete("Use SingleMetricAnomalyDetector.")]
[AWSProperty(Max=50)]
public string Stat
{
get { return this._stat; }
set { this._stat = value; }
}
// Check to see if Stat property is set
internal bool IsSetStat()
{
return this._stat != null;
}
}
} | 225 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// This is the response object from the DeleteAnomalyDetector operation.
/// </summary>
public partial class DeleteAnomalyDetectorResponse : AmazonWebServiceResponse
{
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Container for the parameters to the DeleteDashboards operation.
/// Deletes all dashboards that you specify. You can specify up to 100 dashboards to delete.
/// If there is an error during this call, no dashboards are deleted.
/// </summary>
public partial class DeleteDashboardsRequest : AmazonCloudWatchRequest
{
private List<string> _dashboardNames = new List<string>();
/// <summary>
/// Gets and sets the property DashboardNames.
/// <para>
/// The dashboards to be deleted. This parameter is required.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public List<string> DashboardNames
{
get { return this._dashboardNames; }
set { this._dashboardNames = value; }
}
// Check to see if DashboardNames property is set
internal bool IsSetDashboardNames()
{
return this._dashboardNames != null && this._dashboardNames.Count > 0;
}
}
} | 60 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// This is the response object from the DeleteDashboards operation.
/// </summary>
public partial class DeleteDashboardsResponse : AmazonWebServiceResponse
{
}
} | 38 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Container for the parameters to the DeleteInsightRules operation.
/// Permanently deletes the specified Contributor Insights rules.
///
///
/// <para>
/// If you create a rule, delete it, and then re-create it with the same name, historical
/// data from the first time the rule was created might not be available.
/// </para>
/// </summary>
public partial class DeleteInsightRulesRequest : AmazonCloudWatchRequest
{
private List<string> _ruleNames = new List<string>();
/// <summary>
/// Gets and sets the property RuleNames.
/// <para>
/// An array of the rule names to delete. If you need to find out the names of your rules,
/// use <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html">DescribeInsightRules</a>.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public List<string> RuleNames
{
get { return this._ruleNames; }
set { this._ruleNames = value; }
}
// Check to see if RuleNames property is set
internal bool IsSetRuleNames()
{
return this._ruleNames != null && this._ruleNames.Count > 0;
}
}
} | 66 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// This is the response object from the DeleteInsightRules operation.
/// </summary>
public partial class DeleteInsightRulesResponse : AmazonWebServiceResponse
{
private List<PartialFailure> _failures = new List<PartialFailure>();
/// <summary>
/// Gets and sets the property Failures.
/// <para>
/// An array listing the rules that could not be deleted. You cannot delete built-in rules.
/// </para>
/// </summary>
public List<PartialFailure> Failures
{
get { return this._failures; }
set { this._failures = value; }
}
// Check to see if Failures property is set
internal bool IsSetFailures()
{
return this._failures != null && this._failures.Count > 0;
}
}
} | 57 |
aws-sdk-net | aws | C# | /*
* 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 monitoring-2010-08-01.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.CloudWatch.Model
{
/// <summary>
/// Container for the parameters to the DeleteMetricStream operation.
/// Permanently deletes the metric stream that you specify.
/// </summary>
public partial class DeleteMetricStreamRequest : AmazonCloudWatchRequest
{
private string _name;
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The name of the metric stream to delete.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=255)]
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;
}
}
} | 59 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.