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.
Specifies the key value store resource to add to your account. In your account, the
key value store names must be unique. You can also import key value store data in
JSON format from an S3 bucket by providing a valid ImportSource
that you own.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateKeyValueStoreAsync.
Namespace: Amazon.CloudFront
Assembly: AWSSDK.CloudFront.dll
Version: 3.x.y.z
public virtual CreateKeyValueStoreResponse CreateKeyValueStore( CreateKeyValueStoreRequest request )
Container for the necessary parameters to execute the CreateKeyValueStore service method.
Exception | Condition |
---|---|
AccessDeniedException | Access denied. |
EntityAlreadyExistsException | The key value store entity already exists. You must provide a unique key value store entity. |
EntityLimitExceededException | The key value store entity limit has been exceeded. |
EntitySizeLimitExceededException | The key value store entity size limit was exceeded. |
InvalidArgumentException | An argument is invalid. |
UnsupportedOperationException | This operation is not supported in this region. |
Use the following command to create a KeyValueStore.
var client = new AmazonCloudFrontClient(); var response = client.CreateKeyValueStore(new CreateKeyValueStoreRequest { Comment = "my-key-valuestore-comment", ImportSource = new ImportSource { SourceARN = "arn:aws:s3:::my-bucket/validJSON.json", SourceType = "S3" }, Name = "my-keyvaluestore-name" }); string eTag = response.ETag; KeyValueStore keyValueStore = response.KeyValueStore; string location = response.Location;
.NET Framework:
Supported in: 4.5, 4.0, 3.5