AWS SDK Version 4 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.

Base abstract class for all S3 POST policy conditions.

Inheritance Hierarchy

System.Object
  Amazon.S3.Model.S3PostCondition

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

Syntax

C#
public abstract class S3PostCondition

The S3PostCondition type exposes the following members

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.7.2 or higher.

NameDescription
Public Method Static Method ContentLengthRange(Int64, Int64)

Creates a content length range condition that restricts file size to the specified byte range.

Public Method Static Method ExactMatch(string, string)

Creates an exact match condition that requires a form field to have exactly the specified value.

Public Method Static Method StartsWith(string, string)

Creates a starts-with condition that requires a form field value to begin with the specified prefix.

Public Method WriteToJsonWriter(Utf8JsonWriter)

Writes the condition to the specified JSON writer in the appropriate format for the S3 POST policy.

Remarks

S3 POST policy conditions are used to restrict what can be uploaded through a presigned POST request.

S3 supports three types of conditions in POST policies:

Exact Match - Field must exactly match a specified valueStarts With - Field value must start with a specified prefixContent Length Range - File size must be within specified byte limits

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer