UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

223 lines (222 loc) 7.44 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage traffic mirror target * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", { * securityGroupName: "acc-test-sg", * vpcId: fooVpc.id, * }); * const fooImages = volcengine.ecs.getImages({ * osType: "Linux", * visibility: "public", * instanceTypeId: "ecs.g3il.large", * }); * const fooInstance = new volcengine.ecs.Instance("fooInstance", { * instanceName: "acc-test-ecs", * description: "acc-test", * hostName: "tf-acc-test", * imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId), * instanceType: "ecs.g3il.large", * password: "93f0cb0614Aab12", * instanceChargeType: "PostPaid", * systemVolumeType: "ESSD_PL0", * systemVolumeSize: 40, * subnetId: fooSubnet.id, * securityGroupIds: [fooSecurityGroup.id], * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }); * const fooNetworkInterface = new volcengine.vpc.NetworkInterface("fooNetworkInterface", { * networkInterfaceName: "acc-test-eni", * description: "acc-test", * subnetId: fooSubnet.id, * securityGroupIds: [fooSecurityGroup.id], * primaryIpAddress: "172.16.0.253", * portSecurityEnabled: false, * privateIpAddresses: ["172.16.0.2"], * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }); * const fooNetworkInterfaceAttach = new volcengine.vpc.NetworkInterfaceAttach("fooNetworkInterfaceAttach", { * networkInterfaceId: fooNetworkInterface.id, * instanceId: fooInstance.id, * }); * const fooTrafficMirrorTarget = new volcengine.vpc.TrafficMirrorTarget("fooTrafficMirrorTarget", { * instanceType: "NetworkInterface", * instanceId: fooNetworkInterface.id, * trafficMirrorTargetName: "acc-test-traffic-mirror-target", * description: "acc-test", * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }, { * dependsOn: [fooNetworkInterfaceAttach], * }); * ``` * * ## Import * * TrafficMirrorTarget can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:vpc/trafficMirrorTarget:TrafficMirrorTarget default resource_id * ``` */ export declare class TrafficMirrorTarget extends pulumi.CustomResource { /** * Get an existing TrafficMirrorTarget resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TrafficMirrorTargetState, opts?: pulumi.CustomResourceOptions): TrafficMirrorTarget; /** * Returns true if the given object is an instance of TrafficMirrorTarget. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TrafficMirrorTarget; /** * The create time of traffic mirror target. */ readonly createdAt: pulumi.Output<string>; /** * The description of traffic mirror target. */ readonly description: pulumi.Output<string | undefined>; /** * The instance id of traffic mirror target. */ readonly instanceId: pulumi.Output<string>; /** * The instance type of traffic mirror target. Valid values: `NetworkInterface`, `ClbInstance`. */ readonly instanceType: pulumi.Output<string>; /** * The project name of traffic mirror target. */ readonly projectName: pulumi.Output<string>; /** * The status of traffic mirror target. */ readonly status: pulumi.Output<string>; /** * Tags. */ readonly tags: pulumi.Output<outputs.vpc.TrafficMirrorTargetTag[] | undefined>; /** * The name of traffic mirror target. */ readonly trafficMirrorTargetName: pulumi.Output<string>; /** * The update time of traffic mirror target. */ readonly updatedAt: pulumi.Output<string>; /** * Create a TrafficMirrorTarget resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TrafficMirrorTargetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TrafficMirrorTarget resources. */ export interface TrafficMirrorTargetState { /** * The create time of traffic mirror target. */ createdAt?: pulumi.Input<string>; /** * The description of traffic mirror target. */ description?: pulumi.Input<string>; /** * The instance id of traffic mirror target. */ instanceId?: pulumi.Input<string>; /** * The instance type of traffic mirror target. Valid values: `NetworkInterface`, `ClbInstance`. */ instanceType?: pulumi.Input<string>; /** * The project name of traffic mirror target. */ projectName?: pulumi.Input<string>; /** * The status of traffic mirror target. */ status?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.vpc.TrafficMirrorTargetTag>[]>; /** * The name of traffic mirror target. */ trafficMirrorTargetName?: pulumi.Input<string>; /** * The update time of traffic mirror target. */ updatedAt?: pulumi.Input<string>; } /** * The set of arguments for constructing a TrafficMirrorTarget resource. */ export interface TrafficMirrorTargetArgs { /** * The description of traffic mirror target. */ description?: pulumi.Input<string>; /** * The instance id of traffic mirror target. */ instanceId: pulumi.Input<string>; /** * The instance type of traffic mirror target. Valid values: `NetworkInterface`, `ClbInstance`. */ instanceType: pulumi.Input<string>; /** * The project name of traffic mirror target. */ projectName?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.vpc.TrafficMirrorTargetTag>[]>; /** * The name of traffic mirror target. */ trafficMirrorTargetName?: pulumi.Input<string>; }