1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZoneCacheVariants
Cloudflare v6.0.0 published on Monday, Apr 14, 2025 by Pulumi

cloudflare.ZoneCacheVariants

Explore with Pulumi AI

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  exampleZoneCacheVariants:
    type: cloudflare:ZoneCacheVariants
    name: example_zone_cache_variants
    properties:
      zoneId: 023e105f4ecef8ad9ca31a8372d0c353
      value:
        avif:
          - image/webp
          - image/jpeg
        bmp:
          - image/webp
          - image/jpeg
        gif:
          - image/webp
          - image/jpeg
        jp2:
          - image/webp
          - image/avif
        jpeg:
          - image/webp
          - image/avif
        jpg:
          - image/webp
          - image/avif
        jpg2:
          - image/webp
          - image/avif
        png:
          - image/webp
          - image/avif
        tif:
          - image/webp
          - image/avif
        tiff:
          - image/webp
          - image/avif
        webp:
          - image/jpeg
          - image/avif
Copy

Create ZoneCacheVariants Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ZoneCacheVariants(name: string, args: ZoneCacheVariantsArgs, opts?: CustomResourceOptions);
@overload
def ZoneCacheVariants(resource_name: str,
                      args: ZoneCacheVariantsArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def ZoneCacheVariants(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      value: Optional[ZoneCacheVariantsValueArgs] = None,
                      zone_id: Optional[str] = None)
func NewZoneCacheVariants(ctx *Context, name string, args ZoneCacheVariantsArgs, opts ...ResourceOption) (*ZoneCacheVariants, error)
public ZoneCacheVariants(string name, ZoneCacheVariantsArgs args, CustomResourceOptions? opts = null)
public ZoneCacheVariants(String name, ZoneCacheVariantsArgs args)
public ZoneCacheVariants(String name, ZoneCacheVariantsArgs args, CustomResourceOptions options)
type: cloudflare:ZoneCacheVariants
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ZoneCacheVariantsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ZoneCacheVariantsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ZoneCacheVariantsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ZoneCacheVariantsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ZoneCacheVariantsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var zoneCacheVariantsResource = new Cloudflare.ZoneCacheVariants("zoneCacheVariantsResource", new()
{
    Value = new Cloudflare.Inputs.ZoneCacheVariantsValueArgs
    {
        Avifs = new[]
        {
            "string",
        },
        Bmps = new[]
        {
            "string",
        },
        Gifs = new[]
        {
            "string",
        },
        Jp2s = new[]
        {
            "string",
        },
        Jpegs = new[]
        {
            "string",
        },
        Jpg2s = new[]
        {
            "string",
        },
        Jpgs = new[]
        {
            "string",
        },
        Pngs = new[]
        {
            "string",
        },
        Tiffs = new[]
        {
            "string",
        },
        Tifs = new[]
        {
            "string",
        },
        Webps = new[]
        {
            "string",
        },
    },
    ZoneId = "string",
});
Copy
example, err := cloudflare.NewZoneCacheVariants(ctx, "zoneCacheVariantsResource", &cloudflare.ZoneCacheVariantsArgs{
	Value: &cloudflare.ZoneCacheVariantsValueArgs{
		Avifs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Bmps: pulumi.StringArray{
			pulumi.String("string"),
		},
		Gifs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Jp2s: pulumi.StringArray{
			pulumi.String("string"),
		},
		Jpegs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Jpg2s: pulumi.StringArray{
			pulumi.String("string"),
		},
		Jpgs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Pngs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Tiffs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Tifs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Webps: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	ZoneId: pulumi.String("string"),
})
Copy
var zoneCacheVariantsResource = new ZoneCacheVariants("zoneCacheVariantsResource", ZoneCacheVariantsArgs.builder()
    .value(ZoneCacheVariantsValueArgs.builder()
        .avifs("string")
        .bmps("string")
        .gifs("string")
        .jp2s("string")
        .jpegs("string")
        .jpg2s("string")
        .jpgs("string")
        .pngs("string")
        .tiffs("string")
        .tifs("string")
        .webps("string")
        .build())
    .zoneId("string")
    .build());
Copy
zone_cache_variants_resource = cloudflare.ZoneCacheVariants("zoneCacheVariantsResource",
    value={
        "avifs": ["string"],
        "bmps": ["string"],
        "gifs": ["string"],
        "jp2s": ["string"],
        "jpegs": ["string"],
        "jpg2s": ["string"],
        "jpgs": ["string"],
        "pngs": ["string"],
        "tiffs": ["string"],
        "tifs": ["string"],
        "webps": ["string"],
    },
    zone_id="string")
Copy
const zoneCacheVariantsResource = new cloudflare.ZoneCacheVariants("zoneCacheVariantsResource", {
    value: {
        avifs: ["string"],
        bmps: ["string"],
        gifs: ["string"],
        jp2s: ["string"],
        jpegs: ["string"],
        jpg2s: ["string"],
        jpgs: ["string"],
        pngs: ["string"],
        tiffs: ["string"],
        tifs: ["string"],
        webps: ["string"],
    },
    zoneId: "string",
});
Copy
type: cloudflare:ZoneCacheVariants
properties:
    value:
        avifs:
            - string
        bmps:
            - string
        gifs:
            - string
        jp2s:
            - string
        jpegs:
            - string
        jpg2s:
            - string
        jpgs:
            - string
        pngs:
            - string
        tiffs:
            - string
        tifs:
            - string
        webps:
            - string
    zoneId: string
Copy

ZoneCacheVariants Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ZoneCacheVariants resource accepts the following input properties:

Value This property is required. ZoneCacheVariantsValue
Value of the zone setting.
ZoneId This property is required. string
Identifier
Value This property is required. ZoneCacheVariantsValueArgs
Value of the zone setting.
ZoneId This property is required. string
Identifier
value This property is required. ZoneCacheVariantsValue
Value of the zone setting.
zoneId This property is required. String
Identifier
value This property is required. ZoneCacheVariantsValue
Value of the zone setting.
zoneId This property is required. string
Identifier
value This property is required. ZoneCacheVariantsValueArgs
Value of the zone setting.
zone_id This property is required. str
Identifier
value This property is required. Property Map
Value of the zone setting.
zoneId This property is required. String
Identifier

Outputs

All input properties are implicitly available as output properties. Additionally, the ZoneCacheVariants resource produces the following output properties:

Editable bool
Whether the setting is editable
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
Last time this setting was modified.
Editable bool
Whether the setting is editable
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
Last time this setting was modified.
editable Boolean
Whether the setting is editable
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
Last time this setting was modified.
editable boolean
Whether the setting is editable
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
Last time this setting was modified.
editable bool
Whether the setting is editable
id str
The provider-assigned unique ID for this managed resource.
modified_on str
Last time this setting was modified.
editable Boolean
Whether the setting is editable
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
Last time this setting was modified.

Look up Existing ZoneCacheVariants Resource

Get an existing ZoneCacheVariants resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ZoneCacheVariantsState, opts?: CustomResourceOptions): ZoneCacheVariants
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        editable: Optional[bool] = None,
        modified_on: Optional[str] = None,
        value: Optional[ZoneCacheVariantsValueArgs] = None,
        zone_id: Optional[str] = None) -> ZoneCacheVariants
func GetZoneCacheVariants(ctx *Context, name string, id IDInput, state *ZoneCacheVariantsState, opts ...ResourceOption) (*ZoneCacheVariants, error)
public static ZoneCacheVariants Get(string name, Input<string> id, ZoneCacheVariantsState? state, CustomResourceOptions? opts = null)
public static ZoneCacheVariants get(String name, Output<String> id, ZoneCacheVariantsState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ZoneCacheVariants    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Editable bool
Whether the setting is editable
ModifiedOn string
Last time this setting was modified.
Value ZoneCacheVariantsValue
Value of the zone setting.
ZoneId string
Identifier
Editable bool
Whether the setting is editable
ModifiedOn string
Last time this setting was modified.
Value ZoneCacheVariantsValueArgs
Value of the zone setting.
ZoneId string
Identifier
editable Boolean
Whether the setting is editable
modifiedOn String
Last time this setting was modified.
value ZoneCacheVariantsValue
Value of the zone setting.
zoneId String
Identifier
editable boolean
Whether the setting is editable
modifiedOn string
Last time this setting was modified.
value ZoneCacheVariantsValue
Value of the zone setting.
zoneId string
Identifier
editable bool
Whether the setting is editable
modified_on str
Last time this setting was modified.
value ZoneCacheVariantsValueArgs
Value of the zone setting.
zone_id str
Identifier
editable Boolean
Whether the setting is editable
modifiedOn String
Last time this setting was modified.
value Property Map
Value of the zone setting.
zoneId String
Identifier

Supporting Types

ZoneCacheVariantsValue
, ZoneCacheVariantsValueArgs

Avifs List<string>
List of strings with the MIME types of all the variants that should be served for avif.
Bmps List<string>
List of strings with the MIME types of all the variants that should be served for bmp.
Gifs List<string>
List of strings with the MIME types of all the variants that should be served for gif.
Jp2s List<string>
List of strings with the MIME types of all the variants that should be served for jp2.
Jpegs List<string>
List of strings with the MIME types of all the variants that should be served for jpeg.
Jpg2s List<string>
List of strings with the MIME types of all the variants that should be served for jpg2.
Jpgs List<string>
List of strings with the MIME types of all the variants that should be served for jpg.
Pngs List<string>
List of strings with the MIME types of all the variants that should be served for png.
Tiffs List<string>
List of strings with the MIME types of all the variants that should be served for tiff.
Tifs List<string>
List of strings with the MIME types of all the variants that should be served for tif.
Webps List<string>
List of strings with the MIME types of all the variants that should be served for webp.
Avifs []string
List of strings with the MIME types of all the variants that should be served for avif.
Bmps []string
List of strings with the MIME types of all the variants that should be served for bmp.
Gifs []string
List of strings with the MIME types of all the variants that should be served for gif.
Jp2s []string
List of strings with the MIME types of all the variants that should be served for jp2.
Jpegs []string
List of strings with the MIME types of all the variants that should be served for jpeg.
Jpg2s []string
List of strings with the MIME types of all the variants that should be served for jpg2.
Jpgs []string
List of strings with the MIME types of all the variants that should be served for jpg.
Pngs []string
List of strings with the MIME types of all the variants that should be served for png.
Tiffs []string
List of strings with the MIME types of all the variants that should be served for tiff.
Tifs []string
List of strings with the MIME types of all the variants that should be served for tif.
Webps []string
List of strings with the MIME types of all the variants that should be served for webp.
avifs List<String>
List of strings with the MIME types of all the variants that should be served for avif.
bmps List<String>
List of strings with the MIME types of all the variants that should be served for bmp.
gifs List<String>
List of strings with the MIME types of all the variants that should be served for gif.
jp2s List<String>
List of strings with the MIME types of all the variants that should be served for jp2.
jpegs List<String>
List of strings with the MIME types of all the variants that should be served for jpeg.
jpg2s List<String>
List of strings with the MIME types of all the variants that should be served for jpg2.
jpgs List<String>
List of strings with the MIME types of all the variants that should be served for jpg.
pngs List<String>
List of strings with the MIME types of all the variants that should be served for png.
tiffs List<String>
List of strings with the MIME types of all the variants that should be served for tiff.
tifs List<String>
List of strings with the MIME types of all the variants that should be served for tif.
webps List<String>
List of strings with the MIME types of all the variants that should be served for webp.
avifs string[]
List of strings with the MIME types of all the variants that should be served for avif.
bmps string[]
List of strings with the MIME types of all the variants that should be served for bmp.
gifs string[]
List of strings with the MIME types of all the variants that should be served for gif.
jp2s string[]
List of strings with the MIME types of all the variants that should be served for jp2.
jpegs string[]
List of strings with the MIME types of all the variants that should be served for jpeg.
jpg2s string[]
List of strings with the MIME types of all the variants that should be served for jpg2.
jpgs string[]
List of strings with the MIME types of all the variants that should be served for jpg.
pngs string[]
List of strings with the MIME types of all the variants that should be served for png.
tiffs string[]
List of strings with the MIME types of all the variants that should be served for tiff.
tifs string[]
List of strings with the MIME types of all the variants that should be served for tif.
webps string[]
List of strings with the MIME types of all the variants that should be served for webp.
avifs Sequence[str]
List of strings with the MIME types of all the variants that should be served for avif.
bmps Sequence[str]
List of strings with the MIME types of all the variants that should be served for bmp.
gifs Sequence[str]
List of strings with the MIME types of all the variants that should be served for gif.
jp2s Sequence[str]
List of strings with the MIME types of all the variants that should be served for jp2.
jpegs Sequence[str]
List of strings with the MIME types of all the variants that should be served for jpeg.
jpg2s Sequence[str]
List of strings with the MIME types of all the variants that should be served for jpg2.
jpgs Sequence[str]
List of strings with the MIME types of all the variants that should be served for jpg.
pngs Sequence[str]
List of strings with the MIME types of all the variants that should be served for png.
tiffs Sequence[str]
List of strings with the MIME types of all the variants that should be served for tiff.
tifs Sequence[str]
List of strings with the MIME types of all the variants that should be served for tif.
webps Sequence[str]
List of strings with the MIME types of all the variants that should be served for webp.
avifs List<String>
List of strings with the MIME types of all the variants that should be served for avif.
bmps List<String>
List of strings with the MIME types of all the variants that should be served for bmp.
gifs List<String>
List of strings with the MIME types of all the variants that should be served for gif.
jp2s List<String>
List of strings with the MIME types of all the variants that should be served for jp2.
jpegs List<String>
List of strings with the MIME types of all the variants that should be served for jpeg.
jpg2s List<String>
List of strings with the MIME types of all the variants that should be served for jpg2.
jpgs List<String>
List of strings with the MIME types of all the variants that should be served for jpg.
pngs List<String>
List of strings with the MIME types of all the variants that should be served for png.
tiffs List<String>
List of strings with the MIME types of all the variants that should be served for tiff.
tifs List<String>
List of strings with the MIME types of all the variants that should be served for tif.
webps List<String>
List of strings with the MIME types of all the variants that should be served for webp.

Import

$ pulumi import cloudflare:index/zoneCacheVariants:ZoneCacheVariants example '<zone_id>'
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.