tencentcloud.CdnUrlPurge
Explore with Pulumi AI
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://
orhttps://
. - Area string
- Specify purge area. NOTE: only purge same area cache contents.
- Cdn
Url stringPurge Id - 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. - Url
Encode 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://
orhttps://
. - Area string
- Specify purge area. NOTE: only purge same area cache contents.
- Cdn
Url stringPurge Id - 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. - 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://
orhttps://
. - area String
- Specify purge area. NOTE: only purge same area cache contents.
- cdn
Url StringPurge Id - 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. - url
Encode 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://
orhttps://
. - area string
- Specify purge area. NOTE: only purge same area cache contents.
- cdn
Url stringPurge Id - 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. - url
Encode 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://
orhttps://
. - area str
- Specify purge area. NOTE: only purge same area cache contents.
- cdn_
url_ strpurge_ id - 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://
orhttps://
. - area String
- Specify purge area. NOTE: only purge same area cache contents.
- cdn
Url StringPurge Id - 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. - url
Encode 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.
- Purge
Histories List<CdnUrl Purge Purge History> - logs of latest purge task.
- Task
Id string - Task id of last operation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Purge
Histories []CdnUrl Purge Purge History - logs of latest purge task.
- Task
Id string - Task id of last operation.
- id String
- The provider-assigned unique ID for this managed resource.
- purge
Histories List<CdnUrl Purge Purge History> - logs of latest purge task.
- task
Id String - Task id of last operation.
- id string
- The provider-assigned unique ID for this managed resource.
- purge
Histories CdnUrl Purge Purge History[] - logs of latest purge task.
- task
Id string - Task id of last operation.
- id str
- The provider-assigned unique ID for this managed resource.
- purge_
histories Sequence[CdnUrl Purge Purge History] - logs of latest purge task.
- task_
id str - Task id of last operation.
- id String
- The provider-assigned unique ID for this managed resource.
- purge
Histories List<Property Map> - logs of latest purge task.
- task
Id 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.
- Area string
- Specify purge area. NOTE: only purge same area cache contents.
- Cdn
Url stringPurge Id - ID of the resource.
- Purge
Histories List<CdnUrl Purge Purge History> - 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. - Task
Id string - Task id of last operation.
- 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://
orhttps://
.
- Area string
- Specify purge area. NOTE: only purge same area cache contents.
- Cdn
Url stringPurge Id - ID of the resource.
- Purge
Histories []CdnUrl Purge Purge History Args - 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. - Task
Id string - Task id of last operation.
- Url
Encode 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://
orhttps://
.
- area String
- Specify purge area. NOTE: only purge same area cache contents.
- cdn
Url StringPurge Id - ID of the resource.
- purge
Histories List<CdnUrl Purge Purge History> - 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. - task
Id String - Task id of last operation.
- url
Encode 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://
orhttps://
.
- area string
- Specify purge area. NOTE: only purge same area cache contents.
- cdn
Url stringPurge Id - ID of the resource.
- purge
Histories CdnUrl Purge Purge History[] - 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. - task
Id string - Task id of last operation.
- url
Encode 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://
orhttps://
.
- area str
- Specify purge area. NOTE: only purge same area cache contents.
- cdn_
url_ strpurge_ id - ID of the resource.
- purge_
histories Sequence[CdnUrl Purge Purge History Args] - 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://
orhttps://
.
- area String
- Specify purge area. NOTE: only purge same area cache contents.
- cdn
Url StringPurge Id - ID of the resource.
- purge
Histories 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. - task
Id String - Task id of last operation.
- url
Encode 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://
orhttps://
.
Supporting Types
CdnUrlPurgePurgeHistory, CdnUrlPurgePurgeHistoryArgs
- create_
time str - Purge task create time.
- flush_
type str - Purge flush type of
flush
ordelete
. - purge_
type str - Purge category in of
url
orpath
. - status str
- Purge status of
fail
,done
,process
. - task_
id str - Task id of last operation.
- url str
- Purge url.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.