ScheduledPreloadJob

class ScheduledPreloadJob : KotlinCustomResource

Provides a ESA Scheduled Preload Job resource. For information about ESA Scheduled Preload Job and how to use it, see What is Scheduled Preload Job.

NOTE: Available since v1.248.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.esa.getSites({
planSubscribeType: "enterpriseplan",
});
const defaultSite = new alicloud.esa.Site("default", {
siteName: "terraform.cn",
instanceId: _default.then(_default => _default.sites?.[0]?.instanceId),
coverage: "overseas",
accessType: "NS",
});
const defaultScheduledPreloadJob = new alicloud.esa.ScheduledPreloadJob("default", {
insertWay: "textBox",
siteId: defaultSite.id,
scheduledPreloadJobName: "example_scheduledpreloadexecution_job",
urlList: "http://example.gositecdn.cn/example/example.txt",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
default_site = alicloud.esa.Site("default",
site_name="terraform.cn",
instance_id=default.sites[0].instance_id,
coverage="overseas",
access_type="NS")
default_scheduled_preload_job = alicloud.esa.ScheduledPreloadJob("default",
insert_way="textBox",
site_id=default_site.id,
scheduled_preload_job_name="example_scheduledpreloadexecution_job",
url_list="http://example.gositecdn.cn/example/example.txt")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Esa.GetSites.Invoke(new()
{
PlanSubscribeType = "enterpriseplan",
});
var defaultSite = new AliCloud.Esa.Site("default", new()
{
SiteName = "terraform.cn",
InstanceId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.InstanceId)),
Coverage = "overseas",
AccessType = "NS",
});
var defaultScheduledPreloadJob = new AliCloud.Esa.ScheduledPreloadJob("default", new()
{
InsertWay = "textBox",
SiteId = defaultSite.Id,
ScheduledPreloadJobName = "example_scheduledpreloadexecution_job",
UrlList = "http://example.gositecdn.cn/example/example.txt",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
}, nil)
if err != nil {
return err
}
defaultSite, err := esa.NewSite(ctx, "default", &esa.SiteArgs{
SiteName: pulumi.String("terraform.cn"),
InstanceId: pulumi.String(_default.Sites[0].InstanceId),
Coverage: pulumi.String("overseas"),
AccessType: pulumi.String("NS"),
})
if err != nil {
return err
}
_, err = esa.NewScheduledPreloadJob(ctx, "default", &esa.ScheduledPreloadJobArgs{
InsertWay: pulumi.String("textBox"),
SiteId: defaultSite.ID(),
ScheduledPreloadJobName: pulumi.String("example_scheduledpreloadexecution_job"),
UrlList: pulumi.String("http://example.gositecdn.cn/example/example.txt"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
import com.pulumi.alicloud.esa.Site;
import com.pulumi.alicloud.esa.SiteArgs;
import com.pulumi.alicloud.esa.ScheduledPreloadJob;
import com.pulumi.alicloud.esa.ScheduledPreloadJobArgs;
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) {
final var default = EsaFunctions.getSites(GetSitesArgs.builder()
.planSubscribeType("enterpriseplan")
.build());
var defaultSite = new Site("defaultSite", SiteArgs.builder()
.siteName("terraform.cn")
.instanceId(default_.sites()[0].instanceId())
.coverage("overseas")
.accessType("NS")
.build());
var defaultScheduledPreloadJob = new ScheduledPreloadJob("defaultScheduledPreloadJob", ScheduledPreloadJobArgs.builder()
.insertWay("textBox")
.siteId(defaultSite.id())
.scheduledPreloadJobName("example_scheduledpreloadexecution_job")
.urlList("http://example.gositecdn.cn/example/example.txt")
.build());
}
}
resources:
defaultSite:
type: alicloud:esa:Site
name: default
properties:
siteName: terraform.cn
instanceId: ${default.sites[0].instanceId}
coverage: overseas
accessType: NS
defaultScheduledPreloadJob:
type: alicloud:esa:ScheduledPreloadJob
name: default
properties:
insertWay: textBox
siteId: ${defaultSite.id}
scheduledPreloadJobName: example_scheduledpreloadexecution_job
urlList: http://example.gositecdn.cn/example/example.txt
variables:
default:
fn::invoke:
function: alicloud:esa:getSites
arguments:
planSubscribeType: enterpriseplan

Import

ESA Scheduled Preload Job can be imported using the id, e.g.

$ pulumi import alicloud:esa/scheduledPreloadJob:ScheduledPreloadJob example <site_id>:<scheduled_preload_job_id>

Properties

Link copied to clipboard
val createTime: Output<String>

The time when the task was created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val insertWay: Output<String>

The method to submit the URLs to be prefetched.

Link copied to clipboard
val ossUrl: Output<String>?

Preheat OSS files regularly and fill in the OSS file address. Note: The OSS file contains the URL that you need to warm up.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The ID of the prefetch task.

Link copied to clipboard

The task name.

Link copied to clipboard
val siteId: Output<Int>

The site ID.

Link copied to clipboard
val urlList: Output<String>?

A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.

Link copied to clipboard
val urn: Output<String>