alicloud.esa.ScheduledPreloadExecution
Explore with Pulumi AI
Provides a ESA Scheduled Preload Execution resource.
For information about ESA Scheduled Preload Execution and how to use it, see What is Scheduled Preload Execution.
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",
});
const defaultScheduledPreloadExecution = new alicloud.esa.ScheduledPreloadExecution("default", {
sliceLen: 5,
endTime: "2024-06-04T10:02:09.000+08:00",
startTime: "2024-06-04T00:00:00.000+08:00",
scheduledPreloadJobId: defaultScheduledPreloadJob.scheduledPreloadJobId,
interval: 30,
});
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")
default_scheduled_preload_execution = alicloud.esa.ScheduledPreloadExecution("default",
slice_len=5,
end_time="2024-06-04T10:02:09.000+08:00",
start_time="2024-06-04T00:00:00.000+08:00",
scheduled_preload_job_id=default_scheduled_preload_job.scheduled_preload_job_id,
interval=30)
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
}
defaultScheduledPreloadJob, 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
}
_, err = esa.NewScheduledPreloadExecution(ctx, "default", &esa.ScheduledPreloadExecutionArgs{
SliceLen: pulumi.Int(5),
EndTime: pulumi.String("2024-06-04T10:02:09.000+08:00"),
StartTime: pulumi.String("2024-06-04T00:00:00.000+08:00"),
ScheduledPreloadJobId: defaultScheduledPreloadJob.ScheduledPreloadJobId,
Interval: pulumi.Int(30),
})
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",
});
var defaultScheduledPreloadExecution = new AliCloud.Esa.ScheduledPreloadExecution("default", new()
{
SliceLen = 5,
EndTime = "2024-06-04T10:02:09.000+08:00",
StartTime = "2024-06-04T00:00:00.000+08:00",
ScheduledPreloadJobId = defaultScheduledPreloadJob.ScheduledPreloadJobId,
Interval = 30,
});
});
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 com.pulumi.alicloud.esa.ScheduledPreloadExecution;
import com.pulumi.alicloud.esa.ScheduledPreloadExecutionArgs;
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());
var defaultScheduledPreloadExecution = new ScheduledPreloadExecution("defaultScheduledPreloadExecution", ScheduledPreloadExecutionArgs.builder()
.sliceLen(5)
.endTime("2024-06-04T10:02:09.000+08:00")
.startTime("2024-06-04T00:00:00.000+08:00")
.scheduledPreloadJobId(defaultScheduledPreloadJob.scheduledPreloadJobId())
.interval(30)
.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
defaultScheduledPreloadExecution:
type: alicloud:esa:ScheduledPreloadExecution
name: default
properties:
sliceLen: '5'
endTime: 2024-06-04T10:02:09.000+08:00
startTime: 2024-06-04T00:00:00.000+08:00
scheduledPreloadJobId: ${defaultScheduledPreloadJob.scheduledPreloadJobId}
interval: '30'
variables:
default:
fn::invoke:
function: alicloud:esa:getSites
arguments:
planSubscribeType: enterpriseplan
Create ScheduledPreloadExecution Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScheduledPreloadExecution(name: string, args: ScheduledPreloadExecutionArgs, opts?: CustomResourceOptions);
@overload
def ScheduledPreloadExecution(resource_name: str,
args: ScheduledPreloadExecutionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScheduledPreloadExecution(resource_name: str,
opts: Optional[ResourceOptions] = None,
interval: Optional[int] = None,
scheduled_preload_job_id: Optional[str] = None,
slice_len: Optional[int] = None,
end_time: Optional[str] = None,
start_time: Optional[str] = None)
func NewScheduledPreloadExecution(ctx *Context, name string, args ScheduledPreloadExecutionArgs, opts ...ResourceOption) (*ScheduledPreloadExecution, error)
public ScheduledPreloadExecution(string name, ScheduledPreloadExecutionArgs args, CustomResourceOptions? opts = null)
public ScheduledPreloadExecution(String name, ScheduledPreloadExecutionArgs args)
public ScheduledPreloadExecution(String name, ScheduledPreloadExecutionArgs args, CustomResourceOptions options)
type: alicloud:esa:ScheduledPreloadExecution
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 ScheduledPreloadExecutionArgs
- 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 ScheduledPreloadExecutionArgs
- 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 ScheduledPreloadExecutionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledPreloadExecutionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduledPreloadExecutionArgs
- 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 scheduledPreloadExecutionResource = new AliCloud.Esa.ScheduledPreloadExecution("scheduledPreloadExecutionResource", new()
{
Interval = 0,
ScheduledPreloadJobId = "string",
SliceLen = 0,
EndTime = "string",
StartTime = "string",
});
example, err := esa.NewScheduledPreloadExecution(ctx, "scheduledPreloadExecutionResource", &esa.ScheduledPreloadExecutionArgs{
Interval: pulumi.Int(0),
ScheduledPreloadJobId: pulumi.String("string"),
SliceLen: pulumi.Int(0),
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
})
var scheduledPreloadExecutionResource = new ScheduledPreloadExecution("scheduledPreloadExecutionResource", ScheduledPreloadExecutionArgs.builder()
.interval(0)
.scheduledPreloadJobId("string")
.sliceLen(0)
.endTime("string")
.startTime("string")
.build());
scheduled_preload_execution_resource = alicloud.esa.ScheduledPreloadExecution("scheduledPreloadExecutionResource",
interval=0,
scheduled_preload_job_id="string",
slice_len=0,
end_time="string",
start_time="string")
const scheduledPreloadExecutionResource = new alicloud.esa.ScheduledPreloadExecution("scheduledPreloadExecutionResource", {
interval: 0,
scheduledPreloadJobId: "string",
sliceLen: 0,
endTime: "string",
startTime: "string",
});
type: alicloud:esa:ScheduledPreloadExecution
properties:
endTime: string
interval: 0
scheduledPreloadJobId: string
sliceLen: 0
startTime: string
ScheduledPreloadExecution 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 ScheduledPreloadExecution resource accepts the following input properties:
- Interval int
- The time interval between each batch execution. Unit: seconds.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Slice
Len int - The number of URLs prefetched in each batch.
- End
Time string - The end time of the prefetch plan.
- Start
Time string - The start time of the prefetch plan.
- Interval int
- The time interval between each batch execution. Unit: seconds.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Slice
Len int - The number of URLs prefetched in each batch.
- End
Time string - The end time of the prefetch plan.
- Start
Time string - The start time of the prefetch plan.
- interval Integer
- The time interval between each batch execution. Unit: seconds.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- slice
Len Integer - The number of URLs prefetched in each batch.
- end
Time String - The end time of the prefetch plan.
- start
Time String - The start time of the prefetch plan.
- interval number
- The time interval between each batch execution. Unit: seconds.
- scheduled
Preload stringJob Id - The ID of the prefetch task.
- slice
Len number - The number of URLs prefetched in each batch.
- end
Time string - The end time of the prefetch plan.
- start
Time string - The start time of the prefetch plan.
- interval int
- The time interval between each batch execution. Unit: seconds.
- scheduled_
preload_ strjob_ id - The ID of the prefetch task.
- slice_
len int - The number of URLs prefetched in each batch.
- end_
time str - The end time of the prefetch plan.
- start_
time str - The start time of the prefetch plan.
- interval Number
- The time interval between each batch execution. Unit: seconds.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- slice
Len Number - The number of URLs prefetched in each batch.
- end
Time String - The end time of the prefetch plan.
- start
Time String - The start time of the prefetch plan.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledPreloadExecution resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Scheduled
Preload stringExecution Id - The ID of the prefetch plan.
- Status string
- The status of the prefetch plan, including the following statuses.
- Id string
- The provider-assigned unique ID for this managed resource.
- Scheduled
Preload stringExecution Id - The ID of the prefetch plan.
- Status string
- The status of the prefetch plan, including the following statuses.
- id String
- The provider-assigned unique ID for this managed resource.
- scheduled
Preload StringExecution Id - The ID of the prefetch plan.
- status String
- The status of the prefetch plan, including the following statuses.
- id string
- The provider-assigned unique ID for this managed resource.
- scheduled
Preload stringExecution Id - The ID of the prefetch plan.
- status string
- The status of the prefetch plan, including the following statuses.
- id str
- The provider-assigned unique ID for this managed resource.
- scheduled_
preload_ strexecution_ id - The ID of the prefetch plan.
- status str
- The status of the prefetch plan, including the following statuses.
- id String
- The provider-assigned unique ID for this managed resource.
- scheduled
Preload StringExecution Id - The ID of the prefetch plan.
- status String
- The status of the prefetch plan, including the following statuses.
Look up Existing ScheduledPreloadExecution Resource
Get an existing ScheduledPreloadExecution 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?: ScheduledPreloadExecutionState, opts?: CustomResourceOptions): ScheduledPreloadExecution
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
end_time: Optional[str] = None,
interval: Optional[int] = None,
scheduled_preload_execution_id: Optional[str] = None,
scheduled_preload_job_id: Optional[str] = None,
slice_len: Optional[int] = None,
start_time: Optional[str] = None,
status: Optional[str] = None) -> ScheduledPreloadExecution
func GetScheduledPreloadExecution(ctx *Context, name string, id IDInput, state *ScheduledPreloadExecutionState, opts ...ResourceOption) (*ScheduledPreloadExecution, error)
public static ScheduledPreloadExecution Get(string name, Input<string> id, ScheduledPreloadExecutionState? state, CustomResourceOptions? opts = null)
public static ScheduledPreloadExecution get(String name, Output<String> id, ScheduledPreloadExecutionState state, CustomResourceOptions options)
resources: _: type: alicloud:esa:ScheduledPreloadExecution 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.
- End
Time string - The end time of the prefetch plan.
- Interval int
- The time interval between each batch execution. Unit: seconds.
- Scheduled
Preload stringExecution Id - The ID of the prefetch plan.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Slice
Len int - The number of URLs prefetched in each batch.
- Start
Time string - The start time of the prefetch plan.
- Status string
- The status of the prefetch plan, including the following statuses.
- End
Time string - The end time of the prefetch plan.
- Interval int
- The time interval between each batch execution. Unit: seconds.
- Scheduled
Preload stringExecution Id - The ID of the prefetch plan.
- Scheduled
Preload stringJob Id - The ID of the prefetch task.
- Slice
Len int - The number of URLs prefetched in each batch.
- Start
Time string - The start time of the prefetch plan.
- Status string
- The status of the prefetch plan, including the following statuses.
- end
Time String - The end time of the prefetch plan.
- interval Integer
- The time interval between each batch execution. Unit: seconds.
- scheduled
Preload StringExecution Id - The ID of the prefetch plan.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- slice
Len Integer - The number of URLs prefetched in each batch.
- start
Time String - The start time of the prefetch plan.
- status String
- The status of the prefetch plan, including the following statuses.
- end
Time string - The end time of the prefetch plan.
- interval number
- The time interval between each batch execution. Unit: seconds.
- scheduled
Preload stringExecution Id - The ID of the prefetch plan.
- scheduled
Preload stringJob Id - The ID of the prefetch task.
- slice
Len number - The number of URLs prefetched in each batch.
- start
Time string - The start time of the prefetch plan.
- status string
- The status of the prefetch plan, including the following statuses.
- end_
time str - The end time of the prefetch plan.
- interval int
- The time interval between each batch execution. Unit: seconds.
- scheduled_
preload_ strexecution_ id - The ID of the prefetch plan.
- scheduled_
preload_ strjob_ id - The ID of the prefetch task.
- slice_
len int - The number of URLs prefetched in each batch.
- start_
time str - The start time of the prefetch plan.
- status str
- The status of the prefetch plan, including the following statuses.
- end
Time String - The end time of the prefetch plan.
- interval Number
- The time interval between each batch execution. Unit: seconds.
- scheduled
Preload StringExecution Id - The ID of the prefetch plan.
- scheduled
Preload StringJob Id - The ID of the prefetch task.
- slice
Len Number - The number of URLs prefetched in each batch.
- start
Time String - The start time of the prefetch plan.
- status String
- The status of the prefetch plan, including the following statuses.
Import
ESA Scheduled Preload Execution can be imported using the id, e.g.
$ pulumi import alicloud:esa/scheduledPreloadExecution:ScheduledPreloadExecution example <scheduled_preload_job_id>:<scheduled_preload_execution_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.