1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. mhub
  5. App
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.mhub.App

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    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+.

    NOTE: At present, the resource only supports cn-shanghai region.

    Example Usage

    Basic Usage

    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 defaultProduct = new AliCloud.Mhub.Product("defaultProduct", new()
        {
            ProductName = name,
        });
    
        var defaultApp = new AliCloud.Mhub.App("defaultApp", new()
        {
            AppName = name,
            ProductId = defaultProduct.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
    		}
    		defaultProduct, err := mhub.NewProduct(ctx, "defaultProduct", &mhub.ProductArgs{
    			ProductName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mhub.NewApp(ctx, "defaultApp", &mhub.AppArgs{
    			AppName:     pulumi.String(name),
    			ProductId:   defaultProduct.ID(),
    			PackageName: pulumi.String("com.test.android"),
    			Type:        pulumi.String("Android"),
    		})
    		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.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 defaultProduct = new Product("defaultProduct", ProductArgs.builder()        
                .productName(name)
                .build());
    
            var defaultApp = new App("defaultApp", AppArgs.builder()        
                .appName(name)
                .productId(defaultProduct.id())
                .packageName("com.test.android")
                .type("Android")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "example_value"
    default_product = alicloud.mhub.Product("defaultProduct", product_name=name)
    default_app = alicloud.mhub.App("defaultApp",
        app_name=name,
        product_id=default_product.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 defaultProduct = new alicloud.mhub.Product("defaultProduct", {productName: name});
    const defaultApp = new alicloud.mhub.App("defaultApp", {
        appName: name,
        productId: defaultProduct.id,
        packageName: "com.test.android",
        type: "Android",
    });
    
    configuration:
      name:
        type: string
        default: example_value
    resources:
      defaultProduct:
        type: alicloud:mhub:Product
        properties:
          productName: ${name}
      defaultApp:
        type: alicloud:mhub:App
        properties:
          appName: ${name}
          productId: ${defaultProduct.id}
          packageName: com.test.android
          type: Android
    

    Create 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)
    public App(String name, AppArgs args)
    public App(String name, AppArgs args, CustomResourceOptions options)
    
    type: alicloud:mhub:App
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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.

    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.

    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.

    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.
    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.

    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.

    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.

    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
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi