AWS SDK Version 3 for .NET
API Reference

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

Deletes the resource-based policy attached to the CloudTrail channel.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to DeleteResourcePolicyAsync.

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

Syntax

C#
public virtual DeleteResourcePolicyResponse DeleteResourcePolicy(
         DeleteResourcePolicyRequest request
)

Parameters

request
Type: Amazon.CloudTrail.Model.DeleteResourcePolicyRequest

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

Return Value


The response from the DeleteResourcePolicy service method, as returned by CloudTrail.

Exceptions

ExceptionCondition
OperationNotPermittedException This exception is thrown when the requested operation is not permitted.
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: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
ResourceNotFoundException This exception is thrown when the specified resource is not found.
ResourcePolicyNotFoundException This exception is thrown when the specified resource policy is not found.
ResourceTypeNotSupportedException This exception is thrown when the specified resource type is not supported by CloudTrail.
UnsupportedOperationException This exception is thrown when the requested operation is not supported.

Version Information

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

See Also