1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CdnUrlPurge
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CdnUrlPurge

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provide a resource to invoke a Url Purge Request.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = new tencentcloud.CdnUrlPurge("foo", {urls: ["https://www.example.com/a"]});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.CdnUrlPurge("foo", urls=["https://www.example.com/a"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewCdnUrlPurge(ctx, "foo", &tencentcloud.CdnUrlPurgeArgs{
    			Urls: pulumi.StringArray{
    				pulumi.String("https://www.example.com/a"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Tencentcloud.CdnUrlPurge("foo", new()
        {
            Urls = new[]
            {
                "https://www.example.com/a",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CdnUrlPurge;
    import com.pulumi.tencentcloud.CdnUrlPurgeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var foo = new CdnUrlPurge("foo", CdnUrlPurgeArgs.builder()
                .urls("https://www.example.com/a")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: tencentcloud:CdnUrlPurge
        properties:
          urls:
            - https://www.example.com/a
    

    argument to request new purge task with same urls

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = new tencentcloud.CdnUrlPurge("foo", {
        redo: 1,
        urls: ["https://www.example.com/a"],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.CdnUrlPurge("foo",
        redo=1,
        urls=["https://www.example.com/a"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewCdnUrlPurge(ctx, "foo", &tencentcloud.CdnUrlPurgeArgs{
    			Redo: pulumi.Float64(1),
    			Urls: pulumi.StringArray{
    				pulumi.String("https://www.example.com/a"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Tencentcloud.CdnUrlPurge("foo", new()
        {
            Redo = 1,
            Urls = new[]
            {
                "https://www.example.com/a",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CdnUrlPurge;
    import com.pulumi.tencentcloud.CdnUrlPurgeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var foo = new CdnUrlPurge("foo", CdnUrlPurgeArgs.builder()
                .redo(1)
                .urls("https://www.example.com/a")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: tencentcloud:CdnUrlPurge
        properties:
          redo: 1
          urls:
            - https://www.example.com/a
    

    Create CdnUrlPurge Resource

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

    Constructor syntax

    new CdnUrlPurge(name: string, args: CdnUrlPurgeArgs, opts?: CustomResourceOptions);
    @overload
    def CdnUrlPurge(resource_name: str,
                    args: CdnUrlPurgeArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CdnUrlPurge(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    urls: Optional[Sequence[str]] = None,
                    area: Optional[str] = None,
                    cdn_url_purge_id: Optional[str] = None,
                    redo: Optional[float] = None,
                    url_encode: Optional[bool] = None)
    func NewCdnUrlPurge(ctx *Context, name string, args CdnUrlPurgeArgs, opts ...ResourceOption) (*CdnUrlPurge, error)
    public CdnUrlPurge(string name, CdnUrlPurgeArgs args, CustomResourceOptions? opts = null)
    public CdnUrlPurge(String name, CdnUrlPurgeArgs args)
    public CdnUrlPurge(String name, CdnUrlPurgeArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CdnUrlPurge
    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 CdnUrlPurgeArgs
    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 CdnUrlPurgeArgs
    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 CdnUrlPurgeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdnUrlPurgeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CdnUrlPurgeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Urls List<string>
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    Area string
    Specify purge area. NOTE: only purge same area cache contents.
    CdnUrlPurgeId string
    ID of the resource.
    Redo double
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    UrlEncode bool
    Whether to encode urls, if set to true will auto encode instead of manual process.
    Urls []string
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    Area string
    Specify purge area. NOTE: only purge same area cache contents.
    CdnUrlPurgeId string
    ID of the resource.
    Redo float64
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    UrlEncode bool
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls List<String>
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area String
    Specify purge area. NOTE: only purge same area cache contents.
    cdnUrlPurgeId String
    ID of the resource.
    redo Double
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    urlEncode Boolean
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls string[]
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area string
    Specify purge area. NOTE: only purge same area cache contents.
    cdnUrlPurgeId string
    ID of the resource.
    redo number
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    urlEncode boolean
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls Sequence[str]
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area str
    Specify purge area. NOTE: only purge same area cache contents.
    cdn_url_purge_id str
    ID of the resource.
    redo float
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    url_encode bool
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls List<String>
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area String
    Specify purge area. NOTE: only purge same area cache contents.
    cdnUrlPurgeId String
    ID of the resource.
    redo Number
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    urlEncode Boolean
    Whether to encode urls, if set to true will auto encode instead of manual process.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    PurgeHistories List<CdnUrlPurgePurgeHistory>
    logs of latest purge task.
    TaskId string
    Task id of last operation.
    Id string
    The provider-assigned unique ID for this managed resource.
    PurgeHistories []CdnUrlPurgePurgeHistory
    logs of latest purge task.
    TaskId string
    Task id of last operation.
    id String
    The provider-assigned unique ID for this managed resource.
    purgeHistories List<CdnUrlPurgePurgeHistory>
    logs of latest purge task.
    taskId String
    Task id of last operation.
    id string
    The provider-assigned unique ID for this managed resource.
    purgeHistories CdnUrlPurgePurgeHistory[]
    logs of latest purge task.
    taskId string
    Task id of last operation.
    id str
    The provider-assigned unique ID for this managed resource.
    purge_histories Sequence[CdnUrlPurgePurgeHistory]
    logs of latest purge task.
    task_id str
    Task id of last operation.
    id String
    The provider-assigned unique ID for this managed resource.
    purgeHistories List<Property Map>
    logs of latest purge task.
    taskId String
    Task id of last operation.

    Look up Existing CdnUrlPurge Resource

    Get an existing CdnUrlPurge 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?: CdnUrlPurgeState, opts?: CustomResourceOptions): CdnUrlPurge
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            area: Optional[str] = None,
            cdn_url_purge_id: Optional[str] = None,
            purge_histories: Optional[Sequence[CdnUrlPurgePurgeHistoryArgs]] = None,
            redo: Optional[float] = None,
            task_id: Optional[str] = None,
            url_encode: Optional[bool] = None,
            urls: Optional[Sequence[str]] = None) -> CdnUrlPurge
    func GetCdnUrlPurge(ctx *Context, name string, id IDInput, state *CdnUrlPurgeState, opts ...ResourceOption) (*CdnUrlPurge, error)
    public static CdnUrlPurge Get(string name, Input<string> id, CdnUrlPurgeState? state, CustomResourceOptions? opts = null)
    public static CdnUrlPurge get(String name, Output<String> id, CdnUrlPurgeState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CdnUrlPurge    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:
    Area string
    Specify purge area. NOTE: only purge same area cache contents.
    CdnUrlPurgeId string
    ID of the resource.
    PurgeHistories List<CdnUrlPurgePurgeHistory>
    logs of latest purge task.
    Redo double
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    TaskId string
    Task id of last operation.
    UrlEncode bool
    Whether to encode urls, if set to true will auto encode instead of manual process.
    Urls List<string>
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    Area string
    Specify purge area. NOTE: only purge same area cache contents.
    CdnUrlPurgeId string
    ID of the resource.
    PurgeHistories []CdnUrlPurgePurgeHistoryArgs
    logs of latest purge task.
    Redo float64
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    TaskId string
    Task id of last operation.
    UrlEncode bool
    Whether to encode urls, if set to true will auto encode instead of manual process.
    Urls []string
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area String
    Specify purge area. NOTE: only purge same area cache contents.
    cdnUrlPurgeId String
    ID of the resource.
    purgeHistories List<CdnUrlPurgePurgeHistory>
    logs of latest purge task.
    redo Double
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    taskId String
    Task id of last operation.
    urlEncode Boolean
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls List<String>
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area string
    Specify purge area. NOTE: only purge same area cache contents.
    cdnUrlPurgeId string
    ID of the resource.
    purgeHistories CdnUrlPurgePurgeHistory[]
    logs of latest purge task.
    redo number
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    taskId string
    Task id of last operation.
    urlEncode boolean
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls string[]
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area str
    Specify purge area. NOTE: only purge same area cache contents.
    cdn_url_purge_id str
    ID of the resource.
    purge_histories Sequence[CdnUrlPurgePurgeHistoryArgs]
    logs of latest purge task.
    redo float
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    task_id str
    Task id of last operation.
    url_encode bool
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls Sequence[str]
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.
    area String
    Specify purge area. NOTE: only purge same area cache contents.
    cdnUrlPurgeId String
    ID of the resource.
    purgeHistories List<Property Map>
    logs of latest purge task.
    redo Number
    Change to purge again. NOTE: this argument only works while resource update, if set to 0 or null will not be triggered.
    taskId String
    Task id of last operation.
    urlEncode Boolean
    Whether to encode urls, if set to true will auto encode instead of manual process.
    urls List<String>
    List of url to purge. NOTE: urls need include protocol prefix http:// or https://.

    Supporting Types

    CdnUrlPurgePurgeHistory, CdnUrlPurgePurgeHistoryArgs

    CreateTime string
    Purge task create time.
    FlushType string
    Purge flush type of flush or delete.
    PurgeType string
    Purge category in of url or path.
    Status string
    Purge status of fail, done, process.
    TaskId string
    Task id of last operation.
    Url string
    Purge url.
    CreateTime string
    Purge task create time.
    FlushType string
    Purge flush type of flush or delete.
    PurgeType string
    Purge category in of url or path.
    Status string
    Purge status of fail, done, process.
    TaskId string
    Task id of last operation.
    Url string
    Purge url.
    createTime String
    Purge task create time.
    flushType String
    Purge flush type of flush or delete.
    purgeType String
    Purge category in of url or path.
    status String
    Purge status of fail, done, process.
    taskId String
    Task id of last operation.
    url String
    Purge url.
    createTime string
    Purge task create time.
    flushType string
    Purge flush type of flush or delete.
    purgeType string
    Purge category in of url or path.
    status string
    Purge status of fail, done, process.
    taskId string
    Task id of last operation.
    url string
    Purge url.
    create_time str
    Purge task create time.
    flush_type str
    Purge flush type of flush or delete.
    purge_type str
    Purge category in of url or path.
    status str
    Purge status of fail, done, process.
    task_id str
    Task id of last operation.
    url str
    Purge url.
    createTime String
    Purge task create time.
    flushType String
    Purge flush type of flush or delete.
    purgeType String
    Purge category in of url or path.
    status String
    Purge status of fail, done, process.
    taskId String
    Task id of last operation.
    url String
    Purge url.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack