@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
184 lines (183 loc) • 7.11 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages an environment resource within HuaweiCloud ServiceStage.
*
* ## Example Usage
* ### Create an environment based on some cce clusters
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const envName = config.requireObject("envName");
* const vpcId = config.requireObject("vpcId");
* const cceClusterId = config.requireObject("cceClusterId");
* const cciNamespaceName = config.requireObject("cciNamespaceName");
* const test = new huaweicloud.servicestage.Environment("test", {
* vpcId: vpcId,
* basicResources: [
* {
* type: "cce",
* id: cceClusterId,
* },
* {
* type: "cci",
* id: cciNamespaceName,
* },
* ],
* });
* ```
*
* ## Import
*
* Environments can be imported using their `id`, e.g.bash
*
* ```sh
* $ pulumi import huaweicloud:ServiceStage/environment:Environment test 17383329-b686-47e4-8f70-0d8dcddb65e9
* ```
*/
export declare class Environment extends pulumi.CustomResource {
/**
* Get an existing Environment 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?: EnvironmentState, opts?: pulumi.CustomResourceOptions): Environment;
/**
* Returns true if the given object is an instance of Environment. 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 Environment;
/**
* Specifies the basic resources.
* The object structure is documented below.
*/
readonly basicResources: pulumi.Output<outputs.ServiceStage.EnvironmentBasicResource[]>;
/**
* Specifies the environment description.
* The description can contain a maximum of `128` characters.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the enterprise project ID to which the application
* belongs. Changing this will create a new resource.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Specifies the environment name.
* The name can contain of `2` to `64` characters, only letters, digits, hyphens (-) and underscores (_) are allowed.
* The name must start with a letter and end with a letter or a digit.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the optional resources.
* The object structure is documented below.
*/
readonly optionalResources: pulumi.Output<outputs.ServiceStage.EnvironmentOptionalResource[] | undefined>;
/**
* Specifies the region in which to create the ServiceStage environment.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the VPC ID to which the environment belongs.
* Changing this will create a new resource.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Create a Environment 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: EnvironmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Environment resources.
*/
export interface EnvironmentState {
/**
* Specifies the basic resources.
* The object structure is documented below.
*/
basicResources?: pulumi.Input<pulumi.Input<inputs.ServiceStage.EnvironmentBasicResource>[]>;
/**
* Specifies the environment description.
* The description can contain a maximum of `128` characters.
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID to which the application
* belongs. Changing this will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the environment name.
* The name can contain of `2` to `64` characters, only letters, digits, hyphens (-) and underscores (_) are allowed.
* The name must start with a letter and end with a letter or a digit.
*/
name?: pulumi.Input<string>;
/**
* Specifies the optional resources.
* The object structure is documented below.
*/
optionalResources?: pulumi.Input<pulumi.Input<inputs.ServiceStage.EnvironmentOptionalResource>[]>;
/**
* Specifies the region in which to create the ServiceStage environment.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the VPC ID to which the environment belongs.
* Changing this will create a new resource.
*/
vpcId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Environment resource.
*/
export interface EnvironmentArgs {
/**
* Specifies the basic resources.
* The object structure is documented below.
*/
basicResources: pulumi.Input<pulumi.Input<inputs.ServiceStage.EnvironmentBasicResource>[]>;
/**
* Specifies the environment description.
* The description can contain a maximum of `128` characters.
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID to which the application
* belongs. Changing this will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the environment name.
* The name can contain of `2` to `64` characters, only letters, digits, hyphens (-) and underscores (_) are allowed.
* The name must start with a letter and end with a letter or a digit.
*/
name?: pulumi.Input<string>;
/**
* Specifies the optional resources.
* The object structure is documented below.
*/
optionalResources?: pulumi.Input<pulumi.Input<inputs.ServiceStage.EnvironmentOptionalResource>[]>;
/**
* Specifies the region in which to create the ServiceStage environment.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the VPC ID to which the environment belongs.
* Changing this will create a new resource.
*/
vpcId: pulumi.Input<string>;
}