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.

This is the response object from the CreateFunction operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.CloudFront.Model.CreateFunctionResponse

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

Syntax

C#
public class CreateFunctionResponse : AmazonWebServiceResponse

The CreateFunctionResponse type exposes the following members

Constructors

NameDescription
Public Method CreateFunctionResponse()

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ETag System.String

Gets and sets the property ETag.

The version identifier for the current version of the CloudFront function.

Public Property FunctionSummary Amazon.CloudFront.Model.FunctionSummary

Gets and sets the property FunctionSummary.

Contains configuration information and metadata about a CloudFront function.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property 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.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.

Examples

Use the following command to create a function.

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;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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