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

alicloud.apig.Environment

Explore with Pulumi AI

Provides a APIG Environment resource.

For information about APIG Environment and how to use it, see What is Environment.

NOTE: Available since v1.240.0.

Create Environment Resource

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

Constructor syntax

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

@overload
def Environment(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                environment_name: Optional[str] = None,
                gateway_id: Optional[str] = None,
                description: Optional[str] = None,
                resource_group_id: Optional[str] = None)
func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: alicloud:apig:Environment
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. EnvironmentArgs
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. EnvironmentArgs
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. EnvironmentArgs
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. EnvironmentArgs
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. EnvironmentArgs
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 environmentResource = new AliCloud.Apig.Environment("environmentResource", new()
{
    EnvironmentName = "string",
    GatewayId = "string",
    Description = "string",
    ResourceGroupId = "string",
});
Copy
example, err := apig.NewEnvironment(ctx, "environmentResource", &apig.EnvironmentArgs{
	EnvironmentName: pulumi.String("string"),
	GatewayId:       pulumi.String("string"),
	Description:     pulumi.String("string"),
	ResourceGroupId: pulumi.String("string"),
})
Copy
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
    .environmentName("string")
    .gatewayId("string")
    .description("string")
    .resourceGroupId("string")
    .build());
Copy
environment_resource = alicloud.apig.Environment("environmentResource",
    environment_name="string",
    gateway_id="string",
    description="string",
    resource_group_id="string")
Copy
const environmentResource = new alicloud.apig.Environment("environmentResource", {
    environmentName: "string",
    gatewayId: "string",
    description: "string",
    resourceGroupId: "string",
});
Copy
type: alicloud:apig:Environment
properties:
    description: string
    environmentName: string
    gatewayId: string
    resourceGroupId: string
Copy

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

EnvironmentName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource
GatewayId
This property is required.
Changes to this property will trigger replacement.
string
Gateway id
Description string
Description
ResourceGroupId string
The ID of the resource group
EnvironmentName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource
GatewayId
This property is required.
Changes to this property will trigger replacement.
string
Gateway id
Description string
Description
ResourceGroupId string
The ID of the resource group
environmentName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource
gatewayId
This property is required.
Changes to this property will trigger replacement.
String
Gateway id
description String
Description
resourceGroupId String
The ID of the resource group
environmentName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource
gatewayId
This property is required.
Changes to this property will trigger replacement.
string
Gateway id
description string
Description
resourceGroupId string
The ID of the resource group
environment_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource
gateway_id
This property is required.
Changes to this property will trigger replacement.
str
Gateway id
description str
Description
resource_group_id str
The ID of the resource group
environmentName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource
gatewayId
This property is required.
Changes to this property will trigger replacement.
String
Gateway id
description String
Description
resourceGroupId String
The ID of the resource group

Outputs

All input properties are implicitly available as output properties. Additionally, the Environment 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 Environment Resource

Get an existing Environment 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?: EnvironmentState, opts?: CustomResourceOptions): Environment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        environment_name: Optional[str] = None,
        gateway_id: Optional[str] = None,
        resource_group_id: Optional[str] = None) -> Environment
func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
public static Environment get(String name, Output<String> id, EnvironmentState state, CustomResourceOptions options)
resources:  _:    type: alicloud:apig:Environment    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
Description
EnvironmentName Changes to this property will trigger replacement. string
The name of the resource
GatewayId Changes to this property will trigger replacement. string
Gateway id
ResourceGroupId string
The ID of the resource group
Description string
Description
EnvironmentName Changes to this property will trigger replacement. string
The name of the resource
GatewayId Changes to this property will trigger replacement. string
Gateway id
ResourceGroupId string
The ID of the resource group
description String
Description
environmentName Changes to this property will trigger replacement. String
The name of the resource
gatewayId Changes to this property will trigger replacement. String
Gateway id
resourceGroupId String
The ID of the resource group
description string
Description
environmentName Changes to this property will trigger replacement. string
The name of the resource
gatewayId Changes to this property will trigger replacement. string
Gateway id
resourceGroupId string
The ID of the resource group
description str
Description
environment_name Changes to this property will trigger replacement. str
The name of the resource
gateway_id Changes to this property will trigger replacement. str
Gateway id
resource_group_id str
The ID of the resource group
description String
Description
environmentName Changes to this property will trigger replacement. String
The name of the resource
gatewayId Changes to this property will trigger replacement. String
Gateway id
resourceGroupId String
The ID of the resource group

Import

APIG Environment can be imported using the id, e.g.

$ pulumi import alicloud:apig/environment:Environment 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.