UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

207 lines (206 loc) 7.49 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * ## Example Usage * ### Publish a new version of the API * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const instanceId = config.requireObject("instanceId"); * const envId = config.requireObject("envId"); * const apiId = config.requireObject("apiId"); * const _default = new huaweicloud.dedicatedapig.ApiPublishment("default", { * instanceId: instanceId, * envId: envId, * apiId: apiId, * }); * ``` * ### Switch to a specified version of the API which is published * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const instanceId = config.requireObject("instanceId"); * const envId = config.requireObject("envId"); * const apiId = config.requireObject("apiId"); * const versionId = config.requireObject("versionId"); * const _default = new huaweicloud.dedicatedapig.ApiPublishment("default", { * instanceId: instanceId, * envId: envId, * apiId: apiId, * versionId: versionId, * }); * ``` * * ## Import * * The publishments can be imported using their related `instance_id`, `env_id` and `api_id`, separated by slashes, e.g. * * ```sh * $ pulumi import huaweicloud:DedicatedApig/apiPublishment:ApiPublishment test <instance_id>/<env_id>/<api_id> * ``` */ export declare class ApiPublishment extends pulumi.CustomResource { /** * Get an existing ApiPublishment 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?: ApiPublishmentState, opts?: pulumi.CustomResourceOptions): ApiPublishment; /** * Returns true if the given object is an instance of ApiPublishment. 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 ApiPublishment; /** * Specifies the ID of the API to be published or already published. * Changing this will create a new resource. */ readonly apiId: pulumi.Output<string>; /** * Specifies the description of the current publishment. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies the ID of the environmentto which the current version of the API * will be published or has been published. * Changing this will create a new resource. */ readonly envId: pulumi.Output<string>; /** * The name of the environment to which the current version of the API is published. */ readonly envName: pulumi.Output<string>; /** * All publish informations of the API. * The object structure is documented below. */ readonly histories: pulumi.Output<outputs.DedicatedApig.ApiPublishmentHistory[]>; /** * Specifies an ID of the APIG dedicated instance to which the API belongs * to. Changing this will create a new publishment resource. */ readonly instanceId: pulumi.Output<string>; /** * The publish ID of the API in current environment. */ readonly publishId: pulumi.Output<string>; /** * Time when the current version was published. */ readonly publishedAt: pulumi.Output<string>; /** * Specifies the region in which to publish APIs. * If omitted, the provider-level region will be used. * Changing this will create a new resource. */ readonly region: pulumi.Output<string>; /** * Specifies the version ID of the current publishment. */ readonly versionId: pulumi.Output<string | undefined>; /** * Create a ApiPublishment 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: ApiPublishmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ApiPublishment resources. */ export interface ApiPublishmentState { /** * Specifies the ID of the API to be published or already published. * Changing this will create a new resource. */ apiId?: pulumi.Input<string>; /** * Specifies the description of the current publishment. */ description?: pulumi.Input<string>; /** * Specifies the ID of the environmentto which the current version of the API * will be published or has been published. * Changing this will create a new resource. */ envId?: pulumi.Input<string>; /** * The name of the environment to which the current version of the API is published. */ envName?: pulumi.Input<string>; /** * All publish informations of the API. * The object structure is documented below. */ histories?: pulumi.Input<pulumi.Input<inputs.DedicatedApig.ApiPublishmentHistory>[]>; /** * Specifies an ID of the APIG dedicated instance to which the API belongs * to. Changing this will create a new publishment resource. */ instanceId?: pulumi.Input<string>; /** * The publish ID of the API in current environment. */ publishId?: pulumi.Input<string>; /** * Time when the current version was published. */ publishedAt?: pulumi.Input<string>; /** * Specifies the region in which to publish APIs. * If omitted, the provider-level region will be used. * Changing this will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the version ID of the current publishment. */ versionId?: pulumi.Input<string>; } /** * The set of arguments for constructing a ApiPublishment resource. */ export interface ApiPublishmentArgs { /** * Specifies the ID of the API to be published or already published. * Changing this will create a new resource. */ apiId: pulumi.Input<string>; /** * Specifies the description of the current publishment. */ description?: pulumi.Input<string>; /** * Specifies the ID of the environmentto which the current version of the API * will be published or has been published. * Changing this will create a new resource. */ envId: pulumi.Input<string>; /** * Specifies an ID of the APIG dedicated instance to which the API belongs * to. Changing this will create a new publishment resource. */ instanceId: pulumi.Input<string>; /** * Specifies the region in which to publish APIs. * If omitted, the provider-level region will be used. * Changing this will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the version ID of the current publishment. */ versionId?: pulumi.Input<string>; }