opentelekomcloud.ApigwEnvironmentVariableV2
Explore with Pulumi AI
Up-to-date reference of API arguments for API Gateway environment variable service you can get at documentation portal
Manages an APIGW environment variable resource within OpenTelekomCloud.
A maximum of
50
variables can be created on the same environment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const gatewayId = config.requireObject("gatewayId");
const environmentId = config.requireObject("environmentId");
const groupId = config.requireObject("groupId");
const variableName = config.requireObject("variableName");
const variableValue = config.requireObject("variableValue");
const _var = new opentelekomcloud.ApigwEnvironmentVariableV2("var", {
gatewayId: gatewayId,
environmentId: environmentId,
groupId: groupId,
value: variableValue,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
gateway_id = config.require_object("gatewayId")
environment_id = config.require_object("environmentId")
group_id = config.require_object("groupId")
variable_name = config.require_object("variableName")
variable_value = config.require_object("variableValue")
var = opentelekomcloud.ApigwEnvironmentVariableV2("var",
gateway_id=gateway_id,
environment_id=environment_id,
group_id=group_id,
value=variable_value)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"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, "")
gatewayId := cfg.RequireObject("gatewayId")
environmentId := cfg.RequireObject("environmentId")
groupId := cfg.RequireObject("groupId")
variableName := cfg.RequireObject("variableName")
variableValue := cfg.RequireObject("variableValue")
_, err := opentelekomcloud.NewApigwEnvironmentVariableV2(ctx, "var", &opentelekomcloud.ApigwEnvironmentVariableV2Args{
GatewayId: pulumi.Any(gatewayId),
EnvironmentId: pulumi.Any(environmentId),
GroupId: pulumi.Any(groupId),
Value: pulumi.Any(variableValue),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var gatewayId = config.RequireObject<dynamic>("gatewayId");
var environmentId = config.RequireObject<dynamic>("environmentId");
var groupId = config.RequireObject<dynamic>("groupId");
var variableName = config.RequireObject<dynamic>("variableName");
var variableValue = config.RequireObject<dynamic>("variableValue");
var @var = new Opentelekomcloud.ApigwEnvironmentVariableV2("var", new()
{
GatewayId = gatewayId,
EnvironmentId = environmentId,
GroupId = groupId,
Value = variableValue,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwEnvironmentVariableV2;
import com.pulumi.opentelekomcloud.ApigwEnvironmentVariableV2Args;
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 gatewayId = config.get("gatewayId");
final var environmentId = config.get("environmentId");
final var groupId = config.get("groupId");
final var variableName = config.get("variableName");
final var variableValue = config.get("variableValue");
var var_ = new ApigwEnvironmentVariableV2("var", ApigwEnvironmentVariableV2Args.builder()
.gatewayId(gatewayId)
.environmentId(environmentId)
.groupId(groupId)
.value(variableValue)
.build());
}
}
configuration:
gatewayId:
type: dynamic
environmentId:
type: dynamic
groupId:
type: dynamic
variableName:
type: dynamic
variableValue:
type: dynamic
resources:
var:
type: opentelekomcloud:ApigwEnvironmentVariableV2
properties:
gatewayId: ${gatewayId}
environmentId: ${environmentId}
groupId: ${groupId}
value: ${variableValue}
Create ApigwEnvironmentVariableV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApigwEnvironmentVariableV2(name: string, args: ApigwEnvironmentVariableV2Args, opts?: CustomResourceOptions);
@overload
def ApigwEnvironmentVariableV2(resource_name: str,
args: ApigwEnvironmentVariableV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def ApigwEnvironmentVariableV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
environment_id: Optional[str] = None,
gateway_id: Optional[str] = None,
group_id: Optional[str] = None,
value: Optional[str] = None,
apigw_environment_variable_v2_id: Optional[str] = None,
name: Optional[str] = None)
func NewApigwEnvironmentVariableV2(ctx *Context, name string, args ApigwEnvironmentVariableV2Args, opts ...ResourceOption) (*ApigwEnvironmentVariableV2, error)
public ApigwEnvironmentVariableV2(string name, ApigwEnvironmentVariableV2Args args, CustomResourceOptions? opts = null)
public ApigwEnvironmentVariableV2(String name, ApigwEnvironmentVariableV2Args args)
public ApigwEnvironmentVariableV2(String name, ApigwEnvironmentVariableV2Args args, CustomResourceOptions options)
type: opentelekomcloud:ApigwEnvironmentVariableV2
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 ApigwEnvironmentVariableV2Args
- 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 ApigwEnvironmentVariableV2Args
- 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 ApigwEnvironmentVariableV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApigwEnvironmentVariableV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApigwEnvironmentVariableV2Args
- 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 apigwEnvironmentVariableV2Resource = new Opentelekomcloud.ApigwEnvironmentVariableV2("apigwEnvironmentVariableV2Resource", new()
{
EnvironmentId = "string",
GatewayId = "string",
GroupId = "string",
Value = "string",
ApigwEnvironmentVariableV2Id = "string",
Name = "string",
});
example, err := opentelekomcloud.NewApigwEnvironmentVariableV2(ctx, "apigwEnvironmentVariableV2Resource", &opentelekomcloud.ApigwEnvironmentVariableV2Args{
EnvironmentId: pulumi.String("string"),
GatewayId: pulumi.String("string"),
GroupId: pulumi.String("string"),
Value: pulumi.String("string"),
ApigwEnvironmentVariableV2Id: pulumi.String("string"),
Name: pulumi.String("string"),
})
var apigwEnvironmentVariableV2Resource = new ApigwEnvironmentVariableV2("apigwEnvironmentVariableV2Resource", ApigwEnvironmentVariableV2Args.builder()
.environmentId("string")
.gatewayId("string")
.groupId("string")
.value("string")
.apigwEnvironmentVariableV2Id("string")
.name("string")
.build());
apigw_environment_variable_v2_resource = opentelekomcloud.ApigwEnvironmentVariableV2("apigwEnvironmentVariableV2Resource",
environment_id="string",
gateway_id="string",
group_id="string",
value="string",
apigw_environment_variable_v2_id="string",
name="string")
const apigwEnvironmentVariableV2Resource = new opentelekomcloud.ApigwEnvironmentVariableV2("apigwEnvironmentVariableV2Resource", {
environmentId: "string",
gatewayId: "string",
groupId: "string",
value: "string",
apigwEnvironmentVariableV2Id: "string",
name: "string",
});
type: opentelekomcloud:ApigwEnvironmentVariableV2
properties:
apigwEnvironmentVariableV2Id: string
environmentId: string
gatewayId: string
groupId: string
name: string
value: string
ApigwEnvironmentVariableV2 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 ApigwEnvironmentVariableV2 resource accepts the following input properties:
- Environment
Id string - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- Gateway
Id string - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- Group
Id string - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- Value string
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource. - Apigw
Environment stringVariable V2Id - The resource ID.
- Name string
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource.
- Environment
Id string - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- Gateway
Id string - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- Group
Id string - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- Value string
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource. - Apigw
Environment stringVariable V2Id - The resource ID.
- Name string
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource.
- environment
Id String - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway
Id String - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group
Id String - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- value String
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource. - apigw
Environment StringVariable V2Id - The resource ID.
- name String
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource.
- environment
Id string - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway
Id string - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group
Id string - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- value string
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource. - apigw
Environment stringVariable V2Id - The resource ID.
- name string
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource.
- environment_
id str - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway_
id str - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group_
id str - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- value str
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource. - apigw_
environment_ strvariable_ v2_ id - The resource ID.
- name str
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource.
- environment
Id String - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway
Id String - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group
Id String - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- value String
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource. - apigw
Environment StringVariable V2Id - The resource ID.
- name String
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApigwEnvironmentVariableV2 resource produces the following output properties:
Look up Existing ApigwEnvironmentVariableV2 Resource
Get an existing ApigwEnvironmentVariableV2 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?: ApigwEnvironmentVariableV2State, opts?: CustomResourceOptions): ApigwEnvironmentVariableV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apigw_environment_variable_v2_id: Optional[str] = None,
environment_id: Optional[str] = None,
gateway_id: Optional[str] = None,
group_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
value: Optional[str] = None) -> ApigwEnvironmentVariableV2
func GetApigwEnvironmentVariableV2(ctx *Context, name string, id IDInput, state *ApigwEnvironmentVariableV2State, opts ...ResourceOption) (*ApigwEnvironmentVariableV2, error)
public static ApigwEnvironmentVariableV2 Get(string name, Input<string> id, ApigwEnvironmentVariableV2State? state, CustomResourceOptions? opts = null)
public static ApigwEnvironmentVariableV2 get(String name, Output<String> id, ApigwEnvironmentVariableV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:ApigwEnvironmentVariableV2 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.
- Apigw
Environment stringVariable V2Id - The resource ID.
- Environment
Id string - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- Gateway
Id string - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- Group
Id string - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- Name string
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource. - Region string
- The region where the dedicated instance is located.
- Value string
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource.
- Apigw
Environment stringVariable V2Id - The resource ID.
- Environment
Id string - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- Gateway
Id string - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- Group
Id string - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- Name string
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource. - Region string
- The region where the dedicated instance is located.
- Value string
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource.
- apigw
Environment StringVariable V2Id - The resource ID.
- environment
Id String - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway
Id String - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group
Id String - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- name String
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource. - region String
- The region where the dedicated instance is located.
- value String
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource.
- apigw
Environment stringVariable V2Id - The resource ID.
- environment
Id string - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway
Id string - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group
Id string - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- name string
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource. - region string
- The region where the dedicated instance is located.
- value string
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource.
- apigw_
environment_ strvariable_ v2_ id - The resource ID.
- environment_
id str - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway_
id str - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group_
id str - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- name str
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource. - region str
- The region where the dedicated instance is located.
- value str
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource.
- apigw
Environment StringVariable V2Id - The resource ID.
- environment
Id String - Specifies the ID of the environment to which the environment variable belongs. Changing this creates a new resource.
- gateway
Id String - Specifies the ID of the dedicated gateway instance to which the environment variable belongs. Changing this creates a new resource.
- group
Id String - Specifies the ID of the group to which the environment variable belongs. Changing this creates a new resource.
- name String
- Specifies the name of the environment variable.
The valid length is limited from
3
to32
characters. Only letters, digits, hyphens-
, and underscores_
are allowed, and must start with a letter. In the definition of an API, thename
(case-sensitive
) indicates a variable, for example,#Name#
. It is replaced by the actual value when the API is published in an environment. The variable name must be unique. Changing this creates a new resource. - region String
- The region where the dedicated instance is located.
- value String
- Specifies the value of the environment variable.
The valid length is limited from
1
to255
characters. Only letters, digits and special characters_-/.:
are allowed. Changing this creates a new resource.
Import
The resource can be imported using gateway_id
, group_id
and name
, separated by slashes (/), e.g.
bash
$ pulumi import opentelekomcloud:index/apigwEnvironmentVariableV2:ApigwEnvironmentVariableV2 test <gateway_id>/<group_id>/<name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.