alicloud.esa.ScheduledPreloadJob
Explore with Pulumi AI
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")
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
})
}
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 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
Create ScheduledPreloadJob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScheduledPreloadJob(name: string, args: ScheduledPreloadJobArgs, opts?: CustomResourceOptions);
@overload
def ScheduledPreloadJob(resource_name: str,
args: ScheduledPreloadJobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScheduledPreloadJob(resource_name: str,
opts: Optional[ResourceOptions] = None,
insert_way: Optional[str] = None,
scheduled_preload_job_name: Optional[str] = None,
site_id: Optional[int] = None,
oss_url: Optional[str] = None,
url_list: Optional[str] = None)
func NewScheduledPreloadJob(ctx *Context, name string, args ScheduledPreloadJobArgs, opts ...ResourceOption) (*ScheduledPreloadJob, error)
public ScheduledPreloadJob(string name, ScheduledPreloadJobArgs args, CustomResourceOptions? opts = null)
public ScheduledPreloadJob(String name, ScheduledPreloadJobArgs args)
public ScheduledPreloadJob(String name, ScheduledPreloadJobArgs args, CustomResourceOptions options)
type: alicloud:esa:ScheduledPreloadJob
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 ScheduledPreloadJobArgs
- 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 ScheduledPreloadJobArgs
- 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 ScheduledPreloadJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledPreloadJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduledPreloadJobArgs
- 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 scheduledPreloadJobResource = new AliCloud.Esa.ScheduledPreloadJob("scheduledPreloadJobResource", new()
{
InsertWay = "string",
ScheduledPreloadJobName = "string",
SiteId = 0,
OssUrl = "string",
UrlList = "string",
});
example, err := esa.NewScheduledPreloadJob(ctx, "scheduledPreloadJobResource", &esa.ScheduledPreloadJobArgs{
InsertWay: pulumi.String("string"),
ScheduledPreloadJobName: pulumi.String("string"),
SiteId: pulumi.Int(0),
OssUrl: pulumi.String("string"),
UrlList: pulumi.String("string"),
})
var scheduledPreloadJobResource = new ScheduledPreloadJob("scheduledPreloadJobResource", ScheduledPreloadJobArgs.builder()
.insertWay("string")
.scheduledPreloadJobName("string")
.siteId(0)
.ossUrl("string")
.urlList("string")
.build());
scheduled_preload_job_resource = alicloud.esa.ScheduledPreloadJob("scheduledPreloadJobResource",
insert_way="string",
scheduled_preload_job_name="string",
site_id=0,
oss_url="string",
url_list="string")
const scheduledPreloadJobResource = new alicloud.esa.ScheduledPreloadJob("scheduledPreloadJobResource", {
insertWay: "string",
scheduledPreloadJobName: "string",
siteId: 0,
ossUrl: "string",
urlList: "string",
});
type: alicloud:esa:ScheduledPreloadJob
properties:
insertWay: string
ossUrl: string
scheduledPreloadJobName: string
siteId: 0
urlList: string
ScheduledPreloadJob 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 ScheduledPreloadJob resource accepts the following input properties:
- Insert
Way string - The method to submit the URLs to be prefetched.
- Scheduled
Preload stringJob Name - The task name.
- Site
Id int - The site ID.
- Oss
Url 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.
- Url
List string - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- Insert
Way string - The method to submit the URLs to be prefetched.
- Scheduled
Preload stringJob Name - The task name.
- Site
Id int - The site ID.
- Oss
Url 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.
- Url
List string - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- insert
Way String - The method to submit the URLs to be prefetched.
- scheduled
Preload StringJob Name - The task name.
- site
Id Integer - The site ID.
- oss
Url 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.
- url
List String - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- insert
Way string - The method to submit the URLs to be prefetched.
- scheduled
Preload stringJob Name - The task name.
- site
Id number - The site ID.
- oss
Url 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.
- url
List string - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- insert_
way str - The method to submit the URLs to be prefetched.
- scheduled_
preload_ strjob_ name - The task name.
- site_
id int - The site ID.
- oss_
url str - Preheat OSS files regularly and fill in the OSS file address. Note: The OSS file contains the URL that you need to warm up.
- url_
list str - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- insert
Way String - The method to submit the URLs to be prefetched.
- scheduled
Preload StringJob Name - The task name.
- site
Id Number - The site ID.
- oss
Url 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.
- url
List String - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledPreloadJob resource produces the following output properties:
- Create
Time string - The time when the task was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Create
Time string - The time when the task was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- create
Time String - The time when the task was created.
- id String
- The provider-assigned unique ID for this managed resource.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- create
Time string - The time when the task was created.
- id string
- The provider-assigned unique ID for this managed resource.
- scheduled
Preload stringJob Id - The ID of the prefetch task.
- create_
time str - The time when the task was created.
- id str
- The provider-assigned unique ID for this managed resource.
- scheduled_
preload_ strjob_ id - The ID of the prefetch task.
- create
Time String - The time when the task was created.
- id String
- The provider-assigned unique ID for this managed resource.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
Look up Existing ScheduledPreloadJob Resource
Get an existing ScheduledPreloadJob 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?: ScheduledPreloadJobState, opts?: CustomResourceOptions): ScheduledPreloadJob
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
insert_way: Optional[str] = None,
oss_url: Optional[str] = None,
scheduled_preload_job_id: Optional[str] = None,
scheduled_preload_job_name: Optional[str] = None,
site_id: Optional[int] = None,
url_list: Optional[str] = None) -> ScheduledPreloadJob
func GetScheduledPreloadJob(ctx *Context, name string, id IDInput, state *ScheduledPreloadJobState, opts ...ResourceOption) (*ScheduledPreloadJob, error)
public static ScheduledPreloadJob Get(string name, Input<string> id, ScheduledPreloadJobState? state, CustomResourceOptions? opts = null)
public static ScheduledPreloadJob get(String name, Output<String> id, ScheduledPreloadJobState state, CustomResourceOptions options)
resources: _: type: alicloud:esa:ScheduledPreloadJob 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.
- Create
Time string - The time when the task was created.
- Insert
Way string - The method to submit the URLs to be prefetched.
- Oss
Url 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.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Scheduled
Preload stringJob Name - The task name.
- Site
Id int - The site ID.
- Url
List string - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- Create
Time string - The time when the task was created.
- Insert
Way string - The method to submit the URLs to be prefetched.
- Oss
Url 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.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Scheduled
Preload stringJob Name - The task name.
- Site
Id int - The site ID.
- Url
List string - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- create
Time String - The time when the task was created.
- insert
Way String - The method to submit the URLs to be prefetched.
- oss
Url 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.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- scheduled
Preload StringJob Name - The task name.
- site
Id Integer - The site ID.
- url
List String - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- create
Time string - The time when the task was created.
- insert
Way string - The method to submit the URLs to be prefetched.
- oss
Url 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.
- scheduled
Preload stringJob Id - The ID of the prefetch task.
- scheduled
Preload stringJob Name - The task name.
- site
Id number - The site ID.
- url
List string - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- create_
time str - The time when the task was created.
- insert_
way str - The method to submit the URLs to be prefetched.
- oss_
url str - Preheat OSS files regularly and fill in the OSS file address. Note: The OSS file contains the URL that you need to warm up.
- scheduled_
preload_ strjob_ id - The ID of the prefetch task.
- scheduled_
preload_ strjob_ name - The task name.
- site_
id int - The site ID.
- url_
list str - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
- create
Time String - The time when the task was created.
- insert
Way String - The method to submit the URLs to be prefetched.
- oss
Url 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.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- scheduled
Preload StringJob Name - The task name.
- site
Id Number - The site ID.
- url
List String - A list of URLs to be preheated, which is used when uploading a preheated file in the text box mode.
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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.