alicloud.mhub.App
Explore with Pulumi AI
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",
});
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")
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.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
})
}
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",
});
});
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());
}
}
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
Create App Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new App(name: string, args: AppArgs, opts?: CustomResourceOptions);
@overload
def App(resource_name: str,
args: AppArgs,
opts: Optional[ResourceOptions] = None)
@overload
def App(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_name: Optional[str] = None,
product_id: Optional[str] = None,
type: Optional[str] = None,
bundle_id: Optional[str] = None,
encoded_icon: Optional[str] = None,
industry_id: Optional[str] = None,
package_name: Optional[str] = None)
func NewApp(ctx *Context, name string, args AppArgs, opts ...ResourceOption) (*App, error)
public App(string name, AppArgs args, CustomResourceOptions? opts = null)
type: alicloud:mhub:App
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 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.
- name String
- The unique name of the resource.
- args AppArgs
- 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 alicloudAppResource = new AliCloud.Mhub.App("alicloudAppResource", new()
{
AppName = "string",
ProductId = "string",
Type = "string",
BundleId = "string",
EncodedIcon = "string",
IndustryId = "string",
PackageName = "string",
});
example, err := mhub.NewApp(ctx, "alicloudAppResource", &mhub.AppArgs{
AppName: pulumi.String("string"),
ProductId: pulumi.String("string"),
Type: pulumi.String("string"),
BundleId: pulumi.String("string"),
EncodedIcon: pulumi.String("string"),
IndustryId: pulumi.String("string"),
PackageName: pulumi.String("string"),
})
var alicloudAppResource = new App("alicloudAppResource", AppArgs.builder()
.appName("string")
.productId("string")
.type("string")
.bundleId("string")
.encodedIcon("string")
.industryId("string")
.packageName("string")
.build());
alicloud_app_resource = alicloud.mhub.App("alicloudAppResource",
app_name="string",
product_id="string",
type="string",
bundle_id="string",
encoded_icon="string",
industry_id="string",
package_name="string")
const alicloudAppResource = new alicloud.mhub.App("alicloudAppResource", {
appName: "string",
productId: "string",
type: "string",
bundleId: "string",
encodedIcon: "string",
industryId: "string",
packageName: "string",
});
type: alicloud:mhub:App
properties:
appName: string
bundleId: string
encodedIcon: string
industryId: string
packageName: string
productId: string
type: string
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:
- App
Name string - AppName.
- Product
Id string - The ID of the Product.
- Type string
- The type of the Product. Valid values:
Android
andiOS
. - Bundle
Id string - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - Encoded
Icon string - Base64 string of picture.
- Industry
Id string - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- Package
Name string - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set.
- App
Name string - AppName.
- Product
Id string - The ID of the Product.
- Type string
- The type of the Product. Valid values:
Android
andiOS
. - Bundle
Id string - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - Encoded
Icon string - Base64 string of picture.
- Industry
Id string - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- Package
Name string - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set.
- app
Name String - AppName.
- product
Id String - The ID of the Product.
- type String
- The type of the Product. Valid values:
Android
andiOS
. - bundle
Id String - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - encoded
Icon String - Base64 string of picture.
- industry
Id String - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- package
Name String - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set.
- app
Name string - AppName.
- product
Id string - The ID of the Product.
- type string
- The type of the Product. Valid values:
Android
andiOS
. - bundle
Id string - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - encoded
Icon string - Base64 string of picture.
- industry
Id string - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- package
Name string - Android App package name. NOTE: Either
bundle_id
orpackage_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
andiOS
. - bundle_
id str - The app id of iOS. NOTE: Either
bundle_id
orpackage_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
orpackage_name
must be set.
- app
Name String - AppName.
- product
Id String - The ID of the Product.
- type String
- The type of the Product. Valid values:
Android
andiOS
. - bundle
Id String - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - encoded
Icon String - Base64 string of picture.
- industry
Id String - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- package
Name String - Android App package name. NOTE: Either
bundle_id
orpackage_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 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 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)
public static App get(String name, Output<String> id, AppState 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.
- App
Name string - AppName.
- Bundle
Id string - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - Encoded
Icon string - Base64 string of picture.
- Industry
Id string - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- Package
Name string - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set. - Product
Id string - The ID of the Product.
- Type string
- The type of the Product. Valid values:
Android
andiOS
.
- App
Name string - AppName.
- Bundle
Id string - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - Encoded
Icon string - Base64 string of picture.
- Industry
Id string - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- Package
Name string - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set. - Product
Id string - The ID of the Product.
- Type string
- The type of the Product. Valid values:
Android
andiOS
.
- app
Name String - AppName.
- bundle
Id String - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - encoded
Icon String - Base64 string of picture.
- industry
Id String - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- package
Name String - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set. - product
Id String - The ID of the Product.
- type String
- The type of the Product. Valid values:
Android
andiOS
.
- app
Name string - AppName.
- bundle
Id string - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - encoded
Icon string - Base64 string of picture.
- industry
Id string - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- package
Name string - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set. - product
Id string - The ID of the Product.
- type string
- The type of the Product. Valid values:
Android
andiOS
.
- app_
name str - AppName.
- bundle_
id str - The app id of iOS. NOTE: Either
bundle_id
orpackage_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
orpackage_name
must be set. - product_
id str - The ID of the Product.
- type str
- The type of the Product. Valid values:
Android
andiOS
.
- app
Name String - AppName.
- bundle
Id String - The app id of iOS. NOTE: Either
bundle_id
orpackage_name
must be set. - encoded
Icon String - Base64 string of picture.
- industry
Id String - The Industry ID of the app. For information about Industry and how to use it, MHUBIndustry.
- package
Name String - Android App package name. NOTE: Either
bundle_id
orpackage_name
must be set. - product
Id String - The ID of the Product.
- type String
- The type of the Product. Valid values:
Android
andiOS
.
Import
MHUB App can be imported using the id, e.g.
$ pulumi import alicloud:mhub/app:App example <product_id>:<app_key>
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.