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.

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.

Note:

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

Syntax

C#
public virtual CreateKeyValueStoreResponse CreateKeyValueStore(
         CreateKeyValueStoreRequest request
)

Parameters

request
Type: Amazon.CloudFront.Model.CreateKeyValueStoreRequest

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

Return Value


The response from the CreateKeyValueStore service method, as returned by CloudFront.

Exceptions

ExceptionCondition
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.

Examples

Use the following command to create a KeyValueStore.

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;

            

Version Information

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

See Also