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.
Represents an exact match condition in an S3 POST policy.
Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public class ExactMatchCondition : S3PostCondition
The ExactMatchCondition type exposes the following members
Name | Description | |
---|---|---|
![]() |
ExactMatchCondition(string, string) |
Initializes a new instance of the Amazon.S3.Model.ExactMatchCondition class. |
Name | Type | Description | |
---|---|---|---|
![]() |
ExpectedValue | System.String |
Gets the exact value that the form field must have. |
![]() |
FieldName | System.String |
Gets the name of the form field that must match the expected value. |
Name | Description | |
---|---|---|
![]() |
WriteToJsonWriter(Utf8JsonWriter) |
Writes this condition to the specified JSON writer as an object with the field name and expected value. |
// Require uploads to have public-read ACL var condition = new ExactMatchCondition("acl", "public-read"); // Require specific content type var contentTypeCondition = new ExactMatchCondition("Content-Type", "image/jpeg");
An exact match condition requires that a form field in the POST request has exactly the specified value. This is useful for enforcing specific values for metadata, ACL settings, storage class, etc.
Common use cases include:
new ExactMatchCondition("bucket", "my-uploads")
new ExactMatchCondition("acl", "public-read")
new ExactMatchCondition("x-amz-meta-category", "photos")
.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