AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CloudFront

import "github.com/aws/aws-sdk-go/service/cloudfront"

type CloudFront struct { *client.Client }

CloudFront provides the API operation methods for making requests to Amazon CloudFront. See this package's package overview docs for details on the service.

CloudFront methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

CreateCloudFrontOriginAccessIdentity

func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error)

CreateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.

Creates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin access identity to require users to access your content using a CloudFront URL instead of the Amazon S3 URL. For more information about how to use origin access identities, see Serving Private Content through CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the Amazon CloudFront Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateCloudFrontOriginAccessIdentity for usage and error information.

Returned Error Codes:

  • ErrCodeOriginAccessIdentityAlreadyExists "CloudFrontOriginAccessIdentityAlreadyExists" If the CallerReference is a value you already sent in a previous request to create an identity but the content of the CloudFrontOriginAccessIdentityConfig is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists error.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeTooManyCloudFrontOriginAccessIdentities "TooManyCloudFrontOriginAccessIdentities" Processing your request would cause you to exceed the maximum number of origin access identities allowed.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity

Example

CloudFront CreateCloudFrontOriginAccessIdentity shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.CreateCloudFrontOriginAccessIdentityInput{} result, err := svc.CreateCloudFrontOriginAccessIdentity(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeOriginAccessIdentityAlreadyExists: fmt.Println(cloudfront.ErrCodeOriginAccessIdentityAlreadyExists, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeTooManyCloudFrontOriginAccessIdentities: fmt.Println(cloudfront.ErrCodeTooManyCloudFrontOriginAccessIdentities, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

CreateCloudFrontOriginAccessIdentityRequest

func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput)

CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateCloudFrontOriginAccessIdentity for more information on using the CreateCloudFrontOriginAccessIdentity API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateCloudFrontOriginAccessIdentityRequest method. req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity

See Also

For more information about using this API, see AWS API Documentation.

CreateCloudFrontOriginAccessIdentityWithContext

func (c *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *CreateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*CreateCloudFrontOriginAccessIdentityOutput, error)

CreateCloudFrontOriginAccessIdentityWithContext is the same as CreateCloudFrontOriginAccessIdentity with the addition of the ability to pass a context and additional request options.

See CreateCloudFrontOriginAccessIdentity for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateDistribution

func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error)

CreateDistribution API operation for Amazon CloudFront.

Creates a new web distribution. You create a CloudFront distribution to tell CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery. Send a POST request to the /CloudFront API version/distribution/distribution ID resource.

When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using UpdateDistribution, follow the steps included in the documentation to get the current configuration and then make your updates. This helps to make sure that you include all of the required fields. To view a summary, see Required Fields for Create Distribution and Update Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) in the Amazon CloudFront Developer Guide.

If you are using Adobe Flash Media Server's RTMP protocol, you set up a different kind of CloudFront distribution. For more information, see CreateStreamingDistribution.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"

  • ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" The caller reference you attempted to create the distribution with is associated with another distribution.

  • ErrCodeInvalidOrigin "InvalidOrigin" The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

  • ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" The origin access identity is not valid or doesn't exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" Your request contains more trusted signers than are allowed per distribution.

  • ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" One or more of your trusted signers don't exist.

  • ErrCodeInvalidViewerCertificate "InvalidViewerCertificate"

  • ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion"

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" Your request contains more CNAMEs than are allowed per distribution.

  • ErrCodeTooManyDistributions "TooManyDistributions" Processing your request would cause you to exceed the maximum number of distributions allowed.

  • ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" The default root object file name is too big or contains an invalid character.

  • ErrCodeInvalidRelativePath "InvalidRelativePath" The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

  • ErrCodeInvalidErrorCode "InvalidErrorCode"

  • ErrCodeInvalidResponseCode "InvalidResponseCode"

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the RequiredProtocols element from your distribution configuration.

  • ErrCodeNoSuchOrigin "NoSuchOrigin" No origin exists with the specified Origin Id.

  • ErrCodeTooManyOrigins "TooManyOrigins" You cannot create more origins for the distribution.

  • ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" Processing your request would cause you to exceed the maximum number of origin groups allowed.

  • ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" You cannot create more cache behaviors for the distribution.

  • ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" Your request contains more cookie names in the whitelist than are allowed per cache behavior.

  • ErrCodeInvalidForwardCookies "InvalidForwardCookies" Your request contains forward cookies option which doesn't match with the expectation for the whitelisted list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.

  • ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues"

  • ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin"

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeTooManyCertificates "TooManyCertificates" You cannot create anymore custom SSL/TLS certificates.

  • ErrCodeInvalidLocationCode "InvalidLocationCode"

  • ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter"

  • ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).

  • ErrCodeInvalidTTLOrder "InvalidTTLOrder"

  • ErrCodeInvalidWebACLId "InvalidWebACLId"

  • ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders"

  • ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters"

  • ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters"

  • ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.

  • ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" Your request contains more Lambda function associations than are allowed per distribution.

  • ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" The specified Lambda function association is invalid.

  • ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout"

  • ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout"

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

  • ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" The specified configuration for field-level encryption can't be associated with the specified cache behavior.

  • ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" The maximum number of distributions have been associated with the specified configuration for field-level encryption.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution

Example

CloudFront CreateDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.CreateDistributionInput{} result, err := svc.CreateDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeCNAMEAlreadyExists: fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error()) case cloudfront.ErrCodeDistributionAlreadyExists: fmt.Println(cloudfront.ErrCodeDistributionAlreadyExists, aerr.Error()) case cloudfront.ErrCodeInvalidOrigin: fmt.Println(cloudfront.ErrCodeInvalidOrigin, aerr.Error()) case cloudfront.ErrCodeInvalidOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeTooManyTrustedSigners: fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error()) case cloudfront.ErrCodeTrustedSignerDoesNotExist: fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error()) case cloudfront.ErrCodeInvalidViewerCertificate: fmt.Println(cloudfront.ErrCodeInvalidViewerCertificate, aerr.Error()) case cloudfront.ErrCodeInvalidMinimumProtocolVersion: fmt.Println(cloudfront.ErrCodeInvalidMinimumProtocolVersion, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeTooManyDistributionCNAMEs: fmt.Println(cloudfront.ErrCodeTooManyDistributionCNAMEs, aerr.Error()) case cloudfront.ErrCodeTooManyDistributions: fmt.Println(cloudfront.ErrCodeTooManyDistributions, aerr.Error()) case cloudfront.ErrCodeInvalidDefaultRootObject: fmt.Println(cloudfront.ErrCodeInvalidDefaultRootObject, aerr.Error()) case cloudfront.ErrCodeInvalidRelativePath: fmt.Println(cloudfront.ErrCodeInvalidRelativePath, aerr.Error()) case cloudfront.ErrCodeInvalidErrorCode: fmt.Println(cloudfront.ErrCodeInvalidErrorCode, aerr.Error()) case cloudfront.ErrCodeInvalidResponseCode: fmt.Println(cloudfront.ErrCodeInvalidResponseCode, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidRequiredProtocol: fmt.Println(cloudfront.ErrCodeInvalidRequiredProtocol, aerr.Error()) case cloudfront.ErrCodeNoSuchOrigin: fmt.Println(cloudfront.ErrCodeNoSuchOrigin, aerr.Error()) case cloudfront.ErrCodeTooManyOrigins: fmt.Println(cloudfront.ErrCodeTooManyOrigins, aerr.Error()) case cloudfront.ErrCodeTooManyCacheBehaviors: fmt.Println(cloudfront.ErrCodeTooManyCacheBehaviors, aerr.Error()) case cloudfront.ErrCodeTooManyCookieNamesInWhiteList: fmt.Println(cloudfront.ErrCodeTooManyCookieNamesInWhiteList, aerr.Error()) case cloudfront.ErrCodeInvalidForwardCookies: fmt.Println(cloudfront.ErrCodeInvalidForwardCookies, aerr.Error()) case cloudfront.ErrCodeTooManyHeadersInForwardedValues: fmt.Println(cloudfront.ErrCodeTooManyHeadersInForwardedValues, aerr.Error()) case cloudfront.ErrCodeInvalidHeadersForS3Origin: fmt.Println(cloudfront.ErrCodeInvalidHeadersForS3Origin, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) case cloudfront.ErrCodeTooManyCertificates: fmt.Println(cloudfront.ErrCodeTooManyCertificates, aerr.Error()) case cloudfront.ErrCodeInvalidLocationCode: fmt.Println(cloudfront.ErrCodeInvalidLocationCode, aerr.Error()) case cloudfront.ErrCodeInvalidGeoRestrictionParameter: fmt.Println(cloudfront.ErrCodeInvalidGeoRestrictionParameter, aerr.Error()) case cloudfront.ErrCodeInvalidProtocolSettings: fmt.Println(cloudfront.ErrCodeInvalidProtocolSettings, aerr.Error()) case cloudfront.ErrCodeInvalidTTLOrder: fmt.Println(cloudfront.ErrCodeInvalidTTLOrder, aerr.Error()) case cloudfront.ErrCodeInvalidWebACLId: fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error()) case cloudfront.ErrCodeTooManyOriginCustomHeaders: fmt.Println(cloudfront.ErrCodeTooManyOriginCustomHeaders, aerr.Error()) case cloudfront.ErrCodeTooManyQueryStringParameters: fmt.Println(cloudfront.ErrCodeTooManyQueryStringParameters, aerr.Error()) case cloudfront.ErrCodeInvalidQueryStringParameters: fmt.Println(cloudfront.ErrCodeInvalidQueryStringParameters, aerr.Error()) case cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations: fmt.Println(cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations, aerr.Error()) case cloudfront.ErrCodeTooManyLambdaFunctionAssociations: fmt.Println(cloudfront.ErrCodeTooManyLambdaFunctionAssociations, aerr.Error()) case cloudfront.ErrCodeInvalidLambdaFunctionAssociation: fmt.Println(cloudfront.ErrCodeInvalidLambdaFunctionAssociation, aerr.Error()) case cloudfront.ErrCodeInvalidOriginReadTimeout: fmt.Println(cloudfront.ErrCodeInvalidOriginReadTimeout, aerr.Error()) case cloudfront.ErrCodeInvalidOriginKeepaliveTimeout: fmt.Println(cloudfront.ErrCodeInvalidOriginKeepaliveTimeout, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

CreateDistributionRequest

func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput)

CreateDistributionRequest generates a "aws/request.Request" representing the client's request for the CreateDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateDistribution for more information on using the CreateDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateDistributionRequest method. req, resp := client.CreateDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution

See Also

For more information about using this API, see AWS API Documentation.

CreateDistributionWithContext

func (c *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error)

CreateDistributionWithContext is the same as CreateDistribution with the addition of the ability to pass a context and additional request options.

See CreateDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateDistributionWithTags

func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error)

CreateDistributionWithTags API operation for Amazon CloudFront.

Create a new distribution with tags.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateDistributionWithTags for usage and error information.

Returned Error Codes:

  • ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"

  • ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" The caller reference you attempted to create the distribution with is associated with another distribution.

  • ErrCodeInvalidOrigin "InvalidOrigin" The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

  • ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" The origin access identity is not valid or doesn't exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" Your request contains more trusted signers than are allowed per distribution.

  • ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" One or more of your trusted signers don't exist.

  • ErrCodeInvalidViewerCertificate "InvalidViewerCertificate"

  • ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion"

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" Your request contains more CNAMEs than are allowed per distribution.

  • ErrCodeTooManyDistributions "TooManyDistributions" Processing your request would cause you to exceed the maximum number of distributions allowed.

  • ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" The default root object file name is too big or contains an invalid character.

  • ErrCodeInvalidRelativePath "InvalidRelativePath" The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

  • ErrCodeInvalidErrorCode "InvalidErrorCode"

  • ErrCodeInvalidResponseCode "InvalidResponseCode"

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the RequiredProtocols element from your distribution configuration.

  • ErrCodeNoSuchOrigin "NoSuchOrigin" No origin exists with the specified Origin Id.

  • ErrCodeTooManyOrigins "TooManyOrigins" You cannot create more origins for the distribution.

  • ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" Processing your request would cause you to exceed the maximum number of origin groups allowed.

  • ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" You cannot create more cache behaviors for the distribution.

  • ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" Your request contains more cookie names in the whitelist than are allowed per cache behavior.

  • ErrCodeInvalidForwardCookies "InvalidForwardCookies" Your request contains forward cookies option which doesn't match with the expectation for the whitelisted list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.

  • ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues"

  • ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin"

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeTooManyCertificates "TooManyCertificates" You cannot create anymore custom SSL/TLS certificates.

  • ErrCodeInvalidLocationCode "InvalidLocationCode"

  • ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter"

  • ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).

  • ErrCodeInvalidTTLOrder "InvalidTTLOrder"

  • ErrCodeInvalidWebACLId "InvalidWebACLId"

  • ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders"

  • ErrCodeInvalidTagging "InvalidTagging"

  • ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters"

  • ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters"

  • ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.

  • ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" Your request contains more Lambda function associations than are allowed per distribution.

  • ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" The specified Lambda function association is invalid.

  • ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout"

  • ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout"

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

  • ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" The specified configuration for field-level encryption can't be associated with the specified cache behavior.

  • ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" The maximum number of distributions have been associated with the specified configuration for field-level encryption.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags

Example

CloudFront CreateDistributionWithTags shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.CreateDistributionWithTagsInput{} result, err := svc.CreateDistributionWithTags(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeCNAMEAlreadyExists: fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error()) case cloudfront.ErrCodeDistributionAlreadyExists: fmt.Println(cloudfront.ErrCodeDistributionAlreadyExists, aerr.Error()) case cloudfront.ErrCodeInvalidOrigin: fmt.Println(cloudfront.ErrCodeInvalidOrigin, aerr.Error()) case cloudfront.ErrCodeInvalidOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeTooManyTrustedSigners: fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error()) case cloudfront.ErrCodeTrustedSignerDoesNotExist: fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error()) case cloudfront.ErrCodeInvalidViewerCertificate: fmt.Println(cloudfront.ErrCodeInvalidViewerCertificate, aerr.Error()) case cloudfront.ErrCodeInvalidMinimumProtocolVersion: fmt.Println(cloudfront.ErrCodeInvalidMinimumProtocolVersion, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeTooManyDistributionCNAMEs: fmt.Println(cloudfront.ErrCodeTooManyDistributionCNAMEs, aerr.Error()) case cloudfront.ErrCodeTooManyDistributions: fmt.Println(cloudfront.ErrCodeTooManyDistributions, aerr.Error()) case cloudfront.ErrCodeInvalidDefaultRootObject: fmt.Println(cloudfront.ErrCodeInvalidDefaultRootObject, aerr.Error()) case cloudfront.ErrCodeInvalidRelativePath: fmt.Println(cloudfront.ErrCodeInvalidRelativePath, aerr.Error()) case cloudfront.ErrCodeInvalidErrorCode: fmt.Println(cloudfront.ErrCodeInvalidErrorCode, aerr.Error()) case cloudfront.ErrCodeInvalidResponseCode: fmt.Println(cloudfront.ErrCodeInvalidResponseCode, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidRequiredProtocol: fmt.Println(cloudfront.ErrCodeInvalidRequiredProtocol, aerr.Error()) case cloudfront.ErrCodeNoSuchOrigin: fmt.Println(cloudfront.ErrCodeNoSuchOrigin, aerr.Error()) case cloudfront.ErrCodeTooManyOrigins: fmt.Println(cloudfront.ErrCodeTooManyOrigins, aerr.Error()) case cloudfront.ErrCodeTooManyCacheBehaviors: fmt.Println(cloudfront.ErrCodeTooManyCacheBehaviors, aerr.Error()) case cloudfront.ErrCodeTooManyCookieNamesInWhiteList: fmt.Println(cloudfront.ErrCodeTooManyCookieNamesInWhiteList, aerr.Error()) case cloudfront.ErrCodeInvalidForwardCookies: fmt.Println(cloudfront.ErrCodeInvalidForwardCookies, aerr.Error()) case cloudfront.ErrCodeTooManyHeadersInForwardedValues: fmt.Println(cloudfront.ErrCodeTooManyHeadersInForwardedValues, aerr.Error()) case cloudfront.ErrCodeInvalidHeadersForS3Origin: fmt.Println(cloudfront.ErrCodeInvalidHeadersForS3Origin, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) case cloudfront.ErrCodeTooManyCertificates: fmt.Println(cloudfront.ErrCodeTooManyCertificates, aerr.Error()) case cloudfront.ErrCodeInvalidLocationCode: fmt.Println(cloudfront.ErrCodeInvalidLocationCode, aerr.Error()) case cloudfront.ErrCodeInvalidGeoRestrictionParameter: fmt.Println(cloudfront.ErrCodeInvalidGeoRestrictionParameter, aerr.Error()) case cloudfront.ErrCodeInvalidProtocolSettings: fmt.Println(cloudfront.ErrCodeInvalidProtocolSettings, aerr.Error()) case cloudfront.ErrCodeInvalidTTLOrder: fmt.Println(cloudfront.ErrCodeInvalidTTLOrder, aerr.Error()) case cloudfront.ErrCodeInvalidWebACLId: fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error()) case cloudfront.ErrCodeTooManyOriginCustomHeaders: fmt.Println(cloudfront.ErrCodeTooManyOriginCustomHeaders, aerr.Error()) case cloudfront.ErrCodeInvalidTagging: fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error()) case cloudfront.ErrCodeTooManyQueryStringParameters: fmt.Println(cloudfront.ErrCodeTooManyQueryStringParameters, aerr.Error()) case cloudfront.ErrCodeInvalidQueryStringParameters: fmt.Println(cloudfront.ErrCodeInvalidQueryStringParameters, aerr.Error()) case cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations: fmt.Println(cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations, aerr.Error()) case cloudfront.ErrCodeTooManyLambdaFunctionAssociations: fmt.Println(cloudfront.ErrCodeTooManyLambdaFunctionAssociations, aerr.Error()) case cloudfront.ErrCodeInvalidLambdaFunctionAssociation: fmt.Println(cloudfront.ErrCodeInvalidLambdaFunctionAssociation, aerr.Error()) case cloudfront.ErrCodeInvalidOriginReadTimeout: fmt.Println(cloudfront.ErrCodeInvalidOriginReadTimeout, aerr.Error()) case cloudfront.ErrCodeInvalidOriginKeepaliveTimeout: fmt.Println(cloudfront.ErrCodeInvalidOriginKeepaliveTimeout, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

CreateDistributionWithTagsRequest

func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput)

CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the client's request for the CreateDistributionWithTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateDistributionWithTags for more information on using the CreateDistributionWithTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateDistributionWithTagsRequest method. req, resp := client.CreateDistributionWithTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags

See Also

For more information about using this API, see AWS API Documentation.

CreateDistributionWithTagsWithContext

func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, input *CreateDistributionWithTagsInput, opts ...request.Option) (*CreateDistributionWithTagsOutput, error)

CreateDistributionWithTagsWithContext is the same as CreateDistributionWithTags with the addition of the ability to pass a context and additional request options.

See CreateDistributionWithTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateFieldLevelEncryptionConfig

func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error)

CreateFieldLevelEncryptionConfig API operation for Amazon CloudFront.

Create a new field-level encryption configuration.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateFieldLevelEncryptionConfig for usage and error information.

Returned Error Codes:

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" The specified profile for field-level encryption doesn't exist.

  • ErrCodeFieldLevelEncryptionConfigAlreadyExists "FieldLevelEncryptionConfigAlreadyExists" The specified configuration for field-level encryption already exists.

  • ErrCodeTooManyFieldLevelEncryptionConfigs "TooManyFieldLevelEncryptionConfigs" The maximum number of configurations for field-level encryption have been created.

  • ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" The maximum number of query arg profiles for field-level encryption have been created.

  • ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" The maximum number of content type profiles for field-level encryption have been created.

  • ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" No profile specified for the field-level encryption query argument.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

CreateFieldLevelEncryptionConfigRequest

func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput)

CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateFieldLevelEncryptionConfig for more information on using the CreateFieldLevelEncryptionConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateFieldLevelEncryptionConfigRequest method. req, resp := client.CreateFieldLevelEncryptionConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

CreateFieldLevelEncryptionConfigWithContext

func (c *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionConfigInput, opts ...request.Option) (*CreateFieldLevelEncryptionConfigOutput, error)

CreateFieldLevelEncryptionConfigWithContext is the same as CreateFieldLevelEncryptionConfig with the addition of the ability to pass a context and additional request options.

See CreateFieldLevelEncryptionConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateFieldLevelEncryptionProfile

func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error)

CreateFieldLevelEncryptionProfile API operation for Amazon CloudFront.

Create a field-level encryption profile.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateFieldLevelEncryptionProfile for usage and error information.

Returned Error Codes:

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeNoSuchPublicKey "NoSuchPublicKey" The specified public key doesn't exist.

  • ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" The specified profile for field-level encryption already exists.

  • ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" The maximum size of a profile for field-level encryption was exceeded.

  • ErrCodeTooManyFieldLevelEncryptionProfiles "TooManyFieldLevelEncryptionProfiles" The maximum number of profiles for field-level encryption have been created.

  • ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" The maximum number of encryption entities for field-level encryption have been created.

  • ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" The maximum number of field patterns for field-level encryption have been created.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

CreateFieldLevelEncryptionProfileRequest

func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput)

CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateFieldLevelEncryptionProfile for more information on using the CreateFieldLevelEncryptionProfile API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateFieldLevelEncryptionProfileRequest method. req, resp := client.CreateFieldLevelEncryptionProfileRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

CreateFieldLevelEncryptionProfileWithContext

func (c *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionProfileInput, opts ...request.Option) (*CreateFieldLevelEncryptionProfileOutput, error)

CreateFieldLevelEncryptionProfileWithContext is the same as CreateFieldLevelEncryptionProfile with the addition of the ability to pass a context and additional request options.

See CreateFieldLevelEncryptionProfile for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateInvalidation

func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error)

CreateInvalidation API operation for Amazon CloudFront.

Create a new invalidation.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateInvalidation for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodeBatchTooLarge "BatchTooLarge"

  • ErrCodeTooManyInvalidationsInProgress "TooManyInvalidationsInProgress" You have exceeded the maximum number of allowable InProgress invalidation batch requests, or invalidation objects.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation

Example

CloudFront CreateInvalidation shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.CreateInvalidationInput{} result, err := svc.CreateInvalidation(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodeBatchTooLarge: fmt.Println(cloudfront.ErrCodeBatchTooLarge, aerr.Error()) case cloudfront.ErrCodeTooManyInvalidationsInProgress: fmt.Println(cloudfront.ErrCodeTooManyInvalidationsInProgress, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

CreateInvalidationRequest

func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput)

CreateInvalidationRequest generates a "aws/request.Request" representing the client's request for the CreateInvalidation operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateInvalidation for more information on using the CreateInvalidation API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateInvalidationRequest method. req, resp := client.CreateInvalidationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation

See Also

For more information about using this API, see AWS API Documentation.

CreateInvalidationWithContext

func (c *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *CreateInvalidationInput, opts ...request.Option) (*CreateInvalidationOutput, error)

CreateInvalidationWithContext is the same as CreateInvalidation with the addition of the ability to pass a context and additional request options.

See CreateInvalidation for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreatePublicKey

func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error)

CreatePublicKey API operation for Amazon CloudFront.

Add a new public key to CloudFront to use, for example, for field-level encryption. You can add a maximum of 10 public keys with one AWS account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreatePublicKey for usage and error information.

Returned Error Codes:

  • ErrCodePublicKeyAlreadyExists "PublicKeyAlreadyExists" The specified public key already exists.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeTooManyPublicKeys "TooManyPublicKeys" The maximum number of public keys for field-level encryption have been created. To create a new public key, delete one of the existing keys.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey

See Also

For more information about using this API, see AWS API Documentation.

CreatePublicKeyRequest

func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput)

CreatePublicKeyRequest generates a "aws/request.Request" representing the client's request for the CreatePublicKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreatePublicKey for more information on using the CreatePublicKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreatePublicKeyRequest method. req, resp := client.CreatePublicKeyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey

See Also

For more information about using this API, see AWS API Documentation.

CreatePublicKeyWithContext

func (c *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePublicKeyInput, opts ...request.Option) (*CreatePublicKeyOutput, error)

CreatePublicKeyWithContext is the same as CreatePublicKey with the addition of the ability to pass a context and additional request options.

See CreatePublicKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateStreamingDistribution

func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error)

CreateStreamingDistribution API operation for Amazon CloudFront.

Creates a new RMTP distribution. An RTMP distribution is similar to a web distribution, but an RTMP distribution streams media files using the Adobe Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.

To create a new web distribution, submit a POST request to the CloudFront API version/distribution resource. The request body must include a document with a StreamingDistributionConfig element. The response echoes the StreamingDistributionConfig element and returns other information about the RTMP distribution.

To get the status of your request, use the GET StreamingDistribution API action. When the value of Enabled is true and the value of Status is Deployed, your distribution is ready. A distribution usually deploys in less than 15 minutes.

For more information about web distributions, see Working with RTMP Distributions (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html) in the Amazon CloudFront Developer Guide.

Beginning with the 2012-05-05 version of the CloudFront API, we made substantial changes to the format of the XML document that you include in the request body when you create or update a web distribution or an RTMP distribution, and when you invalidate objects. With previous versions of the API, we discovered that it was too easy to accidentally delete one or more values for an element that accepts multiple values, for example, CNAMEs and trusted signers. Our changes for the 2012-05-05 release are intended to prevent these accidental deletions and to notify you when there's a mismatch between the number of values you say you're specifying in the Quantity element and the number of values specified.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateStreamingDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"

  • ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists"

  • ErrCodeInvalidOrigin "InvalidOrigin" The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

  • ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" The origin access identity is not valid or doesn't exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" Your request contains more trusted signers than are allowed per distribution.

  • ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" One or more of your trusted signers don't exist.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs"

  • ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions" Processing your request would cause you to exceed the maximum number of streaming distributions allowed.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution

Example

CloudFront CreateStreamingDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.CreateStreamingDistributionInput{} result, err := svc.CreateStreamingDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeCNAMEAlreadyExists: fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error()) case cloudfront.ErrCodeStreamingDistributionAlreadyExists: fmt.Println(cloudfront.ErrCodeStreamingDistributionAlreadyExists, aerr.Error()) case cloudfront.ErrCodeInvalidOrigin: fmt.Println(cloudfront.ErrCodeInvalidOrigin, aerr.Error()) case cloudfront.ErrCodeInvalidOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeTooManyTrustedSigners: fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error()) case cloudfront.ErrCodeTrustedSignerDoesNotExist: fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs: fmt.Println(cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs, aerr.Error()) case cloudfront.ErrCodeTooManyStreamingDistributions: fmt.Println(cloudfront.ErrCodeTooManyStreamingDistributions, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

CreateStreamingDistributionRequest

func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput)

CreateStreamingDistributionRequest generates a "aws/request.Request" representing the client's request for the CreateStreamingDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateStreamingDistribution for more information on using the CreateStreamingDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateStreamingDistributionRequest method. req, resp := client.CreateStreamingDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution

See Also

For more information about using this API, see AWS API Documentation.

CreateStreamingDistributionWithContext

func (c *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, input *CreateStreamingDistributionInput, opts ...request.Option) (*CreateStreamingDistributionOutput, error)

CreateStreamingDistributionWithContext is the same as CreateStreamingDistribution with the addition of the ability to pass a context and additional request options.

See CreateStreamingDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateStreamingDistributionWithTags

func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error)

CreateStreamingDistributionWithTags API operation for Amazon CloudFront.

Create a new streaming distribution with tags.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation CreateStreamingDistributionWithTags for usage and error information.

Returned Error Codes:

  • ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"

  • ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists"

  • ErrCodeInvalidOrigin "InvalidOrigin" The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

  • ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" The origin access identity is not valid or doesn't exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" Your request contains more trusted signers than are allowed per distribution.

  • ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" One or more of your trusted signers don't exist.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs"

  • ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions" Processing your request would cause you to exceed the maximum number of streaming distributions allowed.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeInvalidTagging "InvalidTagging"

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags

See Also

For more information about using this API, see AWS API Documentation.

CreateStreamingDistributionWithTagsRequest

func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput)

CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the client's request for the CreateStreamingDistributionWithTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateStreamingDistributionWithTags for more information on using the CreateStreamingDistributionWithTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateStreamingDistributionWithTagsRequest method. req, resp := client.CreateStreamingDistributionWithTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags

See Also

For more information about using this API, see AWS API Documentation.

CreateStreamingDistributionWithTagsWithContext

func (c *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Context, input *CreateStreamingDistributionWithTagsInput, opts ...request.Option) (*CreateStreamingDistributionWithTagsOutput, error)

CreateStreamingDistributionWithTagsWithContext is the same as CreateStreamingDistributionWithTags with the addition of the ability to pass a context and additional request options.

See CreateStreamingDistributionWithTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteCloudFrontOriginAccessIdentity

func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error)

DeleteCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.

Delete an origin access identity.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation DeleteCloudFrontOriginAccessIdentity for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" The specified origin access identity does not exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse"

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity

Example

CloudFront DeleteCloudFrontOriginAccessIdentity shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.DeleteCloudFrontOriginAccessIdentityInput{} result, err := svc.DeleteCloudFrontOriginAccessIdentity(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeInvalidIfMatchVersion: fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error()) case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodePreconditionFailed: fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error()) case cloudfront.ErrCodeOriginAccessIdentityInUse: fmt.Println(cloudfront.ErrCodeOriginAccessIdentityInUse, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

DeleteCloudFrontOriginAccessIdentityRequest

func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput)

DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteCloudFrontOriginAccessIdentity for more information on using the DeleteCloudFrontOriginAccessIdentity API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteCloudFrontOriginAccessIdentityRequest method. req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity

See Also

For more information about using this API, see AWS API Documentation.

DeleteCloudFrontOriginAccessIdentityWithContext

func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *DeleteCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*DeleteCloudFrontOriginAccessIdentityOutput, error)

DeleteCloudFrontOriginAccessIdentityWithContext is the same as DeleteCloudFrontOriginAccessIdentity with the addition of the ability to pass a context and additional request options.

See DeleteCloudFrontOriginAccessIdentity for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteDistribution

func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error)

DeleteDistribution API operation for Amazon CloudFront.

Delete a distribution.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation DeleteDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeDistributionNotDisabled "DistributionNotDisabled"

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution

Example

CloudFront DeleteDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.DeleteDistributionInput{} result, err := svc.DeleteDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeDistributionNotDisabled: fmt.Println(cloudfront.ErrCodeDistributionNotDisabled, aerr.Error()) case cloudfront.ErrCodeInvalidIfMatchVersion: fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error()) case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodePreconditionFailed: fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

DeleteDistributionRequest

func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput)

DeleteDistributionRequest generates a "aws/request.Request" representing the client's request for the DeleteDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDistribution for more information on using the DeleteDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDistributionRequest method. req, resp := client.DeleteDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution

See Also

For more information about using this API, see AWS API Documentation.

DeleteDistributionWithContext

func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *DeleteDistributionInput, opts ...request.Option) (*DeleteDistributionOutput, error)

DeleteDistributionWithContext is the same as DeleteDistribution with the addition of the ability to pass a context and additional request options.

See DeleteDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteFieldLevelEncryptionConfig

func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error)

DeleteFieldLevelEncryptionConfig API operation for Amazon CloudFront.

Remove a field-level encryption configuration.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation DeleteFieldLevelEncryptionConfig for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse" The specified configuration for field-level encryption is in use.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

DeleteFieldLevelEncryptionConfigRequest

func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput)

DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteFieldLevelEncryptionConfig for more information on using the DeleteFieldLevelEncryptionConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteFieldLevelEncryptionConfigRequest method. req, resp := client.DeleteFieldLevelEncryptionConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

DeleteFieldLevelEncryptionConfigWithContext

func (c *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionConfigInput, opts ...request.Option) (*DeleteFieldLevelEncryptionConfigOutput, error)

DeleteFieldLevelEncryptionConfigWithContext is the same as DeleteFieldLevelEncryptionConfig with the addition of the ability to pass a context and additional request options.

See DeleteFieldLevelEncryptionConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteFieldLevelEncryptionProfile

func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error)

DeleteFieldLevelEncryptionProfile API operation for Amazon CloudFront.

Remove a field-level encryption profile.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation DeleteFieldLevelEncryptionProfile for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" The specified profile for field-level encryption doesn't exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse" The specified profile for field-level encryption is in use.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

DeleteFieldLevelEncryptionProfileRequest

func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput)

DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteFieldLevelEncryptionProfile for more information on using the DeleteFieldLevelEncryptionProfile API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteFieldLevelEncryptionProfileRequest method. req, resp := client.DeleteFieldLevelEncryptionProfileRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

DeleteFieldLevelEncryptionProfileWithContext

func (c *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionProfileInput, opts ...request.Option) (*DeleteFieldLevelEncryptionProfileOutput, error)

DeleteFieldLevelEncryptionProfileWithContext is the same as DeleteFieldLevelEncryptionProfile with the addition of the ability to pass a context and additional request options.

See DeleteFieldLevelEncryptionProfile for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeletePublicKey

func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error)

DeletePublicKey API operation for Amazon CloudFront.

Remove a public key you previously added to CloudFront.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation DeletePublicKey for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodePublicKeyInUse "PublicKeyInUse" The specified public key is in use.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchPublicKey "NoSuchPublicKey" The specified public key doesn't exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey

See Also

For more information about using this API, see AWS API Documentation.

DeletePublicKeyRequest

func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput)

DeletePublicKeyRequest generates a "aws/request.Request" representing the client's request for the DeletePublicKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeletePublicKey for more information on using the DeletePublicKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeletePublicKeyRequest method. req, resp := client.DeletePublicKeyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey

See Also

For more information about using this API, see AWS API Documentation.

DeletePublicKeyWithContext

func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePublicKeyInput, opts ...request.Option) (*DeletePublicKeyOutput, error)

DeletePublicKeyWithContext is the same as DeletePublicKey with the addition of the ability to pass a context and additional request options.

See DeletePublicKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteStreamingDistribution

func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error)

DeleteStreamingDistribution API operation for Amazon CloudFront.

Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps.

To delete an RTMP distribution using the CloudFront API:

Disable the RTMP distribution.

Submit a GET Streaming Distribution Config request to get the current configuration and the Etag header for the distribution.

Update the XML document that was returned in the response to your GET Streaming Distribution Config request to change the value of Enabled to false.

Submit a PUT Streaming Distribution Config request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Then set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET Streaming Distribution Config request in Step 2.

Review the response to the PUT Streaming Distribution Config request to confirm that the distribution was successfully disabled.

Submit a GET Streaming Distribution Config request to confirm that your changes have propagated. When propagation is complete, the value of Status is Deployed.

Submit a DELETE Streaming Distribution request. Set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET Streaming Distribution Config request in Step 2.

Review the response to your DELETE Streaming Distribution request to confirm that the distribution was successfully deleted.

For information about deleting a distribution using the CloudFront console, see Deleting a Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) in the Amazon CloudFront Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation DeleteStreamingDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeStreamingDistributionNotDisabled "StreamingDistributionNotDisabled"

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" The specified streaming distribution does not exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution

Example

CloudFront DeleteStreamingDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.DeleteStreamingDistributionInput{} result, err := svc.DeleteStreamingDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeStreamingDistributionNotDisabled: fmt.Println(cloudfront.ErrCodeStreamingDistributionNotDisabled, aerr.Error()) case cloudfront.ErrCodeInvalidIfMatchVersion: fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error()) case cloudfront.ErrCodeNoSuchStreamingDistribution: fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error()) case cloudfront.ErrCodePreconditionFailed: fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

DeleteStreamingDistributionRequest

func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput)

DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the client's request for the DeleteStreamingDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteStreamingDistribution for more information on using the DeleteStreamingDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteStreamingDistributionRequest method. req, resp := client.DeleteStreamingDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution

See Also

For more information about using this API, see AWS API Documentation.

DeleteStreamingDistributionWithContext

func (c *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, input *DeleteStreamingDistributionInput, opts ...request.Option) (*DeleteStreamingDistributionOutput, error)

DeleteStreamingDistributionWithContext is the same as DeleteStreamingDistribution with the addition of the ability to pass a context and additional request options.

See DeleteStreamingDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetCloudFrontOriginAccessIdentity

func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error)

GetCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.

Get the information about an origin access identity.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetCloudFrontOriginAccessIdentity for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" The specified origin access identity does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity

Example

CloudFront GetCloudFrontOriginAccessIdentity shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetCloudFrontOriginAccessIdentityInput{} result, err := svc.GetCloudFrontOriginAccessIdentity(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetCloudFrontOriginAccessIdentityConfig

func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error)

GetCloudFrontOriginAccessIdentityConfig API operation for Amazon CloudFront.

Get the configuration information about an origin access identity.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetCloudFrontOriginAccessIdentityConfig for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" The specified origin access identity does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig

Example

CloudFront GetCloudFrontOriginAccessIdentityConfig shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetCloudFrontOriginAccessIdentityConfigInput{} result, err := svc.GetCloudFrontOriginAccessIdentityConfig(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetCloudFrontOriginAccessIdentityConfigRequest

func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput)

GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetCloudFrontOriginAccessIdentityConfig for more information on using the GetCloudFrontOriginAccessIdentityConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetCloudFrontOriginAccessIdentityConfigRequest method. req, resp := client.GetCloudFrontOriginAccessIdentityConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig

See Also

For more information about using this API, see AWS API Documentation.

GetCloudFrontOriginAccessIdentityConfigWithContext

func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityConfigInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityConfigOutput, error)

GetCloudFrontOriginAccessIdentityConfigWithContext is the same as GetCloudFrontOriginAccessIdentityConfig with the addition of the ability to pass a context and additional request options.

See GetCloudFrontOriginAccessIdentityConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetCloudFrontOriginAccessIdentityRequest

func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput)

GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetCloudFrontOriginAccessIdentity for more information on using the GetCloudFrontOriginAccessIdentity API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetCloudFrontOriginAccessIdentityRequest method. req, resp := client.GetCloudFrontOriginAccessIdentityRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity

See Also

For more information about using this API, see AWS API Documentation.

GetCloudFrontOriginAccessIdentityWithContext

func (c *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityOutput, error)

GetCloudFrontOriginAccessIdentityWithContext is the same as GetCloudFrontOriginAccessIdentity with the addition of the ability to pass a context and additional request options.

See GetCloudFrontOriginAccessIdentity for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetDistribution

func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error)

GetDistribution API operation for Amazon CloudFront.

Get the information about a distribution.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution

Example

CloudFront GetDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetDistributionInput{} result, err := svc.GetDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetDistributionConfig

func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error)

GetDistributionConfig API operation for Amazon CloudFront.

Get the configuration information about a distribution.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetDistributionConfig for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig

Example

CloudFront GetDistributionConfig shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetDistributionConfigInput{} result, err := svc.GetDistributionConfig(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetDistributionConfigRequest

func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput)

GetDistributionConfigRequest generates a "aws/request.Request" representing the client's request for the GetDistributionConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetDistributionConfig for more information on using the GetDistributionConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetDistributionConfigRequest method. req, resp := client.GetDistributionConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig

See Also

For more information about using this API, see AWS API Documentation.

GetDistributionConfigWithContext

func (c *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *GetDistributionConfigInput, opts ...request.Option) (*GetDistributionConfigOutput, error)

GetDistributionConfigWithContext is the same as GetDistributionConfig with the addition of the ability to pass a context and additional request options.

See GetDistributionConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetDistributionRequest

func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput)

GetDistributionRequest generates a "aws/request.Request" representing the client's request for the GetDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetDistribution for more information on using the GetDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetDistributionRequest method. req, resp := client.GetDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution

See Also

For more information about using this API, see AWS API Documentation.

GetDistributionWithContext

func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.Option) (*GetDistributionOutput, error)

GetDistributionWithContext is the same as GetDistribution with the addition of the ability to pass a context and additional request options.

See GetDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryption

func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error)

GetFieldLevelEncryption API operation for Amazon CloudFront.

Get the field-level encryption configuration information.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetFieldLevelEncryption for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionConfig

func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error)

GetFieldLevelEncryptionConfig API operation for Amazon CloudFront.

Get the field-level encryption configuration information.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetFieldLevelEncryptionConfig for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionConfigRequest

func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput)

GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the client's request for the GetFieldLevelEncryptionConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetFieldLevelEncryptionConfig for more information on using the GetFieldLevelEncryptionConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetFieldLevelEncryptionConfigRequest method. req, resp := client.GetFieldLevelEncryptionConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionConfigWithContext

func (c *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionConfigOutput, error)

GetFieldLevelEncryptionConfigWithContext is the same as GetFieldLevelEncryptionConfig with the addition of the ability to pass a context and additional request options.

See GetFieldLevelEncryptionConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionProfile

func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error)

GetFieldLevelEncryptionProfile API operation for Amazon CloudFront.

Get the field-level encryption profile information.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetFieldLevelEncryptionProfile for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" The specified profile for field-level encryption doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionProfileConfig

func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error)

GetFieldLevelEncryptionProfileConfig API operation for Amazon CloudFront.

Get the field-level encryption profile configuration information.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetFieldLevelEncryptionProfileConfig for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" The specified profile for field-level encryption doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionProfileConfigRequest

func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput)

GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetFieldLevelEncryptionProfileConfig for more information on using the GetFieldLevelEncryptionProfileConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetFieldLevelEncryptionProfileConfigRequest method. req, resp := client.GetFieldLevelEncryptionProfileConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionProfileConfigWithContext

func (c *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileConfigOutput, error)

GetFieldLevelEncryptionProfileConfigWithContext is the same as GetFieldLevelEncryptionProfileConfig with the addition of the ability to pass a context and additional request options.

See GetFieldLevelEncryptionProfileConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionProfileRequest

func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput)

GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the client's request for the GetFieldLevelEncryptionProfile operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetFieldLevelEncryptionProfile for more information on using the GetFieldLevelEncryptionProfile API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetFieldLevelEncryptionProfileRequest method. req, resp := client.GetFieldLevelEncryptionProfileRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionProfileWithContext

func (c *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileOutput, error)

GetFieldLevelEncryptionProfileWithContext is the same as GetFieldLevelEncryptionProfile with the addition of the ability to pass a context and additional request options.

See GetFieldLevelEncryptionProfile for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionRequest

func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput)

GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the client's request for the GetFieldLevelEncryption operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetFieldLevelEncryption for more information on using the GetFieldLevelEncryption API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetFieldLevelEncryptionRequest method. req, resp := client.GetFieldLevelEncryptionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption

See Also

For more information about using this API, see AWS API Documentation.

GetFieldLevelEncryptionWithContext

func (c *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input *GetFieldLevelEncryptionInput, opts ...request.Option) (*GetFieldLevelEncryptionOutput, error)

GetFieldLevelEncryptionWithContext is the same as GetFieldLevelEncryption with the addition of the ability to pass a context and additional request options.

See GetFieldLevelEncryption for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetInvalidation

func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error)

GetInvalidation API operation for Amazon CloudFront.

Get the information about an invalidation.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetInvalidation for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchInvalidation "NoSuchInvalidation" The specified invalidation does not exist.

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation

Example

CloudFront GetInvalidation shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetInvalidationInput{} result, err := svc.GetInvalidation(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchInvalidation: fmt.Println(cloudfront.ErrCodeNoSuchInvalidation, aerr.Error()) case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetInvalidationRequest

func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput)

GetInvalidationRequest generates a "aws/request.Request" representing the client's request for the GetInvalidation operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetInvalidation for more information on using the GetInvalidation API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetInvalidationRequest method. req, resp := client.GetInvalidationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation

See Also

For more information about using this API, see AWS API Documentation.

GetInvalidationWithContext

func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.Option) (*GetInvalidationOutput, error)

GetInvalidationWithContext is the same as GetInvalidation with the addition of the ability to pass a context and additional request options.

See GetInvalidation for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetPublicKey

func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)

GetPublicKey API operation for Amazon CloudFront.

Get the public key information.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetPublicKey for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeNoSuchPublicKey "NoSuchPublicKey" The specified public key doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey

See Also

For more information about using this API, see AWS API Documentation.

GetPublicKeyConfig

func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error)

GetPublicKeyConfig API operation for Amazon CloudFront.

Return public key configuration informaation

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetPublicKeyConfig for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeNoSuchPublicKey "NoSuchPublicKey" The specified public key doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig

See Also

For more information about using this API, see AWS API Documentation.

GetPublicKeyConfigRequest

func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput)

GetPublicKeyConfigRequest generates a "aws/request.Request" representing the client's request for the GetPublicKeyConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetPublicKeyConfig for more information on using the GetPublicKeyConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetPublicKeyConfigRequest method. req, resp := client.GetPublicKeyConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig

See Also

For more information about using this API, see AWS API Documentation.

GetPublicKeyConfigWithContext

func (c *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPublicKeyConfigInput, opts ...request.Option) (*GetPublicKeyConfigOutput, error)

GetPublicKeyConfigWithContext is the same as GetPublicKeyConfig with the addition of the ability to pass a context and additional request options.

See GetPublicKeyConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetPublicKeyRequest

func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput)

GetPublicKeyRequest generates a "aws/request.Request" representing the client's request for the GetPublicKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetPublicKey for more information on using the GetPublicKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetPublicKeyRequest method. req, resp := client.GetPublicKeyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey

See Also

For more information about using this API, see AWS API Documentation.

GetPublicKeyWithContext

func (c *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKeyInput, opts ...request.Option) (*GetPublicKeyOutput, error)

GetPublicKeyWithContext is the same as GetPublicKey with the addition of the ability to pass a context and additional request options.

See GetPublicKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetStreamingDistribution

func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error)

GetStreamingDistribution API operation for Amazon CloudFront.

Gets information about a specified RTMP distribution, including the distribution configuration.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetStreamingDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" The specified streaming distribution does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution

Example

CloudFront GetStreamingDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetStreamingDistributionInput{} result, err := svc.GetStreamingDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchStreamingDistribution: fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetStreamingDistributionConfig

func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error)

GetStreamingDistributionConfig API operation for Amazon CloudFront.

Get the configuration information about a streaming distribution.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation GetStreamingDistributionConfig for usage and error information.

Returned Error Codes:

  • ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" The specified streaming distribution does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig

Example

CloudFront GetStreamingDistributionConfig shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.GetStreamingDistributionConfigInput{} result, err := svc.GetStreamingDistributionConfig(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeNoSuchStreamingDistribution: fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

GetStreamingDistributionConfigRequest

func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput)

GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the client's request for the GetStreamingDistributionConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetStreamingDistributionConfig for more information on using the GetStreamingDistributionConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetStreamingDistributionConfigRequest method. req, resp := client.GetStreamingDistributionConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig

See Also

For more information about using this API, see AWS API Documentation.

GetStreamingDistributionConfigWithContext

func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, input *GetStreamingDistributionConfigInput, opts ...request.Option) (*GetStreamingDistributionConfigOutput, error)

GetStreamingDistributionConfigWithContext is the same as GetStreamingDistributionConfig with the addition of the ability to pass a context and additional request options.

See GetStreamingDistributionConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetStreamingDistributionRequest

func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput)

GetStreamingDistributionRequest generates a "aws/request.Request" representing the client's request for the GetStreamingDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetStreamingDistribution for more information on using the GetStreamingDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetStreamingDistributionRequest method. req, resp := client.GetStreamingDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution

See Also

For more information about using this API, see AWS API Documentation.

GetStreamingDistributionWithContext

func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.Option) (*GetStreamingDistributionOutput, error)

GetStreamingDistributionWithContext is the same as GetStreamingDistribution with the addition of the ability to pass a context and additional request options.

See GetStreamingDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListCloudFrontOriginAccessIdentities

func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error)

ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront.

Lists origin access identities.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListCloudFrontOriginAccessIdentities for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities

Example

CloudFront ListCloudFrontOriginAccessIdentities shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.ListCloudFrontOriginAccessIdentitiesInput{} result, err := svc.ListCloudFrontOriginAccessIdentities(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

ListCloudFrontOriginAccessIdentitiesPages

func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error

ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation. pageNum := 0 err := client.ListCloudFrontOriginAccessIdentitiesPages(params, func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListCloudFrontOriginAccessIdentitiesPagesWithContext

func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, opts ...request.Option) error

ListCloudFrontOriginAccessIdentitiesPagesWithContext same as ListCloudFrontOriginAccessIdentitiesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListCloudFrontOriginAccessIdentitiesRequest

func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput)

ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListCloudFrontOriginAccessIdentities for more information on using the ListCloudFrontOriginAccessIdentities API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method. req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities

See Also

For more information about using this API, see AWS API Documentation.

ListCloudFrontOriginAccessIdentitiesWithContext

func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, opts ...request.Option) (*ListCloudFrontOriginAccessIdentitiesOutput, error)

ListCloudFrontOriginAccessIdentitiesWithContext is the same as ListCloudFrontOriginAccessIdentities with the addition of the ability to pass a context and additional request options.

See ListCloudFrontOriginAccessIdentities for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListDistributions

func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error)

ListDistributions API operation for Amazon CloudFront.

List distributions.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListDistributions for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions

Example

CloudFront ListDistributions shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.ListDistributionsInput{} result, err := svc.ListDistributions(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsByWebACLId

func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error)

ListDistributionsByWebACLId API operation for Amazon CloudFront.

List the distributions that are associated with a specified AWS WAF web ACL.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListDistributionsByWebACLId for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidWebACLId "InvalidWebACLId"

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId

Example

CloudFront ListDistributionsByWebACLId shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.ListDistributionsByWebACLIdInput{} result, err := svc.ListDistributionsByWebACLId(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidWebACLId: fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsByWebACLIdRequest

func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput)

ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the client's request for the ListDistributionsByWebACLId operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListDistributionsByWebACLId for more information on using the ListDistributionsByWebACLId API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListDistributionsByWebACLIdRequest method. req, resp := client.ListDistributionsByWebACLIdRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsByWebACLIdWithContext

func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, input *ListDistributionsByWebACLIdInput, opts ...request.Option) (*ListDistributionsByWebACLIdOutput, error)

ListDistributionsByWebACLIdWithContext is the same as ListDistributionsByWebACLId with the addition of the ability to pass a context and additional request options.

See ListDistributionsByWebACLId for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsPages

func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool) error

ListDistributionsPages iterates over the pages of a ListDistributions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListDistributions method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListDistributions operation. pageNum := 0 err := client.ListDistributionsPages(params, func(page *ListDistributionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsPagesWithContext

func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool, opts ...request.Option) error

ListDistributionsPagesWithContext same as ListDistributionsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsRequest

func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput)

ListDistributionsRequest generates a "aws/request.Request" representing the client's request for the ListDistributions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListDistributions for more information on using the ListDistributions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListDistributionsRequest method. req, resp := client.ListDistributionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions

See Also

For more information about using this API, see AWS API Documentation.

ListDistributionsWithContext

func (c *CloudFront) ListDistributionsWithContext(ctx aws.Context, input *ListDistributionsInput, opts ...request.Option) (*ListDistributionsOutput, error)

ListDistributionsWithContext is the same as ListDistributions with the addition of the ability to pass a context and additional request options.

See ListDistributions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListFieldLevelEncryptionConfigs

func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error)

ListFieldLevelEncryptionConfigs API operation for Amazon CloudFront.

List all field-level encryption configurations that have been created in CloudFront for this account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListFieldLevelEncryptionConfigs for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs

See Also

For more information about using this API, see AWS API Documentation.

ListFieldLevelEncryptionConfigsRequest

func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput)

ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListFieldLevelEncryptionConfigs for more information on using the ListFieldLevelEncryptionConfigs API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListFieldLevelEncryptionConfigsRequest method. req, resp := client.ListFieldLevelEncryptionConfigsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs

See Also

For more information about using this API, see AWS API Documentation.

ListFieldLevelEncryptionConfigsWithContext

func (c *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, input *ListFieldLevelEncryptionConfigsInput, opts ...request.Option) (*ListFieldLevelEncryptionConfigsOutput, error)

ListFieldLevelEncryptionConfigsWithContext is the same as ListFieldLevelEncryptionConfigs with the addition of the ability to pass a context and additional request options.

See ListFieldLevelEncryptionConfigs for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListFieldLevelEncryptionProfiles

func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error)

ListFieldLevelEncryptionProfiles API operation for Amazon CloudFront.

Request a list of field-level encryption profiles that have been created in CloudFront for this account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListFieldLevelEncryptionProfiles for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles

See Also

For more information about using this API, see AWS API Documentation.

ListFieldLevelEncryptionProfilesRequest

func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput)

ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListFieldLevelEncryptionProfiles for more information on using the ListFieldLevelEncryptionProfiles API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListFieldLevelEncryptionProfilesRequest method. req, resp := client.ListFieldLevelEncryptionProfilesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles

See Also

For more information about using this API, see AWS API Documentation.

ListFieldLevelEncryptionProfilesWithContext

func (c *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context, input *ListFieldLevelEncryptionProfilesInput, opts ...request.Option) (*ListFieldLevelEncryptionProfilesOutput, error)

ListFieldLevelEncryptionProfilesWithContext is the same as ListFieldLevelEncryptionProfiles with the addition of the ability to pass a context and additional request options.

See ListFieldLevelEncryptionProfiles for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListInvalidations

func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error)

ListInvalidations API operation for Amazon CloudFront.

Lists invalidation batches.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListInvalidations for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodeAccessDenied "AccessDenied" Access denied.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations

Example

CloudFront ListInvalidations shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.ListInvalidationsInput{} result, err := svc.ListInvalidations(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

ListInvalidationsPages

func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool) error

ListInvalidationsPages iterates over the pages of a ListInvalidations operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListInvalidations method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListInvalidations operation. pageNum := 0 err := client.ListInvalidationsPages(params, func(page *ListInvalidationsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListInvalidationsPagesWithContext

func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool, opts ...request.Option) error

ListInvalidationsPagesWithContext same as ListInvalidationsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListInvalidationsRequest

func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput)

ListInvalidationsRequest generates a "aws/request.Request" representing the client's request for the ListInvalidations operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListInvalidations for more information on using the ListInvalidations API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListInvalidationsRequest method. req, resp := client.ListInvalidationsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations

See Also

For more information about using this API, see AWS API Documentation.

ListInvalidationsWithContext

func (c *CloudFront) ListInvalidationsWithContext(ctx aws.Context, input *ListInvalidationsInput, opts ...request.Option) (*ListInvalidationsOutput, error)

ListInvalidationsWithContext is the same as ListInvalidations with the addition of the ability to pass a context and additional request options.

See ListInvalidations for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListPublicKeys

func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error)

ListPublicKeys API operation for Amazon CloudFront.

List all public keys that have been added to CloudFront for this account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListPublicKeys for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys

See Also

For more information about using this API, see AWS API Documentation.

ListPublicKeysRequest

func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput)

ListPublicKeysRequest generates a "aws/request.Request" representing the client's request for the ListPublicKeys operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListPublicKeys for more information on using the ListPublicKeys API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListPublicKeysRequest method. req, resp := client.ListPublicKeysRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys

See Also

For more information about using this API, see AWS API Documentation.

ListPublicKeysWithContext

func (c *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error)

ListPublicKeysWithContext is the same as ListPublicKeys with the addition of the ability to pass a context and additional request options.

See ListPublicKeys for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListStreamingDistributions

func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error)

ListStreamingDistributions API operation for Amazon CloudFront.

List streaming distributions.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListStreamingDistributions for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions

Example

CloudFront ListStreamingDistributions shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.ListStreamingDistributionsInput{} result, err := svc.ListStreamingDistributions(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

ListStreamingDistributionsPages

func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool) error

ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListStreamingDistributions method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListStreamingDistributions operation. pageNum := 0 err := client.ListStreamingDistributionsPages(params, func(page *ListStreamingDistributionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListStreamingDistributionsPagesWithContext

func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool, opts ...request.Option) error

ListStreamingDistributionsPagesWithContext same as ListStreamingDistributionsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListStreamingDistributionsRequest

func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput)

ListStreamingDistributionsRequest generates a "aws/request.Request" representing the client's request for the ListStreamingDistributions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListStreamingDistributions for more information on using the ListStreamingDistributions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListStreamingDistributionsRequest method. req, resp := client.ListStreamingDistributionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions

See Also

For more information about using this API, see AWS API Documentation.

ListStreamingDistributionsWithContext

func (c *CloudFront) ListStreamingDistributionsWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, opts ...request.Option) (*ListStreamingDistributionsOutput, error)

ListStreamingDistributionsWithContext is the same as ListStreamingDistributions with the addition of the ability to pass a context and additional request options.

See ListStreamingDistributions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTagsForResource

func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error)

ListTagsForResource API operation for Amazon CloudFront.

List tags for a CloudFront resource.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation ListTagsForResource for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidTagging "InvalidTagging"

  • ErrCodeNoSuchResource "NoSuchResource"

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource

Example

CloudFront ListTagsForResource shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.ListTagsForResourceInput{} result, err := svc.ListTagsForResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidTagging: fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error()) case cloudfront.ErrCodeNoSuchResource: fmt.Println(cloudfront.ErrCodeNoSuchResource, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

ListTagsForResourceRequest

func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput)

ListTagsForResourceRequest generates a "aws/request.Request" representing the client's request for the ListTagsForResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListTagsForResource for more information on using the ListTagsForResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListTagsForResourceRequest method. req, resp := client.ListTagsForResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource

See Also

For more information about using this API, see AWS API Documentation.

ListTagsForResourceWithContext

func (c *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error)

ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of the ability to pass a context and additional request options.

See ListTagsForResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TagResource

func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error)

TagResource API operation for Amazon CloudFront.

Add tags to a CloudFront resource.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation TagResource for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidTagging "InvalidTagging"

  • ErrCodeNoSuchResource "NoSuchResource"

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource

Example

CloudFront TagResource shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.TagResourceInput{} result, err := svc.TagResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidTagging: fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error()) case cloudfront.ErrCodeNoSuchResource: fmt.Println(cloudfront.ErrCodeNoSuchResource, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

TagResourceRequest

func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput)

TagResourceRequest generates a "aws/request.Request" representing the client's request for the TagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TagResource for more information on using the TagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TagResourceRequest method. req, resp := client.TagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource

See Also

For more information about using this API, see AWS API Documentation.

TagResourceWithContext

func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error)

TagResourceWithContext is the same as TagResource with the addition of the ability to pass a context and additional request options.

See TagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UntagResource

func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error)

UntagResource API operation for Amazon CloudFront.

Remove tags from a CloudFront resource.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UntagResource for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidTagging "InvalidTagging"

  • ErrCodeNoSuchResource "NoSuchResource"

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource

Example

CloudFront UntagResource shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.UntagResourceInput{} result, err := svc.UntagResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidTagging: fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error()) case cloudfront.ErrCodeNoSuchResource: fmt.Println(cloudfront.ErrCodeNoSuchResource, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

UntagResourceRequest

func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput)

UntagResourceRequest generates a "aws/request.Request" representing the client's request for the UntagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UntagResource for more information on using the UntagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UntagResourceRequest method. req, resp := client.UntagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource

See Also

For more information about using this API, see AWS API Documentation.

UntagResourceWithContext

func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error)

UntagResourceWithContext is the same as UntagResource with the addition of the ability to pass a context and additional request options.

See UntagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateCloudFrontOriginAccessIdentity

func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error)

UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.

Update an origin access identity.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UpdateCloudFrontOriginAccessIdentity for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeIllegalUpdate "IllegalUpdate" Origin and CallerReference cannot be updated.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" The specified origin access identity does not exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity

Example

CloudFront UpdateCloudFrontOriginAccessIdentity shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.UpdateCloudFrontOriginAccessIdentityInput{} result, err := svc.UpdateCloudFrontOriginAccessIdentity(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeIllegalUpdate: fmt.Println(cloudfront.ErrCodeIllegalUpdate, aerr.Error()) case cloudfront.ErrCodeInvalidIfMatchVersion: fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodePreconditionFailed: fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

UpdateCloudFrontOriginAccessIdentityRequest

func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput)

UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateCloudFrontOriginAccessIdentity for more information on using the UpdateCloudFrontOriginAccessIdentity API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method. req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity

See Also

For more information about using this API, see AWS API Documentation.

UpdateCloudFrontOriginAccessIdentityWithContext

func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *UpdateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*UpdateCloudFrontOriginAccessIdentityOutput, error)

UpdateCloudFrontOriginAccessIdentityWithContext is the same as UpdateCloudFrontOriginAccessIdentity with the addition of the ability to pass a context and additional request options.

See UpdateCloudFrontOriginAccessIdentity for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateDistribution

func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error)

UpdateDistribution API operation for Amazon CloudFront.

Updates the configuration for a web distribution.

When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using this API action, follow the steps here to get the current configuration and then make your updates, to make sure that you include all of the required fields. To view a summary, see Required Fields for Create Distribution and Update Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) in the Amazon CloudFront Developer Guide.

The update process includes getting the current distribution configuration, updating the XML document that is returned to make your changes, and then submitting an UpdateDistribution request to make the updates.

For information about updating a distribution using the CloudFront console instead, see Creating a Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) in the Amazon CloudFront Developer Guide.

To update a web distribution using the CloudFront API

Submit a GetDistributionConfig request to get the current configuration and an Etag header for the distribution.

If you update the distribution again, you must get a new Etag header.

Update the XML document that was returned in the response to your GetDistributionConfig request to include your changes.

When you edit the XML file, be aware of the following:

You must strip out the ETag parameter that is returned.

Additional fields are required when you update a distribution. There may be fields included in the XML file for features that you haven't configured for your distribution. This is expected and required to successfully update the distribution.

You can't change the value of CallerReference. If you try to change this value, CloudFront returns an IllegalUpdate error.

The new configuration replaces the existing configuration; the values that you specify in an UpdateDistribution request are not merged into your existing configuration. When you add, delete, or replace values in an element that allows multiple values (for example, CNAME), you must specify all of the values that you want to appear in the updated distribution. In addition, you must update the corresponding Quantity element.

Submit an UpdateDistribution request to update the configuration for your distribution:

In the request body, include the XML document that you updated in Step 2. The request body must include an XML document with a DistributionConfig element.

Set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GetDistributionConfig request in Step 1.

Review the response to the UpdateDistribution request to confirm that the configuration was successfully updated.

Optional: Submit a GetDistribution request to confirm that your changes have propagated. When propagation is complete, the value of Status is Deployed.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UpdateDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"

  • ErrCodeIllegalUpdate "IllegalUpdate" Origin and CallerReference cannot be updated.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeNoSuchDistribution "NoSuchDistribution" The specified distribution does not exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" Your request contains more CNAMEs than are allowed per distribution.

  • ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" The default root object file name is too big or contains an invalid character.

  • ErrCodeInvalidRelativePath "InvalidRelativePath" The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

  • ErrCodeInvalidErrorCode "InvalidErrorCode"

  • ErrCodeInvalidResponseCode "InvalidResponseCode"

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" The origin access identity is not valid or doesn't exist.

  • ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" Your request contains more trusted signers than are allowed per distribution.

  • ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" One or more of your trusted signers don't exist.

  • ErrCodeInvalidViewerCertificate "InvalidViewerCertificate"

  • ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion"

  • ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the RequiredProtocols element from your distribution configuration.

  • ErrCodeNoSuchOrigin "NoSuchOrigin" No origin exists with the specified Origin Id.

  • ErrCodeTooManyOrigins "TooManyOrigins" You cannot create more origins for the distribution.

  • ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" Processing your request would cause you to exceed the maximum number of origin groups allowed.

  • ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" You cannot create more cache behaviors for the distribution.

  • ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" Your request contains more cookie names in the whitelist than are allowed per cache behavior.

  • ErrCodeInvalidForwardCookies "InvalidForwardCookies" Your request contains forward cookies option which doesn't match with the expectation for the whitelisted list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.

  • ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues"

  • ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin"

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeTooManyCertificates "TooManyCertificates" You cannot create anymore custom SSL/TLS certificates.

  • ErrCodeInvalidLocationCode "InvalidLocationCode"

  • ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter"

  • ErrCodeInvalidTTLOrder "InvalidTTLOrder"

  • ErrCodeInvalidWebACLId "InvalidWebACLId"

  • ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders"

  • ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters"

  • ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters"

  • ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" Processing your request would cause the maximum number of distributions with Lambda function associations per owner to be exceeded.

  • ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" Your request contains more Lambda function associations than are allowed per distribution.

  • ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" The specified Lambda function association is invalid.

  • ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout"

  • ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout"

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

  • ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" The specified configuration for field-level encryption can't be associated with the specified cache behavior.

  • ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" The maximum number of distributions have been associated with the specified configuration for field-level encryption.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution

Example

CloudFront UpdateDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.UpdateDistributionInput{} result, err := svc.UpdateDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeCNAMEAlreadyExists: fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error()) case cloudfront.ErrCodeIllegalUpdate: fmt.Println(cloudfront.ErrCodeIllegalUpdate, aerr.Error()) case cloudfront.ErrCodeInvalidIfMatchVersion: fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeNoSuchDistribution: fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error()) case cloudfront.ErrCodePreconditionFailed: fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error()) case cloudfront.ErrCodeTooManyDistributionCNAMEs: fmt.Println(cloudfront.ErrCodeTooManyDistributionCNAMEs, aerr.Error()) case cloudfront.ErrCodeInvalidDefaultRootObject: fmt.Println(cloudfront.ErrCodeInvalidDefaultRootObject, aerr.Error()) case cloudfront.ErrCodeInvalidRelativePath: fmt.Println(cloudfront.ErrCodeInvalidRelativePath, aerr.Error()) case cloudfront.ErrCodeInvalidErrorCode: fmt.Println(cloudfront.ErrCodeInvalidErrorCode, aerr.Error()) case cloudfront.ErrCodeInvalidResponseCode: fmt.Println(cloudfront.ErrCodeInvalidResponseCode, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeTooManyTrustedSigners: fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error()) case cloudfront.ErrCodeTrustedSignerDoesNotExist: fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error()) case cloudfront.ErrCodeInvalidViewerCertificate: fmt.Println(cloudfront.ErrCodeInvalidViewerCertificate, aerr.Error()) case cloudfront.ErrCodeInvalidMinimumProtocolVersion: fmt.Println(cloudfront.ErrCodeInvalidMinimumProtocolVersion, aerr.Error()) case cloudfront.ErrCodeInvalidRequiredProtocol: fmt.Println(cloudfront.ErrCodeInvalidRequiredProtocol, aerr.Error()) case cloudfront.ErrCodeNoSuchOrigin: fmt.Println(cloudfront.ErrCodeNoSuchOrigin, aerr.Error()) case cloudfront.ErrCodeTooManyOrigins: fmt.Println(cloudfront.ErrCodeTooManyOrigins, aerr.Error()) case cloudfront.ErrCodeTooManyCacheBehaviors: fmt.Println(cloudfront.ErrCodeTooManyCacheBehaviors, aerr.Error()) case cloudfront.ErrCodeTooManyCookieNamesInWhiteList: fmt.Println(cloudfront.ErrCodeTooManyCookieNamesInWhiteList, aerr.Error()) case cloudfront.ErrCodeInvalidForwardCookies: fmt.Println(cloudfront.ErrCodeInvalidForwardCookies, aerr.Error()) case cloudfront.ErrCodeTooManyHeadersInForwardedValues: fmt.Println(cloudfront.ErrCodeTooManyHeadersInForwardedValues, aerr.Error()) case cloudfront.ErrCodeInvalidHeadersForS3Origin: fmt.Println(cloudfront.ErrCodeInvalidHeadersForS3Origin, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) case cloudfront.ErrCodeTooManyCertificates: fmt.Println(cloudfront.ErrCodeTooManyCertificates, aerr.Error()) case cloudfront.ErrCodeInvalidLocationCode: fmt.Println(cloudfront.ErrCodeInvalidLocationCode, aerr.Error()) case cloudfront.ErrCodeInvalidGeoRestrictionParameter: fmt.Println(cloudfront.ErrCodeInvalidGeoRestrictionParameter, aerr.Error()) case cloudfront.ErrCodeInvalidTTLOrder: fmt.Println(cloudfront.ErrCodeInvalidTTLOrder, aerr.Error()) case cloudfront.ErrCodeInvalidWebACLId: fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error()) case cloudfront.ErrCodeTooManyOriginCustomHeaders: fmt.Println(cloudfront.ErrCodeTooManyOriginCustomHeaders, aerr.Error()) case cloudfront.ErrCodeTooManyQueryStringParameters: fmt.Println(cloudfront.ErrCodeTooManyQueryStringParameters, aerr.Error()) case cloudfront.ErrCodeInvalidQueryStringParameters: fmt.Println(cloudfront.ErrCodeInvalidQueryStringParameters, aerr.Error()) case cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations: fmt.Println(cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations, aerr.Error()) case cloudfront.ErrCodeTooManyLambdaFunctionAssociations: fmt.Println(cloudfront.ErrCodeTooManyLambdaFunctionAssociations, aerr.Error()) case cloudfront.ErrCodeInvalidLambdaFunctionAssociation: fmt.Println(cloudfront.ErrCodeInvalidLambdaFunctionAssociation, aerr.Error()) case cloudfront.ErrCodeInvalidOriginReadTimeout: fmt.Println(cloudfront.ErrCodeInvalidOriginReadTimeout, aerr.Error()) case cloudfront.ErrCodeInvalidOriginKeepaliveTimeout: fmt.Println(cloudfront.ErrCodeInvalidOriginKeepaliveTimeout, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

UpdateDistributionRequest

func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput)

UpdateDistributionRequest generates a "aws/request.Request" representing the client's request for the UpdateDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateDistribution for more information on using the UpdateDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateDistributionRequest method. req, resp := client.UpdateDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution

See Also

For more information about using this API, see AWS API Documentation.

UpdateDistributionWithContext

func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *UpdateDistributionInput, opts ...request.Option) (*UpdateDistributionOutput, error)

UpdateDistributionWithContext is the same as UpdateDistribution with the addition of the ability to pass a context and additional request options.

See UpdateDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateFieldLevelEncryptionConfig

func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error)

UpdateFieldLevelEncryptionConfig API operation for Amazon CloudFront.

Update a field-level encryption configuration.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UpdateFieldLevelEncryptionConfig for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeIllegalUpdate "IllegalUpdate" Origin and CallerReference cannot be updated.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" The specified profile for field-level encryption doesn't exist.

  • ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" The specified configuration for field-level encryption doesn't exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" The maximum number of query arg profiles for field-level encryption have been created.

  • ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" The maximum number of content type profiles for field-level encryption have been created.

  • ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" No profile specified for the field-level encryption query argument.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

UpdateFieldLevelEncryptionConfigRequest

func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput)

UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateFieldLevelEncryptionConfig for more information on using the UpdateFieldLevelEncryptionConfig API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateFieldLevelEncryptionConfigRequest method. req, resp := client.UpdateFieldLevelEncryptionConfigRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig

See Also

For more information about using this API, see AWS API Documentation.

UpdateFieldLevelEncryptionConfigWithContext

func (c *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionConfigInput, opts ...request.Option) (*UpdateFieldLevelEncryptionConfigOutput, error)

UpdateFieldLevelEncryptionConfigWithContext is the same as UpdateFieldLevelEncryptionConfig with the addition of the ability to pass a context and additional request options.

See UpdateFieldLevelEncryptionConfig for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateFieldLevelEncryptionProfile

func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error)

UpdateFieldLevelEncryptionProfile API operation for Amazon CloudFront.

Update a field-level encryption profile.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UpdateFieldLevelEncryptionProfile for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" The specified profile for field-level encryption already exists.

  • ErrCodeIllegalUpdate "IllegalUpdate" Origin and CallerReference cannot be updated.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeNoSuchPublicKey "NoSuchPublicKey" The specified public key doesn't exist.

  • ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" The specified profile for field-level encryption doesn't exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" The maximum size of a profile for field-level encryption was exceeded.

  • ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" The maximum number of encryption entities for field-level encryption have been created.

  • ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" The maximum number of field patterns for field-level encryption have been created.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

UpdateFieldLevelEncryptionProfileRequest

func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput)

UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateFieldLevelEncryptionProfile for more information on using the UpdateFieldLevelEncryptionProfile API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateFieldLevelEncryptionProfileRequest method. req, resp := client.UpdateFieldLevelEncryptionProfileRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile

See Also

For more information about using this API, see AWS API Documentation.

UpdateFieldLevelEncryptionProfileWithContext

func (c *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionProfileInput, opts ...request.Option) (*UpdateFieldLevelEncryptionProfileOutput, error)

UpdateFieldLevelEncryptionProfileWithContext is the same as UpdateFieldLevelEncryptionProfile with the addition of the ability to pass a context and additional request options.

See UpdateFieldLevelEncryptionProfile for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdatePublicKey

func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error)

UpdatePublicKey API operation for Amazon CloudFront.

Update public key information. Note that the only value you can change is the comment.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UpdatePublicKey for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeCannotChangeImmutablePublicKeyFields "CannotChangeImmutablePublicKeyFields" You can't change the value of a public key.

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeIllegalUpdate "IllegalUpdate" Origin and CallerReference cannot be updated.

  • ErrCodeNoSuchPublicKey "NoSuchPublicKey" The specified public key doesn't exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey

See Also

For more information about using this API, see AWS API Documentation.

UpdatePublicKeyRequest

func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput)

UpdatePublicKeyRequest generates a "aws/request.Request" representing the client's request for the UpdatePublicKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdatePublicKey for more information on using the UpdatePublicKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdatePublicKeyRequest method. req, resp := client.UpdatePublicKeyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey

See Also

For more information about using this API, see AWS API Documentation.

UpdatePublicKeyWithContext

func (c *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePublicKeyInput, opts ...request.Option) (*UpdatePublicKeyOutput, error)

UpdatePublicKeyWithContext is the same as UpdatePublicKey with the addition of the ability to pass a context and additional request options.

See UpdatePublicKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateStreamingDistribution

func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error)

UpdateStreamingDistribution API operation for Amazon CloudFront.

Update a streaming distribution.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudFront's API operation UpdateStreamingDistribution for usage and error information.

Returned Error Codes:

  • ErrCodeAccessDenied "AccessDenied" Access denied.

  • ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"

  • ErrCodeIllegalUpdate "IllegalUpdate" Origin and CallerReference cannot be updated.

  • ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" The If-Match version is missing or not valid for the distribution.

  • ErrCodeMissingBody "MissingBody" This operation requires a body. Ensure that the body is present and the Content-Type header is set.

  • ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" The specified streaming distribution does not exist.

  • ErrCodePreconditionFailed "PreconditionFailed" The precondition given in one or more of the request-header fields evaluated to false.

  • ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs"

  • ErrCodeInvalidArgument "InvalidArgument" The argument is invalid.

  • ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" The origin access identity is not valid or doesn't exist.

  • ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" Your request contains more trusted signers than are allowed per distribution.

  • ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" One or more of your trusted signers don't exist.

  • ErrCodeInconsistentQuantities "InconsistentQuantities" The value of Quantity and the size of Items don't match.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution

Example

CloudFront UpdateStreamingDistribution shared00
{ svc := cloudfront.New(session.New()) input := &cloudfront.UpdateStreamingDistributionInput{} result, err := svc.UpdateStreamingDistribution(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case cloudfront.ErrCodeAccessDenied: fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error()) case cloudfront.ErrCodeCNAMEAlreadyExists: fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error()) case cloudfront.ErrCodeIllegalUpdate: fmt.Println(cloudfront.ErrCodeIllegalUpdate, aerr.Error()) case cloudfront.ErrCodeInvalidIfMatchVersion: fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error()) case cloudfront.ErrCodeMissingBody: fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error()) case cloudfront.ErrCodeNoSuchStreamingDistribution: fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error()) case cloudfront.ErrCodePreconditionFailed: fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error()) case cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs: fmt.Println(cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs, aerr.Error()) case cloudfront.ErrCodeInvalidArgument: fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error()) case cloudfront.ErrCodeInvalidOriginAccessIdentity: fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error()) case cloudfront.ErrCodeTooManyTrustedSigners: fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error()) case cloudfront.ErrCodeTrustedSignerDoesNotExist: fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error()) case cloudfront.ErrCodeInconsistentQuantities: fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

See Also

For more information about using this API, see AWS API Documentation.

UpdateStreamingDistributionRequest

func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput)

UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the client's request for the UpdateStreamingDistribution operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateStreamingDistribution for more information on using the UpdateStreamingDistribution API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateStreamingDistributionRequest method. req, resp := client.UpdateStreamingDistributionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution

See Also

For more information about using this API, see AWS API Documentation.

UpdateStreamingDistributionWithContext

func (c *CloudFront) UpdateStreamingDistributionWithContext(ctx aws.Context, input *UpdateStreamingDistributionInput, opts ...request.Option) (*UpdateStreamingDistributionOutput, error)

UpdateStreamingDistributionWithContext is the same as UpdateStreamingDistribution with the addition of the ability to pass a context and additional request options.

See UpdateStreamingDistribution for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

WaitUntilDistributionDeployed

func (c *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error

WaitUntilDistributionDeployed uses the CloudFront API operation GetDistribution to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

WaitUntilDistributionDeployedWithContext

func (c *CloudFront) WaitUntilDistributionDeployedWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.WaiterOption) error

WaitUntilDistributionDeployedWithContext is an extended version of WaitUntilDistributionDeployed. With the support for passing in a context and options to configure the Waiter and the underlying request options.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

WaitUntilInvalidationCompleted

func (c *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error

WaitUntilInvalidationCompleted uses the CloudFront API operation GetInvalidation to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

WaitUntilInvalidationCompletedWithContext

func (c *CloudFront) WaitUntilInvalidationCompletedWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.WaiterOption) error

WaitUntilInvalidationCompletedWithContext is an extended version of WaitUntilInvalidationCompleted. With the support for passing in a context and options to configure the Waiter and the underlying request options.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

WaitUntilStreamingDistributionDeployed

func (c *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error

WaitUntilStreamingDistributionDeployed uses the CloudFront API operation GetStreamingDistribution to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

WaitUntilStreamingDistributionDeployedWithContext

func (c *CloudFront) WaitUntilStreamingDistributionDeployedWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.WaiterOption) error

WaitUntilStreamingDistributionDeployedWithContext is an extended version of WaitUntilStreamingDistributionDeployed. With the support for passing in a context and options to configure the Waiter and the underlying request options.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

On this page: