Alibaba Cloud

v3.15.0 published on Thursday, Jan 13, 2022 by Pulumi

App

Provides a MHUB App resource.

For information about MHUB App and how to use it, see What is App.

NOTE: Available in v1.138.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.Get("name") ?? "example_value";
        var @default = new AliCloud.Mhub.App("default", new AliCloud.Mhub.AppArgs
        {
            AppName = name,
            ProductId = alicloud_mhub_product.Default.Id,
            PackageName = "com.test.android",
            Type = "Android",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mhub"
	"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 := "example_value"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_, err := mhub.NewApp(ctx, "_default", &mhub.AppArgs{
			AppName:     pulumi.String(name),
			ProductId:   pulumi.Any(alicloud_mhub_product.Default.Id),
			PackageName: pulumi.String("com.test.android"),
			Type:        pulumi.String("Android"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "example_value"
default = alicloud.mhub.App("default",
    app_name=name,
    product_id=alicloud_mhub_product["default"]["id"],
    package_name="com.test.android",
    type="Android")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "example_value";
const _default = new alicloud.mhub.App("default", {
    appName: name,
    productId: alicloud_mhub_product["default"].id,
    packageName: "com.test.android",
    type: "Android",
});

Create a App Resource

new App(name: string, args: AppArgs, opts?: CustomResourceOptions);
@overload
def App(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        app_name: Optional[str] = None,
        bundle_id: Optional[str] = None,
        encoded_icon: Optional[str] = None,
        industry_id: Optional[str] = None,
        package_name: Optional[str] = None,
        product_id: Optional[str] = None,
        type: Optional[str] = None)
@overload
def App(resource_name: str,
        args: AppArgs,
        opts: Optional[ResourceOptions] = None)
func NewApp(ctx *Context, name string, args AppArgs, opts ...ResourceOption) (*App, error)
public App(string name, AppArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppArgs
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 AppArgs
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 AppArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

AppName string
AppName.
ProductId string
The ID of the Product.
Type string
The type of the Product. Valid values: Android and iOS.
BundleId string
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
EncodedIcon string
Base64 string of picture.
IndustryId string
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
PackageName string
Android App package name. NOTE: Either bundle_id or package_name must be set.
AppName string
AppName.
ProductId string
The ID of the Product.
Type string
The type of the Product. Valid values: Android and iOS.
BundleId string
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
EncodedIcon string
Base64 string of picture.
IndustryId string
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
PackageName string
Android App package name. NOTE: Either bundle_id or package_name must be set.
appName string
AppName.
productId string
The ID of the Product.
type string
The type of the Product. Valid values: Android and iOS.
bundleId string
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
encodedIcon string
Base64 string of picture.
industryId string
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
packageName string
Android App package name. NOTE: Either bundle_id or package_name must be set.
app_name str
AppName.
product_id str
The ID of the Product.
type str
The type of the Product. Valid values: Android and iOS.
bundle_id str
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
encoded_icon str
Base64 string of picture.
industry_id str
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
package_name str
Android App package name. NOTE: Either bundle_id or package_name must be set.

Outputs

All input properties are implicitly available as output properties. Additionally, the App 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing App Resource

Get an existing App 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?: AppState, opts?: CustomResourceOptions): App
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_name: Optional[str] = None,
        bundle_id: Optional[str] = None,
        encoded_icon: Optional[str] = None,
        industry_id: Optional[str] = None,
        package_name: Optional[str] = None,
        product_id: Optional[str] = None,
        type: Optional[str] = None) -> App
func GetApp(ctx *Context, name string, id IDInput, state *AppState, opts ...ResourceOption) (*App, error)
public static App Get(string name, Input<string> id, AppState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AppName string
AppName.
BundleId string
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
EncodedIcon string
Base64 string of picture.
IndustryId string
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
PackageName string
Android App package name. NOTE: Either bundle_id or package_name must be set.
ProductId string
The ID of the Product.
Type string
The type of the Product. Valid values: Android and iOS.
AppName string
AppName.
BundleId string
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
EncodedIcon string
Base64 string of picture.
IndustryId string
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
PackageName string
Android App package name. NOTE: Either bundle_id or package_name must be set.
ProductId string
The ID of the Product.
Type string
The type of the Product. Valid values: Android and iOS.
appName string
AppName.
bundleId string
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
encodedIcon string
Base64 string of picture.
industryId string
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
packageName string
Android App package name. NOTE: Either bundle_id or package_name must be set.
productId string
The ID of the Product.
type string
The type of the Product. Valid values: Android and iOS.
app_name str
AppName.
bundle_id str
The app id of iOS. NOTE: Either bundle_id or package_name must be set.
encoded_icon str
Base64 string of picture.
industry_id str
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
package_name str
Android App package name. NOTE: Either bundle_id or package_name must be set.
product_id str
The ID of the Product.
type str
The type of the Product. Valid values: Android and iOS.

Import

MHUB App can be imported using the id, e.g.

 $ pulumi import alicloud:mhub/app:App example <product_id>:<app_key>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.