alicloud.bp.StudioApplication
Explore with Pulumi AI
Provides a Cloud Architect Design Tools Application resource.
For information about Cloud Architect Design Tools Application and how to use it, see What is Application.
NOTE: Available in v1.192.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const default = alicloud.resourcemanager.getResourceGroups({});
const defaultGetInstances = alicloud.ecs.getInstances({
status: "Running",
});
const defaultStudioApplication = new alicloud.bp.StudioApplication("default", {
applicationName: name,
templateId: "YAUUQIYRSV1CMFGX",
resourceGroupId: _default.then(_default => _default.groups?.[0]?.id),
areaId: "cn-hangzhou",
instances: [{
id: "data.alicloud_instances.default.instances.0.id",
nodeName: "data.alicloud_instances.default.instances.0.name",
nodeType: "ecs",
}],
configuration: {
enableMonitor: "1",
},
variables: {
test: "1",
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.resourcemanager.get_resource_groups()
default_get_instances = alicloud.ecs.get_instances(status="Running")
default_studio_application = alicloud.bp.StudioApplication("default",
application_name=name,
template_id="YAUUQIYRSV1CMFGX",
resource_group_id=default.groups[0].id,
area_id="cn-hangzhou",
instances=[{
"id": "data.alicloud_instances.default.instances.0.id",
"node_name": "data.alicloud_instances.default.instances.0.name",
"node_type": "ecs",
}],
configuration={
"enableMonitor": "1",
},
variables={
"test": "1",
})
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bp"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"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, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
if err != nil {
return err
}
_, err = ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
Status: pulumi.StringRef("Running"),
}, nil)
if err != nil {
return err
}
_, err = bp.NewStudioApplication(ctx, "default", &bp.StudioApplicationArgs{
ApplicationName: pulumi.String(name),
TemplateId: pulumi.String("YAUUQIYRSV1CMFGX"),
ResourceGroupId: pulumi.String(_default.Groups[0].Id),
AreaId: pulumi.String("cn-hangzhou"),
Instances: bp.StudioApplicationInstanceArray{
&bp.StudioApplicationInstanceArgs{
Id: pulumi.String("data.alicloud_instances.default.instances.0.id"),
NodeName: pulumi.String("data.alicloud_instances.default.instances.0.name"),
NodeType: pulumi.String("ecs"),
},
},
Configuration: pulumi.StringMap{
"enableMonitor": pulumi.String("1"),
},
Variables: pulumi.StringMap{
"test": pulumi.String("1"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var defaultGetInstances = AliCloud.Ecs.GetInstances.Invoke(new()
{
Status = "Running",
});
var defaultStudioApplication = new AliCloud.Bp.StudioApplication("default", new()
{
ApplicationName = name,
TemplateId = "YAUUQIYRSV1CMFGX",
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
AreaId = "cn-hangzhou",
Instances = new[]
{
new AliCloud.Bp.Inputs.StudioApplicationInstanceArgs
{
Id = "data.alicloud_instances.default.instances.0.id",
NodeName = "data.alicloud_instances.default.instances.0.name",
NodeType = "ecs",
},
},
Configuration =
{
{ "enableMonitor", "1" },
},
Variables =
{
{ "test", "1" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
import com.pulumi.alicloud.bp.StudioApplication;
import com.pulumi.alicloud.bp.StudioApplicationArgs;
import com.pulumi.alicloud.bp.inputs.StudioApplicationInstanceArgs;
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 name = config.get("name").orElse("tf-example");
final var default = ResourcemanagerFunctions.getResourceGroups();
final var defaultGetInstances = EcsFunctions.getInstances(GetInstancesArgs.builder()
.status("Running")
.build());
var defaultStudioApplication = new StudioApplication("defaultStudioApplication", StudioApplicationArgs.builder()
.applicationName(name)
.templateId("YAUUQIYRSV1CMFGX")
.resourceGroupId(default_.groups()[0].id())
.areaId("cn-hangzhou")
.instances(StudioApplicationInstanceArgs.builder()
.id("data.alicloud_instances.default.instances.0.id")
.nodeName("data.alicloud_instances.default.instances.0.name")
.nodeType("ecs")
.build())
.configuration(Map.of("enableMonitor", "1"))
.variables(Map.of("test", "1"))
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultStudioApplication:
type: alicloud:bp:StudioApplication
name: default
properties:
applicationName: ${name}
templateId: YAUUQIYRSV1CMFGX
resourceGroupId: ${default.groups[0].id}
areaId: cn-hangzhou
instances:
- id: data.alicloud_instances.default.instances.0.id
nodeName: data.alicloud_instances.default.instances.0.name
nodeType: ecs
configuration:
enableMonitor: '1'
variables:
test: '1'
variables:
default:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
defaultGetInstances:
fn::invoke:
Function: alicloud:ecs:getInstances
Arguments:
status: Running
Create StudioApplication Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StudioApplication(name: string, args: StudioApplicationArgs, opts?: CustomResourceOptions);
@overload
def StudioApplication(resource_name: str,
args: StudioApplicationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StudioApplication(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_name: Optional[str] = None,
template_id: Optional[str] = None,
area_id: Optional[str] = None,
configuration: Optional[Mapping[str, str]] = None,
instances: Optional[Sequence[StudioApplicationInstanceArgs]] = None,
resource_group_id: Optional[str] = None,
variables: Optional[Mapping[str, str]] = None)
func NewStudioApplication(ctx *Context, name string, args StudioApplicationArgs, opts ...ResourceOption) (*StudioApplication, error)
public StudioApplication(string name, StudioApplicationArgs args, CustomResourceOptions? opts = null)
public StudioApplication(String name, StudioApplicationArgs args)
public StudioApplication(String name, StudioApplicationArgs args, CustomResourceOptions options)
type: alicloud:bp:StudioApplication
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 StudioApplicationArgs
- 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 StudioApplicationArgs
- 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 StudioApplicationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StudioApplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StudioApplicationArgs
- 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 studioApplicationResource = new AliCloud.Bp.StudioApplication("studioApplicationResource", new()
{
ApplicationName = "string",
TemplateId = "string",
AreaId = "string",
Configuration =
{
{ "string", "string" },
},
Instances = new[]
{
new AliCloud.Bp.Inputs.StudioApplicationInstanceArgs
{
Id = "string",
NodeName = "string",
NodeType = "string",
},
},
ResourceGroupId = "string",
Variables =
{
{ "string", "string" },
},
});
example, err := bp.NewStudioApplication(ctx, "studioApplicationResource", &bp.StudioApplicationArgs{
ApplicationName: pulumi.String("string"),
TemplateId: pulumi.String("string"),
AreaId: pulumi.String("string"),
Configuration: pulumi.StringMap{
"string": pulumi.String("string"),
},
Instances: bp.StudioApplicationInstanceArray{
&bp.StudioApplicationInstanceArgs{
Id: pulumi.String("string"),
NodeName: pulumi.String("string"),
NodeType: pulumi.String("string"),
},
},
ResourceGroupId: pulumi.String("string"),
Variables: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var studioApplicationResource = new StudioApplication("studioApplicationResource", StudioApplicationArgs.builder()
.applicationName("string")
.templateId("string")
.areaId("string")
.configuration(Map.of("string", "string"))
.instances(StudioApplicationInstanceArgs.builder()
.id("string")
.nodeName("string")
.nodeType("string")
.build())
.resourceGroupId("string")
.variables(Map.of("string", "string"))
.build());
studio_application_resource = alicloud.bp.StudioApplication("studioApplicationResource",
application_name="string",
template_id="string",
area_id="string",
configuration={
"string": "string",
},
instances=[alicloud.bp.StudioApplicationInstanceArgs(
id="string",
node_name="string",
node_type="string",
)],
resource_group_id="string",
variables={
"string": "string",
})
const studioApplicationResource = new alicloud.bp.StudioApplication("studioApplicationResource", {
applicationName: "string",
templateId: "string",
areaId: "string",
configuration: {
string: "string",
},
instances: [{
id: "string",
nodeName: "string",
nodeType: "string",
}],
resourceGroupId: "string",
variables: {
string: "string",
},
});
type: alicloud:bp:StudioApplication
properties:
applicationName: string
areaId: string
configuration:
string: string
instances:
- id: string
nodeName: string
nodeType: string
resourceGroupId: string
templateId: string
variables:
string: string
StudioApplication Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The StudioApplication resource accepts the following input properties:
- Application
Name string - The name of the application.
- Template
Id string - The id of the template.
- Area
Id string - The id of the area.
- Configuration Dictionary<string, string>
- The configuration of the application.
- Instances
List<Pulumi.
Ali Cloud. Bp. Inputs. Studio Application Instance> - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - Resource
Group stringId - The id of the resource group.
- Variables Dictionary<string, string>
- The variables of the application.
- Application
Name string - The name of the application.
- Template
Id string - The id of the template.
- Area
Id string - The id of the area.
- Configuration map[string]string
- The configuration of the application.
- Instances
[]Studio
Application Instance Args - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - Resource
Group stringId - The id of the resource group.
- Variables map[string]string
- The variables of the application.
- application
Name String - The name of the application.
- template
Id String - The id of the template.
- area
Id String - The id of the area.
- configuration Map<String,String>
- The configuration of the application.
- instances
List<Studio
Application Instance> - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource
Group StringId - The id of the resource group.
- variables Map<String,String>
- The variables of the application.
- application
Name string - The name of the application.
- template
Id string - The id of the template.
- area
Id string - The id of the area.
- configuration {[key: string]: string}
- The configuration of the application.
- instances
Studio
Application Instance[] - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource
Group stringId - The id of the resource group.
- variables {[key: string]: string}
- The variables of the application.
- application_
name str - The name of the application.
- template_
id str - The id of the template.
- area_
id str - The id of the area.
- configuration Mapping[str, str]
- The configuration of the application.
- instances
Sequence[Studio
Application Instance Args] - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource_
group_ strid - The id of the resource group.
- variables Mapping[str, str]
- The variables of the application.
- application
Name String - The name of the application.
- template
Id String - The id of the template.
- area
Id String - The id of the area.
- configuration Map<String>
- The configuration of the application.
- instances List<Property Map>
- The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource
Group StringId - The id of the resource group.
- variables Map<String>
- The variables of the application.
Outputs
All input properties are implicitly available as output properties. Additionally, the StudioApplication resource produces the following output properties:
Look up Existing StudioApplication Resource
Get an existing StudioApplication 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?: StudioApplicationState, opts?: CustomResourceOptions): StudioApplication
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_name: Optional[str] = None,
area_id: Optional[str] = None,
configuration: Optional[Mapping[str, str]] = None,
instances: Optional[Sequence[StudioApplicationInstanceArgs]] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
template_id: Optional[str] = None,
variables: Optional[Mapping[str, str]] = None) -> StudioApplication
func GetStudioApplication(ctx *Context, name string, id IDInput, state *StudioApplicationState, opts ...ResourceOption) (*StudioApplication, error)
public static StudioApplication Get(string name, Input<string> id, StudioApplicationState? state, CustomResourceOptions? opts = null)
public static StudioApplication get(String name, Output<String> id, StudioApplicationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Application
Name string - The name of the application.
- Area
Id string - The id of the area.
- Configuration Dictionary<string, string>
- The configuration of the application.
- Instances
List<Pulumi.
Ali Cloud. Bp. Inputs. Studio Application Instance> - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - Resource
Group stringId - The id of the resource group.
- Status string
- The status of the Application.
- Template
Id string - The id of the template.
- Variables Dictionary<string, string>
- The variables of the application.
- Application
Name string - The name of the application.
- Area
Id string - The id of the area.
- Configuration map[string]string
- The configuration of the application.
- Instances
[]Studio
Application Instance Args - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - Resource
Group stringId - The id of the resource group.
- Status string
- The status of the Application.
- Template
Id string - The id of the template.
- Variables map[string]string
- The variables of the application.
- application
Name String - The name of the application.
- area
Id String - The id of the area.
- configuration Map<String,String>
- The configuration of the application.
- instances
List<Studio
Application Instance> - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource
Group StringId - The id of the resource group.
- status String
- The status of the Application.
- template
Id String - The id of the template.
- variables Map<String,String>
- The variables of the application.
- application
Name string - The name of the application.
- area
Id string - The id of the area.
- configuration {[key: string]: string}
- The configuration of the application.
- instances
Studio
Application Instance[] - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource
Group stringId - The id of the resource group.
- status string
- The status of the Application.
- template
Id string - The id of the template.
- variables {[key: string]: string}
- The variables of the application.
- application_
name str - The name of the application.
- area_
id str - The id of the area.
- configuration Mapping[str, str]
- The configuration of the application.
- instances
Sequence[Studio
Application Instance Args] - The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource_
group_ strid - The id of the resource group.
- status str
- The status of the Application.
- template_
id str - The id of the template.
- variables Mapping[str, str]
- The variables of the application.
- application
Name String - The name of the application.
- area
Id String - The id of the area.
- configuration Map<String>
- The configuration of the application.
- instances List<Property Map>
- The instance list. Support the creation of instances in the existing vpc under the application. See the following
Block instances
. - resource
Group StringId - The id of the resource group.
- status String
- The status of the Application.
- template
Id String - The id of the template.
- variables Map<String>
- The variables of the application.
Supporting Types
StudioApplicationInstance, StudioApplicationInstanceArgs
Import
Cloud Architect Design Tools Application can be imported using the id, e.g.
$ pulumi import alicloud:bp/studioApplication:StudioApplication example <id>
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.