1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ImageVariant
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.ImageVariant

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      exampleImageVariant:
        type: cloudflare:ImageVariant
        name: example_image_variant
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          id: hero
          options:
            fit: scale-down
            height: 768
            metadata: none
            width: 1366
          neverRequireSignedUrls: true
    

    Create ImageVariant Resource

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

    Constructor syntax

    new ImageVariant(name: string, args: ImageVariantArgs, opts?: CustomResourceOptions);
    @overload
    def ImageVariant(resource_name: str,
                     args: ImageVariantArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ImageVariant(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     account_id: Optional[str] = None,
                     options: Optional[ImageVariantOptionsArgs] = None,
                     never_require_signed_urls: Optional[bool] = None)
    func NewImageVariant(ctx *Context, name string, args ImageVariantArgs, opts ...ResourceOption) (*ImageVariant, error)
    public ImageVariant(string name, ImageVariantArgs args, CustomResourceOptions? opts = null)
    public ImageVariant(String name, ImageVariantArgs args)
    public ImageVariant(String name, ImageVariantArgs args, CustomResourceOptions options)
    
    type: cloudflare:ImageVariant
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ImageVariantArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ImageVariantArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ImageVariantArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageVariantArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageVariantArgs
    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 imageVariantResource = new Cloudflare.ImageVariant("imageVariantResource", new()
    {
        AccountId = "string",
        Options = new Cloudflare.Inputs.ImageVariantOptionsArgs
        {
            Fit = "string",
            Height = 0,
            Metadata = "string",
            Width = 0,
        },
        NeverRequireSignedUrls = false,
    });
    
    example, err := cloudflare.NewImageVariant(ctx, "imageVariantResource", &cloudflare.ImageVariantArgs{
    	AccountId: pulumi.String("string"),
    	Options: &cloudflare.ImageVariantOptionsArgs{
    		Fit:      pulumi.String("string"),
    		Height:   pulumi.Float64(0),
    		Metadata: pulumi.String("string"),
    		Width:    pulumi.Float64(0),
    	},
    	NeverRequireSignedUrls: pulumi.Bool(false),
    })
    
    var imageVariantResource = new ImageVariant("imageVariantResource", ImageVariantArgs.builder()
        .accountId("string")
        .options(ImageVariantOptionsArgs.builder()
            .fit("string")
            .height(0)
            .metadata("string")
            .width(0)
            .build())
        .neverRequireSignedUrls(false)
        .build());
    
    image_variant_resource = cloudflare.ImageVariant("imageVariantResource",
        account_id="string",
        options={
            "fit": "string",
            "height": 0,
            "metadata": "string",
            "width": 0,
        },
        never_require_signed_urls=False)
    
    const imageVariantResource = new cloudflare.ImageVariant("imageVariantResource", {
        accountId: "string",
        options: {
            fit: "string",
            height: 0,
            metadata: "string",
            width: 0,
        },
        neverRequireSignedUrls: false,
    });
    
    type: cloudflare:ImageVariant
    properties:
        accountId: string
        neverRequireSignedUrls: false
        options:
            fit: string
            height: 0
            metadata: string
            width: 0
    

    ImageVariant 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 ImageVariant resource accepts the following input properties:

    AccountId string
    Account identifier tag.
    Options ImageVariantOptions
    Allows you to define image resizing sizes for different use cases.
    NeverRequireSignedUrls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    AccountId string
    Account identifier tag.
    Options ImageVariantOptionsArgs
    Allows you to define image resizing sizes for different use cases.
    NeverRequireSignedUrls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    accountId String
    Account identifier tag.
    options ImageVariantOptions
    Allows you to define image resizing sizes for different use cases.
    neverRequireSignedUrls Boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    accountId string
    Account identifier tag.
    options ImageVariantOptions
    Allows you to define image resizing sizes for different use cases.
    neverRequireSignedUrls boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    account_id str
    Account identifier tag.
    options ImageVariantOptionsArgs
    Allows you to define image resizing sizes for different use cases.
    never_require_signed_urls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    accountId String
    Account identifier tag.
    options Property Map
    Allows you to define image resizing sizes for different use cases.
    neverRequireSignedUrls Boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Variant ImageVariantVariant
    Id string
    The provider-assigned unique ID for this managed resource.
    Variant ImageVariantVariant
    id String
    The provider-assigned unique ID for this managed resource.
    variant ImageVariantVariant
    id string
    The provider-assigned unique ID for this managed resource.
    variant ImageVariantVariant
    id str
    The provider-assigned unique ID for this managed resource.
    variant ImageVariantVariant
    id String
    The provider-assigned unique ID for this managed resource.
    variant Property Map

    Look up Existing ImageVariant Resource

    Get an existing ImageVariant 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?: ImageVariantState, opts?: CustomResourceOptions): ImageVariant
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            never_require_signed_urls: Optional[bool] = None,
            options: Optional[ImageVariantOptionsArgs] = None,
            variant: Optional[ImageVariantVariantArgs] = None) -> ImageVariant
    func GetImageVariant(ctx *Context, name string, id IDInput, state *ImageVariantState, opts ...ResourceOption) (*ImageVariant, error)
    public static ImageVariant Get(string name, Input<string> id, ImageVariantState? state, CustomResourceOptions? opts = null)
    public static ImageVariant get(String name, Output<String> id, ImageVariantState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:ImageVariant    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    AccountId string
    Account identifier tag.
    NeverRequireSignedUrls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    Options ImageVariantOptions
    Allows you to define image resizing sizes for different use cases.
    Variant ImageVariantVariant
    AccountId string
    Account identifier tag.
    NeverRequireSignedUrls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    Options ImageVariantOptionsArgs
    Allows you to define image resizing sizes for different use cases.
    Variant ImageVariantVariantArgs
    accountId String
    Account identifier tag.
    neverRequireSignedUrls Boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options ImageVariantOptions
    Allows you to define image resizing sizes for different use cases.
    variant ImageVariantVariant
    accountId string
    Account identifier tag.
    neverRequireSignedUrls boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options ImageVariantOptions
    Allows you to define image resizing sizes for different use cases.
    variant ImageVariantVariant
    account_id str
    Account identifier tag.
    never_require_signed_urls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options ImageVariantOptionsArgs
    Allows you to define image resizing sizes for different use cases.
    variant ImageVariantVariantArgs
    accountId String
    Account identifier tag.
    neverRequireSignedUrls Boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options Property Map
    Allows you to define image resizing sizes for different use cases.
    variant Property Map

    Supporting Types

    ImageVariantOptions, ImageVariantOptionsArgs

    Fit string
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    Height double
    Maximum height in image pixels.
    Metadata string
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    Width double
    Maximum width in image pixels.
    Fit string
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    Height float64
    Maximum height in image pixels.
    Metadata string
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    Width float64
    Maximum width in image pixels.
    fit String
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height Double
    Maximum height in image pixels.
    metadata String
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width Double
    Maximum width in image pixels.
    fit string
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height number
    Maximum height in image pixels.
    metadata string
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width number
    Maximum width in image pixels.
    fit str
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height float
    Maximum height in image pixels.
    metadata str
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width float
    Maximum width in image pixels.
    fit String
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height Number
    Maximum height in image pixels.
    metadata String
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width Number
    Maximum width in image pixels.

    ImageVariantVariant, ImageVariantVariantArgs

    Id string
    NeverRequireSignedUrls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    Options ImageVariantVariantOptions
    Allows you to define image resizing sizes for different use cases.
    Id string
    NeverRequireSignedUrls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    Options ImageVariantVariantOptions
    Allows you to define image resizing sizes for different use cases.
    id String
    neverRequireSignedUrls Boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options ImageVariantVariantOptions
    Allows you to define image resizing sizes for different use cases.
    id string
    neverRequireSignedUrls boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options ImageVariantVariantOptions
    Allows you to define image resizing sizes for different use cases.
    id str
    never_require_signed_urls bool
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options ImageVariantVariantOptions
    Allows you to define image resizing sizes for different use cases.
    id String
    neverRequireSignedUrls Boolean
    Indicates whether the variant can access an image without a signature, regardless of image access control.
    options Property Map
    Allows you to define image resizing sizes for different use cases.

    ImageVariantVariantOptions, ImageVariantVariantOptionsArgs

    Fit string
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    Height double
    Maximum height in image pixels.
    Metadata string
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    Width double
    Maximum width in image pixels.
    Fit string
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    Height float64
    Maximum height in image pixels.
    Metadata string
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    Width float64
    Maximum width in image pixels.
    fit String
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height Double
    Maximum height in image pixels.
    metadata String
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width Double
    Maximum width in image pixels.
    fit string
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height number
    Maximum height in image pixels.
    metadata string
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width number
    Maximum width in image pixels.
    fit str
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height float
    Maximum height in image pixels.
    metadata str
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width float
    Maximum width in image pixels.
    fit String
    The fit property describes how the width and height dimensions should be interpreted. Available values: "scale-down", "contain", "cover", "crop", "pad".
    height Number
    Maximum height in image pixels.
    metadata String
    What EXIF data should be preserved in the output image. Available values: "keep", "copyright", "none".
    width Number
    Maximum width in image pixels.

    Import

    $ pulumi import cloudflare:index/imageVariant:ImageVariant example '<account_id>/<variant_id>'
    

    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.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi