alicloud.oos.ApplicationGroup
Explore with Pulumi AI
Provides a OOS Application Group resource.
For information about OOS Application Group and how to use it, see What is Application Group.
NOTE: Available in v1.146.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var defaultApplication = new AliCloud.Oos.Application("defaultApplication", new()
{
ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
ApplicationName = "terraform-example",
Description = "terraform-example",
Tags =
{
{ "Created", "TF" },
},
});
var defaultApplicationGroup = new AliCloud.Oos.ApplicationGroup("defaultApplicationGroup", new()
{
ApplicationGroupName = "terraform-example",
ApplicationName = defaultApplication.Id,
DeployRegionId = "cn-beijing",
Description = "terraform-example",
ImportTagKey = "example_key",
ImportTagValue = "example_value",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultResourceGroups, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
if err != nil {
return err
}
defaultApplication, err := oos.NewApplication(ctx, "defaultApplication", &oos.ApplicationArgs{
ResourceGroupId: *pulumi.String(defaultResourceGroups.Groups[0].Id),
ApplicationName: pulumi.String("terraform-example"),
Description: pulumi.String("terraform-example"),
Tags: pulumi.AnyMap{
"Created": pulumi.Any("TF"),
},
})
if err != nil {
return err
}
_, err = oos.NewApplicationGroup(ctx, "defaultApplicationGroup", &oos.ApplicationGroupArgs{
ApplicationGroupName: pulumi.String("terraform-example"),
ApplicationName: defaultApplication.ID(),
DeployRegionId: pulumi.String("cn-beijing"),
Description: pulumi.String("terraform-example"),
ImportTagKey: pulumi.String("example_key"),
ImportTagValue: pulumi.String("example_value"),
})
if err != nil {
return err
}
return nil
})
}
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.oos.Application;
import com.pulumi.alicloud.oos.ApplicationArgs;
import com.pulumi.alicloud.oos.ApplicationGroup;
import com.pulumi.alicloud.oos.ApplicationGroupArgs;
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 defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups();
var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()
.resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id()))
.applicationName("terraform-example")
.description("terraform-example")
.tags(Map.of("Created", "TF"))
.build());
var defaultApplicationGroup = new ApplicationGroup("defaultApplicationGroup", ApplicationGroupArgs.builder()
.applicationGroupName("terraform-example")
.applicationName(defaultApplication.id())
.deployRegionId("cn-beijing")
.description("terraform-example")
.importTagKey("example_key")
.importTagValue("example_value")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default_resource_groups = alicloud.resourcemanager.get_resource_groups()
default_application = alicloud.oos.Application("defaultApplication",
resource_group_id=default_resource_groups.groups[0].id,
application_name="terraform-example",
description="terraform-example",
tags={
"Created": "TF",
})
default_application_group = alicloud.oos.ApplicationGroup("defaultApplicationGroup",
application_group_name="terraform-example",
application_name=default_application.id,
deploy_region_id="cn-beijing",
description="terraform-example",
import_tag_key="example_key",
import_tag_value="example_value")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultResourceGroups = alicloud.resourcemanager.getResourceGroups({});
const defaultApplication = new alicloud.oos.Application("defaultApplication", {
resourceGroupId: defaultResourceGroups.then(defaultResourceGroups => defaultResourceGroups.groups?.[0]?.id),
applicationName: "terraform-example",
description: "terraform-example",
tags: {
Created: "TF",
},
});
const defaultApplicationGroup = new alicloud.oos.ApplicationGroup("defaultApplicationGroup", {
applicationGroupName: "terraform-example",
applicationName: defaultApplication.id,
deployRegionId: "cn-beijing",
description: "terraform-example",
importTagKey: "example_key",
importTagValue: "example_value",
});
resources:
defaultApplication:
type: alicloud:oos:Application
properties:
resourceGroupId: ${defaultResourceGroups.groups[0].id}
applicationName: terraform-example
description: terraform-example
tags:
Created: TF
defaultApplicationGroup:
type: alicloud:oos:ApplicationGroup
properties:
applicationGroupName: terraform-example
applicationName: ${defaultApplication.id}
deployRegionId: cn-beijing
description: terraform-example
importTagKey: example_key
importTagValue: example_value
variables:
defaultResourceGroups:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
Create ApplicationGroup Resource
new ApplicationGroup(name: string, args: ApplicationGroupArgs, opts?: CustomResourceOptions);
@overload
def ApplicationGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_group_name: Optional[str] = None,
application_name: Optional[str] = None,
deploy_region_id: Optional[str] = None,
description: Optional[str] = None,
import_tag_key: Optional[str] = None,
import_tag_value: Optional[str] = None)
@overload
def ApplicationGroup(resource_name: str,
args: ApplicationGroupArgs,
opts: Optional[ResourceOptions] = None)
func NewApplicationGroup(ctx *Context, name string, args ApplicationGroupArgs, opts ...ResourceOption) (*ApplicationGroup, error)
public ApplicationGroup(string name, ApplicationGroupArgs args, CustomResourceOptions? opts = null)
public ApplicationGroup(String name, ApplicationGroupArgs args)
public ApplicationGroup(String name, ApplicationGroupArgs args, CustomResourceOptions options)
type: alicloud:oos:ApplicationGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationGroupArgs
- 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 ApplicationGroupArgs
- 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 ApplicationGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApplicationGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApplicationGroup 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 ApplicationGroup resource accepts the following input properties:
- Application
Group stringName The name of the Application group.
- Application
Name string The name of the Application.
- Deploy
Region stringId The region ID of the deployment.
- Description string
Application group description information.
- Import
Tag stringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- Import
Tag stringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- Application
Group stringName The name of the Application group.
- Application
Name string The name of the Application.
- Deploy
Region stringId The region ID of the deployment.
- Description string
Application group description information.
- Import
Tag stringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- Import
Tag stringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application
Group StringName The name of the Application group.
- application
Name String The name of the Application.
- deploy
Region StringId The region ID of the deployment.
- description String
Application group description information.
- import
Tag StringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import
Tag StringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application
Group stringName The name of the Application group.
- application
Name string The name of the Application.
- deploy
Region stringId The region ID of the deployment.
- description string
Application group description information.
- import
Tag stringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import
Tag stringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application_
group_ strname The name of the Application group.
- application_
name str The name of the Application.
- deploy_
region_ strid The region ID of the deployment.
- description str
Application group description information.
- import_
tag_ strkey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import_
tag_ strvalue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application
Group StringName The name of the Application group.
- application
Name String The name of the Application.
- deploy
Region StringId The region ID of the deployment.
- description String
Application group description information.
- import
Tag StringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import
Tag StringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
Outputs
All input properties are implicitly available as output properties. Additionally, the ApplicationGroup 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 ApplicationGroup Resource
Get an existing ApplicationGroup 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?: ApplicationGroupState, opts?: CustomResourceOptions): ApplicationGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_group_name: Optional[str] = None,
application_name: Optional[str] = None,
deploy_region_id: Optional[str] = None,
description: Optional[str] = None,
import_tag_key: Optional[str] = None,
import_tag_value: Optional[str] = None) -> ApplicationGroup
func GetApplicationGroup(ctx *Context, name string, id IDInput, state *ApplicationGroupState, opts ...ResourceOption) (*ApplicationGroup, error)
public static ApplicationGroup Get(string name, Input<string> id, ApplicationGroupState? state, CustomResourceOptions? opts = null)
public static ApplicationGroup get(String name, Output<String> id, ApplicationGroupState 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
Group stringName The name of the Application group.
- Application
Name string The name of the Application.
- Deploy
Region stringId The region ID of the deployment.
- Description string
Application group description information.
- Import
Tag stringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- Import
Tag stringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- Application
Group stringName The name of the Application group.
- Application
Name string The name of the Application.
- Deploy
Region stringId The region ID of the deployment.
- Description string
Application group description information.
- Import
Tag stringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- Import
Tag stringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application
Group StringName The name of the Application group.
- application
Name String The name of the Application.
- deploy
Region StringId The region ID of the deployment.
- description String
Application group description information.
- import
Tag StringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import
Tag StringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application
Group stringName The name of the Application group.
- application
Name string The name of the Application.
- deploy
Region stringId The region ID of the deployment.
- description string
Application group description information.
- import
Tag stringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import
Tag stringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application_
group_ strname The name of the Application group.
- application_
name str The name of the Application.
- deploy_
region_ strid The region ID of the deployment.
- description str
Application group description information.
- import_
tag_ strkey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import_
tag_ strvalue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
- application
Group StringName The name of the Application group.
- application
Name String The name of the Application.
- deploy
Region StringId The region ID of the deployment.
- description String
Application group description information.
- import
Tag StringKey The tag key must be passed in at the same time as the tag value (import_tag_value) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is app-{ApplicationName} (application name).- import
Tag StringValue The tag value must be passed in at the same time as the tag key (import_tag_key) or none, not just one. If both
import_tag_key
andimport_tag_value
are left empty, the default is application group name. .
Import
OOS Application Group can be imported using the id, e.g.
$ pulumi import alicloud:oos/applicationGroup:ApplicationGroup example <application_name>:<application_group_name>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.