1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. expressconnect
  5. EcFailoverTestJob
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.expressconnect.EcFailoverTestJob

Explore with Pulumi AI

Provides a Express Connect Ec Failover Test Job resource. Express Connect Failover Test Job.

For information about Express Connect Ec Failover Test Job and how to use it, see What is Ec Failover Test Job.

NOTE: Available since v1.215.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.expressconnect.getPhysicalConnections({
    nameRegex: "preserved-NODELETING",
});
const defaultEcFailoverTestJob = new alicloud.expressconnect.EcFailoverTestJob("default", {
    description: name,
    jobType: "StartNow",
    resourceIds: [
        _default.then(_default => _default.ids?.[0]),
        _default.then(_default => _default.ids?.[1]),
    ],
    jobDuration: 1,
    resourceType: "PHYSICALCONNECTION",
    ecFailoverTestJobName: name,
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.expressconnect.get_physical_connections(name_regex="preserved-NODELETING")
default_ec_failover_test_job = alicloud.expressconnect.EcFailoverTestJob("default",
    description=name,
    job_type="StartNow",
    resource_ids=[
        default.ids[0],
        default.ids[1],
    ],
    job_duration=1,
    resource_type="PHYSICALCONNECTION",
    ec_failover_test_job_name=name)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := expressconnect.GetPhysicalConnections(ctx, &expressconnect.GetPhysicalConnectionsArgs{
			NameRegex: pulumi.StringRef("preserved-NODELETING"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = expressconnect.NewEcFailoverTestJob(ctx, "default", &expressconnect.EcFailoverTestJobArgs{
			Description: pulumi.String(name),
			JobType:     pulumi.String("StartNow"),
			ResourceIds: pulumi.StringArray{
				pulumi.String(_default.Ids[0]),
				pulumi.String(_default.Ids[1]),
			},
			JobDuration:           pulumi.Int(1),
			ResourceType:          pulumi.String("PHYSICALCONNECTION"),
			EcFailoverTestJobName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var @default = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
    {
        NameRegex = "preserved-NODELETING",
    });

    var defaultEcFailoverTestJob = new AliCloud.ExpressConnect.EcFailoverTestJob("default", new()
    {
        Description = name,
        JobType = "StartNow",
        ResourceIds = new[]
        {
            @default.Apply(@default => @default.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Ids[0])),
            @default.Apply(@default => @default.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Ids[1])),
        },
        JobDuration = 1,
        ResourceType = "PHYSICALCONNECTION",
        EcFailoverTestJobName = name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs;
import com.pulumi.alicloud.expressconnect.EcFailoverTestJob;
import com.pulumi.alicloud.expressconnect.EcFailoverTestJobArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var default = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder()
            .nameRegex("preserved-NODELETING")
            .build());

        var defaultEcFailoverTestJob = new EcFailoverTestJob("defaultEcFailoverTestJob", EcFailoverTestJobArgs.builder()
            .description(name)
            .jobType("StartNow")
            .resourceIds(            
                default_.ids()[0],
                default_.ids()[1])
            .jobDuration("1")
            .resourceType("PHYSICALCONNECTION")
            .ecFailoverTestJobName(name)
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  defaultEcFailoverTestJob:
    type: alicloud:expressconnect:EcFailoverTestJob
    name: default
    properties:
      description: ${name}
      jobType: StartNow
      resourceIds:
        - ${default.ids[0]}
        - ${default.ids[1]}
      jobDuration: '1'
      resourceType: PHYSICALCONNECTION
      ecFailoverTestJobName: ${name}
variables:
  default:
    fn::invoke:
      function: alicloud:expressconnect:getPhysicalConnections
      arguments:
        nameRegex: preserved-NODELETING
Copy

Create EcFailoverTestJob Resource

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

Constructor syntax

new EcFailoverTestJob(name: string, args: EcFailoverTestJobArgs, opts?: CustomResourceOptions);
@overload
def EcFailoverTestJob(resource_name: str,
                      args: EcFailoverTestJobArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def EcFailoverTestJob(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      job_duration: Optional[int] = None,
                      job_type: Optional[str] = None,
                      resource_ids: Optional[Sequence[str]] = None,
                      resource_type: Optional[str] = None,
                      description: Optional[str] = None,
                      ec_failover_test_job_name: Optional[str] = None,
                      status: Optional[str] = None)
func NewEcFailoverTestJob(ctx *Context, name string, args EcFailoverTestJobArgs, opts ...ResourceOption) (*EcFailoverTestJob, error)
public EcFailoverTestJob(string name, EcFailoverTestJobArgs args, CustomResourceOptions? opts = null)
public EcFailoverTestJob(String name, EcFailoverTestJobArgs args)
public EcFailoverTestJob(String name, EcFailoverTestJobArgs args, CustomResourceOptions options)
type: alicloud:expressconnect:EcFailoverTestJob
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EcFailoverTestJobArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EcFailoverTestJobArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EcFailoverTestJobArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EcFailoverTestJobArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EcFailoverTestJobArgs
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 ecFailoverTestJobResource = new AliCloud.ExpressConnect.EcFailoverTestJob("ecFailoverTestJobResource", new()
{
    JobDuration = 0,
    JobType = "string",
    ResourceIds = new[]
    {
        "string",
    },
    ResourceType = "string",
    Description = "string",
    EcFailoverTestJobName = "string",
    Status = "string",
});
Copy
example, err := expressconnect.NewEcFailoverTestJob(ctx, "ecFailoverTestJobResource", &expressconnect.EcFailoverTestJobArgs{
	JobDuration: pulumi.Int(0),
	JobType:     pulumi.String("string"),
	ResourceIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ResourceType:          pulumi.String("string"),
	Description:           pulumi.String("string"),
	EcFailoverTestJobName: pulumi.String("string"),
	Status:                pulumi.String("string"),
})
Copy
var ecFailoverTestJobResource = new EcFailoverTestJob("ecFailoverTestJobResource", EcFailoverTestJobArgs.builder()
    .jobDuration(0)
    .jobType("string")
    .resourceIds("string")
    .resourceType("string")
    .description("string")
    .ecFailoverTestJobName("string")
    .status("string")
    .build());
Copy
ec_failover_test_job_resource = alicloud.expressconnect.EcFailoverTestJob("ecFailoverTestJobResource",
    job_duration=0,
    job_type="string",
    resource_ids=["string"],
    resource_type="string",
    description="string",
    ec_failover_test_job_name="string",
    status="string")
Copy
const ecFailoverTestJobResource = new alicloud.expressconnect.EcFailoverTestJob("ecFailoverTestJobResource", {
    jobDuration: 0,
    jobType: "string",
    resourceIds: ["string"],
    resourceType: "string",
    description: "string",
    ecFailoverTestJobName: "string",
    status: "string",
});
Copy
type: alicloud:expressconnect:EcFailoverTestJob
properties:
    description: string
    ecFailoverTestJobName: string
    jobDuration: 0
    jobType: string
    resourceIds:
        - string
    resourceType: string
    status: string
Copy

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

JobDuration This property is required. int
Job duration.
JobType
This property is required.
Changes to this property will trigger replacement.
string
Job type.
ResourceIds This property is required. List<string>
Resource id list.
ResourceType
This property is required.
Changes to this property will trigger replacement.
string
Resource type.
Description string
Job description.
EcFailoverTestJobName string
Job name.
Status string
The status of the resource.
JobDuration This property is required. int
Job duration.
JobType
This property is required.
Changes to this property will trigger replacement.
string
Job type.
ResourceIds This property is required. []string
Resource id list.
ResourceType
This property is required.
Changes to this property will trigger replacement.
string
Resource type.
Description string
Job description.
EcFailoverTestJobName string
Job name.
Status string
The status of the resource.
jobDuration This property is required. Integer
Job duration.
jobType
This property is required.
Changes to this property will trigger replacement.
String
Job type.
resourceIds This property is required. List<String>
Resource id list.
resourceType
This property is required.
Changes to this property will trigger replacement.
String
Resource type.
description String
Job description.
ecFailoverTestJobName String
Job name.
status String
The status of the resource.
jobDuration This property is required. number
Job duration.
jobType
This property is required.
Changes to this property will trigger replacement.
string
Job type.
resourceIds This property is required. string[]
Resource id list.
resourceType
This property is required.
Changes to this property will trigger replacement.
string
Resource type.
description string
Job description.
ecFailoverTestJobName string
Job name.
status string
The status of the resource.
job_duration This property is required. int
Job duration.
job_type
This property is required.
Changes to this property will trigger replacement.
str
Job type.
resource_ids This property is required. Sequence[str]
Resource id list.
resource_type
This property is required.
Changes to this property will trigger replacement.
str
Resource type.
description str
Job description.
ec_failover_test_job_name str
Job name.
status str
The status of the resource.
jobDuration This property is required. Number
Job duration.
jobType
This property is required.
Changes to this property will trigger replacement.
String
Job type.
resourceIds This property is required. List<String>
Resource id list.
resourceType
This property is required.
Changes to this property will trigger replacement.
String
Resource type.
description String
Job description.
ecFailoverTestJobName String
Job name.
status String
The status of the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing EcFailoverTestJob Resource

Get an existing EcFailoverTestJob 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?: EcFailoverTestJobState, opts?: CustomResourceOptions): EcFailoverTestJob
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        ec_failover_test_job_name: Optional[str] = None,
        job_duration: Optional[int] = None,
        job_type: Optional[str] = None,
        resource_ids: Optional[Sequence[str]] = None,
        resource_type: Optional[str] = None,
        status: Optional[str] = None) -> EcFailoverTestJob
func GetEcFailoverTestJob(ctx *Context, name string, id IDInput, state *EcFailoverTestJobState, opts ...ResourceOption) (*EcFailoverTestJob, error)
public static EcFailoverTestJob Get(string name, Input<string> id, EcFailoverTestJobState? state, CustomResourceOptions? opts = null)
public static EcFailoverTestJob get(String name, Output<String> id, EcFailoverTestJobState state, CustomResourceOptions options)
resources:  _:    type: alicloud:expressconnect:EcFailoverTestJob    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
Job description.
EcFailoverTestJobName string
Job name.
JobDuration int
Job duration.
JobType Changes to this property will trigger replacement. string
Job type.
ResourceIds List<string>
Resource id list.
ResourceType Changes to this property will trigger replacement. string
Resource type.
Status string
The status of the resource.
Description string
Job description.
EcFailoverTestJobName string
Job name.
JobDuration int
Job duration.
JobType Changes to this property will trigger replacement. string
Job type.
ResourceIds []string
Resource id list.
ResourceType Changes to this property will trigger replacement. string
Resource type.
Status string
The status of the resource.
description String
Job description.
ecFailoverTestJobName String
Job name.
jobDuration Integer
Job duration.
jobType Changes to this property will trigger replacement. String
Job type.
resourceIds List<String>
Resource id list.
resourceType Changes to this property will trigger replacement. String
Resource type.
status String
The status of the resource.
description string
Job description.
ecFailoverTestJobName string
Job name.
jobDuration number
Job duration.
jobType Changes to this property will trigger replacement. string
Job type.
resourceIds string[]
Resource id list.
resourceType Changes to this property will trigger replacement. string
Resource type.
status string
The status of the resource.
description str
Job description.
ec_failover_test_job_name str
Job name.
job_duration int
Job duration.
job_type Changes to this property will trigger replacement. str
Job type.
resource_ids Sequence[str]
Resource id list.
resource_type Changes to this property will trigger replacement. str
Resource type.
status str
The status of the resource.
description String
Job description.
ecFailoverTestJobName String
Job name.
jobDuration Number
Job duration.
jobType Changes to this property will trigger replacement. String
Job type.
resourceIds List<String>
Resource id list.
resourceType Changes to this property will trigger replacement. String
Resource type.
status String
The status of the resource.

Import

Express Connect Ec Failover Test Job can be imported using the id, e.g.

$ pulumi import alicloud:expressconnect/ecFailoverTestJob:EcFailoverTestJob example <id>
Copy

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.