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.
This is the response object from the CreateFunction operation.
Namespace: Amazon.CloudFront.Model
Assembly: AWSSDK.CloudFront.dll
Version: 3.x.y.z
public class CreateFunctionResponse : AmazonWebServiceResponse
The CreateFunctionResponse type exposes the following members
Name | Description | |
---|---|---|
CreateFunctionResponse() |
Name | Type | Description | |
---|---|---|---|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ETag | System.String |
Gets and sets the property ETag. The version identifier for the current version of the CloudFront function. |
|
FunctionSummary | Amazon.CloudFront.Model.FunctionSummary |
Gets and sets the property FunctionSummary. Contains configuration information and metadata about a CloudFront function. |
|
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
Location | System.String |
Gets and sets the property Location. The URL of the CloudFront function. Use the URL to manage the function with the CloudFront API. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
Use the following command to create a function.
var client = new AmazonCloudFrontClient(); var response = client.CreateFunction(new CreateFunctionRequest { FunctionCode = new MemoryStream(function-code.js), FunctionConfig = new FunctionConfig { Comment = "my-function-comment", KeyValueStoreAssociations = new KeyValueStoreAssociations { Items = new List<KeyValueStoreAssociation> { new KeyValueStoreAssociation { KeyValueStoreARN = "arn:aws:cloudfront::123456789012:key-value-store/54947df8-0e9e-4471-a2f9-9af509fb5889" } }, Quantity = 1 }, Runtime = "cloudfront-js-2.0" }, Name = "my-function-name" }); string eTag = response.ETag; FunctionSummary functionSummary = response.FunctionSummary; string location = response.Location;
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5