App
Provides a MHUB App resource. For information about MHUB App and how to use it, see What is App.
NOTE: Available since v1.138.0+. NOTE: At present, the resource only supports cn-shanghai region.
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") || "example_value";
const _default = new alicloud.mhub.Product("default", {productName: name});
const defaultApp = new alicloud.mhub.App("default", {
appName: name,
productId: _default.id,
packageName: "com.example.android",
type: "Android",
});
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "example_value"
default = alicloud.mhub.Product("default", product_name=name)
default_app = alicloud.mhub.App("default",
app_name=name,
product_id=default.id,
package_name="com.example.android",
type="Android")
Content copied to clipboard
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") ?? "example_value";
var @default = new AliCloud.Mhub.Product("default", new()
{
ProductName = name,
});
var defaultApp = new AliCloud.Mhub.App("default", new()
{
AppName = name,
ProductId = @default.Id,
PackageName = "com.example.android",
Type = "Android",
});
});
Content copied to clipboard
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
}
_default, err := mhub.NewProduct(ctx, "default", &mhub.ProductArgs{
ProductName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = mhub.NewApp(ctx, "default", &mhub.AppArgs{
AppName: pulumi.String(name),
ProductId: _default.ID(),
PackageName: pulumi.String("com.example.android"),
Type: pulumi.String("Android"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mhub.Product;
import com.pulumi.alicloud.mhub.ProductArgs;
import com.pulumi.alicloud.mhub.App;
import com.pulumi.alicloud.mhub.AppArgs;
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("example_value");
var default_ = new Product("default", ProductArgs.builder()
.productName(name)
.build());
var defaultApp = new App("defaultApp", AppArgs.builder()
.appName(name)
.productId(default_.id())
.packageName("com.example.android")
.type("Android")
.build());
}
}
Content copied to clipboard
configuration:
name:
type: string
default: example_value
resources:
default:
type: alicloud:mhub:Product
properties:
productName: ${name}
defaultApp:
type: alicloud:mhub:App
name: default
properties:
appName: ${name}
productId: ${default.id}
packageName: com.example.android
type: Android
Content copied to clipboard
Import
MHUB App can be imported using the id, e.g.
$ pulumi import alicloud:mhub/app:App example <product_id>:<app_key>
Content copied to clipboard
Properties
Link copied to clipboard
Base64 string of picture.
Link copied to clipboard
The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
Link copied to clipboard
Android App package name. NOTE: Either bundle_id
or package_name
must be set.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard