Skip to content

/AWS1/CL_FNT=>COPYDISTRIBUTION()

About CopyDistribution

Creates a staging distribution using the configuration of the provided primary distribution. A staging distribution is a copy of an existing distribution (called the primary distribution) that you can use in a continuous deployment workflow.

After you create a staging distribution, you can use UpdateDistribution to modify the staging distribution's configuration. Then you can use CreateContinuousDeploymentPolicy to incrementally move traffic to the staging distribution.

This API operation requires the following IAM permissions:

Method Signature

IMPORTING

Required arguments:

IV_PRIMARYDISTRIBUTIONID TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING

The identifier of the primary distribution whose configuration you are copying. To get a distribution ID, use ListDistributions.

IV_CALLERREFERENCE TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING

A value that uniquely identifies a request to create a resource. This helps to prevent CloudFront from creating a duplicate resource if you accidentally resubmit an identical request.

Optional arguments:

IV_STAGING TYPE /AWS1/FNTBOOLEAN /AWS1/FNTBOOLEAN

The type of distribution that your primary distribution will be copied to. The only valid value is True, indicating that you are copying to a staging distribution.

IV_IFMATCH TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING

The version identifier of the primary distribution whose configuration you are copying. This is the ETag value returned in the response to GetDistribution and GetDistributionConfig.

IV_ENABLED TYPE /AWS1/FNTBOOLEAN /AWS1/FNTBOOLEAN

A Boolean flag to specify the state of the staging distribution when it's created. When you set this value to True, the staging distribution is enabled. When you set this value to False, the staging distribution is disabled.

If you omit this field, the default value is True.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_FNTCOPYDISTRIBUTIONRS /AWS1/CL_FNTCOPYDISTRIBUTIONRS