mhub

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.1

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

Types

type App

type App struct {
	pulumi.CustomResourceState

	// AppName.
	AppName pulumi.StringOutput `pulumi:"appName"`
	// The app id of iOS. **NOTE:** Either `bundleId` or `packageName` must be set.
	BundleId pulumi.StringPtrOutput `pulumi:"bundleId"`
	// Base64 string of picture.
	EncodedIcon pulumi.StringPtrOutput `pulumi:"encodedIcon"`
	// The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).
	IndustryId pulumi.StringOutput `pulumi:"industryId"`
	// Android App package name. **NOTE:** Either `bundleId` or `packageName` must be set.
	PackageName pulumi.StringPtrOutput `pulumi:"packageName"`
	// The ID of the Product.
	ProductId pulumi.StringOutput `pulumi:"productId"`
	// The type of the Product. Valid values: `Android` and `iOS`.
	Type pulumi.StringOutput `pulumi:"type"`
}

Provides a MHUB App resource.

For information about MHUB App and how to use it, see [What is App](https://help.aliyun.com/product/65109.html).

> **NOTE:** Available in v1.138.0+.

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

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/mhub"

)

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

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

```sh

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

```

func GetApp

func GetApp(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AppState, opts ...pulumi.ResourceOption) (*App, error)

GetApp gets an existing App resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewApp

func NewApp(ctx *pulumi.Context,
	name string, args *AppArgs, opts ...pulumi.ResourceOption) (*App, error)

NewApp registers a new resource with the given unique name, arguments, and options.

func (*App) ElementType

func (*App) ElementType() reflect.Type

func (*App) ToAppOutput

func (i *App) ToAppOutput() AppOutput

func (*App) ToAppOutputWithContext

func (i *App) ToAppOutputWithContext(ctx context.Context) AppOutput

type AppArgs

type AppArgs struct {
	// AppName.
	AppName pulumi.StringInput
	// The app id of iOS. **NOTE:** Either `bundleId` or `packageName` must be set.
	BundleId pulumi.StringPtrInput
	// Base64 string of picture.
	EncodedIcon pulumi.StringPtrInput
	// The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).
	IndustryId pulumi.StringPtrInput
	// Android App package name. **NOTE:** Either `bundleId` or `packageName` must be set.
	PackageName pulumi.StringPtrInput
	// The ID of the Product.
	ProductId pulumi.StringInput
	// The type of the Product. Valid values: `Android` and `iOS`.
	Type pulumi.StringInput
}

The set of arguments for constructing a App resource.

func (AppArgs) ElementType

func (AppArgs) ElementType() reflect.Type

type AppArray

type AppArray []AppInput

func (AppArray) ElementType

func (AppArray) ElementType() reflect.Type

func (AppArray) ToAppArrayOutput

func (i AppArray) ToAppArrayOutput() AppArrayOutput

func (AppArray) ToAppArrayOutputWithContext

func (i AppArray) ToAppArrayOutputWithContext(ctx context.Context) AppArrayOutput

type AppArrayInput

type AppArrayInput interface {
	pulumi.Input

	ToAppArrayOutput() AppArrayOutput
	ToAppArrayOutputWithContext(context.Context) AppArrayOutput
}

AppArrayInput is an input type that accepts AppArray and AppArrayOutput values. You can construct a concrete instance of `AppArrayInput` via:

AppArray{ AppArgs{...} }

type AppArrayOutput

type AppArrayOutput struct{ *pulumi.OutputState }

func (AppArrayOutput) ElementType

func (AppArrayOutput) ElementType() reflect.Type

func (AppArrayOutput) Index

func (AppArrayOutput) ToAppArrayOutput

func (o AppArrayOutput) ToAppArrayOutput() AppArrayOutput

func (AppArrayOutput) ToAppArrayOutputWithContext

func (o AppArrayOutput) ToAppArrayOutputWithContext(ctx context.Context) AppArrayOutput

type AppInput

type AppInput interface {
	pulumi.Input

	ToAppOutput() AppOutput
	ToAppOutputWithContext(ctx context.Context) AppOutput
}

type AppMap

type AppMap map[string]AppInput

func (AppMap) ElementType

func (AppMap) ElementType() reflect.Type

func (AppMap) ToAppMapOutput

func (i AppMap) ToAppMapOutput() AppMapOutput

func (AppMap) ToAppMapOutputWithContext

func (i AppMap) ToAppMapOutputWithContext(ctx context.Context) AppMapOutput

type AppMapInput

type AppMapInput interface {
	pulumi.Input

	ToAppMapOutput() AppMapOutput
	ToAppMapOutputWithContext(context.Context) AppMapOutput
}

AppMapInput is an input type that accepts AppMap and AppMapOutput values. You can construct a concrete instance of `AppMapInput` via:

AppMap{ "key": AppArgs{...} }

type AppMapOutput

type AppMapOutput struct{ *pulumi.OutputState }

func (AppMapOutput) ElementType

func (AppMapOutput) ElementType() reflect.Type

func (AppMapOutput) MapIndex

func (o AppMapOutput) MapIndex(k pulumi.StringInput) AppOutput

func (AppMapOutput) ToAppMapOutput

func (o AppMapOutput) ToAppMapOutput() AppMapOutput

func (AppMapOutput) ToAppMapOutputWithContext

func (o AppMapOutput) ToAppMapOutputWithContext(ctx context.Context) AppMapOutput

type AppOutput

type AppOutput struct{ *pulumi.OutputState }

func (AppOutput) AppName

func (o AppOutput) AppName() pulumi.StringOutput

AppName.

func (AppOutput) BundleId

func (o AppOutput) BundleId() pulumi.StringPtrOutput

The app id of iOS. **NOTE:** Either `bundleId` or `packageName` must be set.

func (AppOutput) ElementType

func (AppOutput) ElementType() reflect.Type

func (AppOutput) EncodedIcon

func (o AppOutput) EncodedIcon() pulumi.StringPtrOutput

Base64 string of picture.

func (AppOutput) IndustryId

func (o AppOutput) IndustryId() pulumi.StringOutput

The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).

func (AppOutput) PackageName

func (o AppOutput) PackageName() pulumi.StringPtrOutput

Android App package name. **NOTE:** Either `bundleId` or `packageName` must be set.

func (AppOutput) ProductId

func (o AppOutput) ProductId() pulumi.StringOutput

The ID of the Product.

func (AppOutput) ToAppOutput

func (o AppOutput) ToAppOutput() AppOutput

func (AppOutput) ToAppOutputWithContext

func (o AppOutput) ToAppOutputWithContext(ctx context.Context) AppOutput

func (AppOutput) Type

func (o AppOutput) Type() pulumi.StringOutput

The type of the Product. Valid values: `Android` and `iOS`.

type AppState

type AppState struct {
	// AppName.
	AppName pulumi.StringPtrInput
	// The app id of iOS. **NOTE:** Either `bundleId` or `packageName` must be set.
	BundleId pulumi.StringPtrInput
	// Base64 string of picture.
	EncodedIcon pulumi.StringPtrInput
	// The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).
	IndustryId pulumi.StringPtrInput
	// Android App package name. **NOTE:** Either `bundleId` or `packageName` must be set.
	PackageName pulumi.StringPtrInput
	// The ID of the Product.
	ProductId pulumi.StringPtrInput
	// The type of the Product. Valid values: `Android` and `iOS`.
	Type pulumi.StringPtrInput
}

func (AppState) ElementType

func (AppState) ElementType() reflect.Type

type GetAppsApp

type GetAppsApp struct {
	// Application AppKey, which uniquely identifies an application when requested by the interface
	AppKey string `pulumi:"appKey"`
	// The Name of the App.
	AppName string `pulumi:"appName"`
	// iOS application ID. Required when creating an iOS app. **NOTE:** Either `bundleId` or `packageName` must be set.
	BundleId string `pulumi:"bundleId"`
	// The CreateTime of the App.
	CreateTime string `pulumi:"createTime"`
	// Base64 string of picture.
	EncodedIcon string `pulumi:"encodedIcon"`
	// The ID of the App.
	Id string `pulumi:"id"`
	// The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).
	IndustryId string `pulumi:"industryId"`
	// Android App package name.  **NOTE:** Either `bundleId` or `packageName` must be set.
	PackageName string `pulumi:"packageName"`
	// The ID of the Product.
	ProductId string `pulumi:"productId"`
	// The type of the App. Valid values: `Android` and `iOS`.
	Type string `pulumi:"type"`
}

type GetAppsAppArgs

type GetAppsAppArgs struct {
	// Application AppKey, which uniquely identifies an application when requested by the interface
	AppKey pulumi.StringInput `pulumi:"appKey"`
	// The Name of the App.
	AppName pulumi.StringInput `pulumi:"appName"`
	// iOS application ID. Required when creating an iOS app. **NOTE:** Either `bundleId` or `packageName` must be set.
	BundleId pulumi.StringInput `pulumi:"bundleId"`
	// The CreateTime of the App.
	CreateTime pulumi.StringInput `pulumi:"createTime"`
	// Base64 string of picture.
	EncodedIcon pulumi.StringInput `pulumi:"encodedIcon"`
	// The ID of the App.
	Id pulumi.StringInput `pulumi:"id"`
	// The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).
	IndustryId pulumi.StringInput `pulumi:"industryId"`
	// Android App package name.  **NOTE:** Either `bundleId` or `packageName` must be set.
	PackageName pulumi.StringInput `pulumi:"packageName"`
	// The ID of the Product.
	ProductId pulumi.StringInput `pulumi:"productId"`
	// The type of the App. Valid values: `Android` and `iOS`.
	Type pulumi.StringInput `pulumi:"type"`
}

func (GetAppsAppArgs) ElementType

func (GetAppsAppArgs) ElementType() reflect.Type

func (GetAppsAppArgs) ToGetAppsAppOutput

func (i GetAppsAppArgs) ToGetAppsAppOutput() GetAppsAppOutput

func (GetAppsAppArgs) ToGetAppsAppOutputWithContext

func (i GetAppsAppArgs) ToGetAppsAppOutputWithContext(ctx context.Context) GetAppsAppOutput

type GetAppsAppArray

type GetAppsAppArray []GetAppsAppInput

func (GetAppsAppArray) ElementType

func (GetAppsAppArray) ElementType() reflect.Type

func (GetAppsAppArray) ToGetAppsAppArrayOutput

func (i GetAppsAppArray) ToGetAppsAppArrayOutput() GetAppsAppArrayOutput

func (GetAppsAppArray) ToGetAppsAppArrayOutputWithContext

func (i GetAppsAppArray) ToGetAppsAppArrayOutputWithContext(ctx context.Context) GetAppsAppArrayOutput

type GetAppsAppArrayInput

type GetAppsAppArrayInput interface {
	pulumi.Input

	ToGetAppsAppArrayOutput() GetAppsAppArrayOutput
	ToGetAppsAppArrayOutputWithContext(context.Context) GetAppsAppArrayOutput
}

GetAppsAppArrayInput is an input type that accepts GetAppsAppArray and GetAppsAppArrayOutput values. You can construct a concrete instance of `GetAppsAppArrayInput` via:

GetAppsAppArray{ GetAppsAppArgs{...} }

type GetAppsAppArrayOutput

type GetAppsAppArrayOutput struct{ *pulumi.OutputState }

func (GetAppsAppArrayOutput) ElementType

func (GetAppsAppArrayOutput) ElementType() reflect.Type

func (GetAppsAppArrayOutput) Index

func (GetAppsAppArrayOutput) ToGetAppsAppArrayOutput

func (o GetAppsAppArrayOutput) ToGetAppsAppArrayOutput() GetAppsAppArrayOutput

func (GetAppsAppArrayOutput) ToGetAppsAppArrayOutputWithContext

func (o GetAppsAppArrayOutput) ToGetAppsAppArrayOutputWithContext(ctx context.Context) GetAppsAppArrayOutput

type GetAppsAppInput

type GetAppsAppInput interface {
	pulumi.Input

	ToGetAppsAppOutput() GetAppsAppOutput
	ToGetAppsAppOutputWithContext(context.Context) GetAppsAppOutput
}

GetAppsAppInput is an input type that accepts GetAppsAppArgs and GetAppsAppOutput values. You can construct a concrete instance of `GetAppsAppInput` via:

GetAppsAppArgs{...}

type GetAppsAppOutput

type GetAppsAppOutput struct{ *pulumi.OutputState }

func (GetAppsAppOutput) AppKey

Application AppKey, which uniquely identifies an application when requested by the interface

func (GetAppsAppOutput) AppName

func (o GetAppsAppOutput) AppName() pulumi.StringOutput

The Name of the App.

func (GetAppsAppOutput) BundleId

func (o GetAppsAppOutput) BundleId() pulumi.StringOutput

iOS application ID. Required when creating an iOS app. **NOTE:** Either `bundleId` or `packageName` must be set.

func (GetAppsAppOutput) CreateTime

func (o GetAppsAppOutput) CreateTime() pulumi.StringOutput

The CreateTime of the App.

func (GetAppsAppOutput) ElementType

func (GetAppsAppOutput) ElementType() reflect.Type

func (GetAppsAppOutput) EncodedIcon

func (o GetAppsAppOutput) EncodedIcon() pulumi.StringOutput

Base64 string of picture.

func (GetAppsAppOutput) Id

The ID of the App.

func (GetAppsAppOutput) IndustryId

func (o GetAppsAppOutput) IndustryId() pulumi.StringOutput

The Industry ID of the app. For information about Industry and how to use it, MHUB[Industry](https://help.aliyun.com/document_detail/201638.html).

func (GetAppsAppOutput) PackageName

func (o GetAppsAppOutput) PackageName() pulumi.StringOutput

Android App package name. **NOTE:** Either `bundleId` or `packageName` must be set.

func (GetAppsAppOutput) ProductId

func (o GetAppsAppOutput) ProductId() pulumi.StringOutput

The ID of the Product.

func (GetAppsAppOutput) ToGetAppsAppOutput

func (o GetAppsAppOutput) ToGetAppsAppOutput() GetAppsAppOutput

func (GetAppsAppOutput) ToGetAppsAppOutputWithContext

func (o GetAppsAppOutput) ToGetAppsAppOutputWithContext(ctx context.Context) GetAppsAppOutput

func (GetAppsAppOutput) Type

The type of the App. Valid values: `Android` and `iOS`.

type GetAppsArgs

type GetAppsArgs struct {
	// Default to `false`. Set it to `true` can output more details about resource attributes.
	EnableDetails *bool `pulumi:"enableDetails"`
	// A list of App IDs. The value formats as `<product_id>:<app_key>`
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by App name.
	NameRegex *string `pulumi:"nameRegex"`
	// The os type. Valid values: `Android` and `iOS`.
	OsType     *string `pulumi:"osType"`
	OutputFile *string `pulumi:"outputFile"`
	// The ID of the Product.
	ProductId string `pulumi:"productId"`
}

A collection of arguments for invoking getApps.

type GetAppsOutputArgs

type GetAppsOutputArgs struct {
	// Default to `false`. Set it to `true` can output more details about resource attributes.
	EnableDetails pulumi.BoolPtrInput `pulumi:"enableDetails"`
	// A list of App IDs. The value formats as `<product_id>:<app_key>`
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter results by App name.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// The os type. Valid values: `Android` and `iOS`.
	OsType     pulumi.StringPtrInput `pulumi:"osType"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
	// The ID of the Product.
	ProductId pulumi.StringInput `pulumi:"productId"`
}

A collection of arguments for invoking getApps.

func (GetAppsOutputArgs) ElementType

func (GetAppsOutputArgs) ElementType() reflect.Type

type GetAppsResult

type GetAppsResult struct {
	Apps          []GetAppsApp `pulumi:"apps"`
	EnableDetails *bool        `pulumi:"enableDetails"`
	// The provider-assigned unique ID for this managed resource.
	Id         string   `pulumi:"id"`
	Ids        []string `pulumi:"ids"`
	NameRegex  *string  `pulumi:"nameRegex"`
	Names      []string `pulumi:"names"`
	OsType     *string  `pulumi:"osType"`
	OutputFile *string  `pulumi:"outputFile"`
	ProductId  string   `pulumi:"productId"`
}

A collection of values returned by getApps.

func GetApps

func GetApps(ctx *pulumi.Context, args *GetAppsArgs, opts ...pulumi.InvokeOption) (*GetAppsResult, error)

This data source provides the Mhub Apps of the current Alibaba Cloud user.

> **NOTE:** Available in v1.138.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/mhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/mhub"

)

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("2"),
		})
		if err != nil {
			return err
		}
		ids, err := mhub.GetApps(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("mhubAppId1", ids.Apps[0].Id)
		nameRegex, err := mhub.GetApps(ctx, &mhub.GetAppsArgs{
			NameRegex: pulumi.StringRef("^my-App"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mhubAppId2", nameRegex.Apps[0].Id)
		return nil
	})
}

```

type GetAppsResultOutput

type GetAppsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getApps.

func (GetAppsResultOutput) Apps

func (GetAppsResultOutput) ElementType

func (GetAppsResultOutput) ElementType() reflect.Type

func (GetAppsResultOutput) EnableDetails

func (o GetAppsResultOutput) EnableDetails() pulumi.BoolPtrOutput

func (GetAppsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetAppsResultOutput) Ids

func (GetAppsResultOutput) NameRegex

func (GetAppsResultOutput) Names

func (GetAppsResultOutput) OsType

func (GetAppsResultOutput) OutputFile

func (GetAppsResultOutput) ProductId

func (o GetAppsResultOutput) ProductId() pulumi.StringOutput

func (GetAppsResultOutput) ToGetAppsResultOutput

func (o GetAppsResultOutput) ToGetAppsResultOutput() GetAppsResultOutput

func (GetAppsResultOutput) ToGetAppsResultOutputWithContext

func (o GetAppsResultOutput) ToGetAppsResultOutputWithContext(ctx context.Context) GetAppsResultOutput

type GetProductsArgs

type GetProductsArgs struct {
	// A list of Product IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by Product name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getProducts.

type GetProductsOutputArgs

type GetProductsOutputArgs struct {
	// A list of Product IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter results by Product name.
	NameRegex  pulumi.StringPtrInput `pulumi:"nameRegex"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getProducts.

func (GetProductsOutputArgs) ElementType

func (GetProductsOutputArgs) ElementType() reflect.Type

type GetProductsProduct

type GetProductsProduct struct {
	// The ID of the Product.
	Id string `pulumi:"id"`
	// The ID of the Product.
	ProductId string `pulumi:"productId"`
	// The name of the Product.
	ProductName string `pulumi:"productName"`
}

type GetProductsProductArgs

type GetProductsProductArgs struct {
	// The ID of the Product.
	Id pulumi.StringInput `pulumi:"id"`
	// The ID of the Product.
	ProductId pulumi.StringInput `pulumi:"productId"`
	// The name of the Product.
	ProductName pulumi.StringInput `pulumi:"productName"`
}

func (GetProductsProductArgs) ElementType

func (GetProductsProductArgs) ElementType() reflect.Type

func (GetProductsProductArgs) ToGetProductsProductOutput

func (i GetProductsProductArgs) ToGetProductsProductOutput() GetProductsProductOutput

func (GetProductsProductArgs) ToGetProductsProductOutputWithContext

func (i GetProductsProductArgs) ToGetProductsProductOutputWithContext(ctx context.Context) GetProductsProductOutput

type GetProductsProductArray

type GetProductsProductArray []GetProductsProductInput

func (GetProductsProductArray) ElementType

func (GetProductsProductArray) ElementType() reflect.Type

func (GetProductsProductArray) ToGetProductsProductArrayOutput

func (i GetProductsProductArray) ToGetProductsProductArrayOutput() GetProductsProductArrayOutput

func (GetProductsProductArray) ToGetProductsProductArrayOutputWithContext

func (i GetProductsProductArray) ToGetProductsProductArrayOutputWithContext(ctx context.Context) GetProductsProductArrayOutput

type GetProductsProductArrayInput

type GetProductsProductArrayInput interface {
	pulumi.Input

	ToGetProductsProductArrayOutput() GetProductsProductArrayOutput
	ToGetProductsProductArrayOutputWithContext(context.Context) GetProductsProductArrayOutput
}

GetProductsProductArrayInput is an input type that accepts GetProductsProductArray and GetProductsProductArrayOutput values. You can construct a concrete instance of `GetProductsProductArrayInput` via:

GetProductsProductArray{ GetProductsProductArgs{...} }

type GetProductsProductArrayOutput

type GetProductsProductArrayOutput struct{ *pulumi.OutputState }

func (GetProductsProductArrayOutput) ElementType

func (GetProductsProductArrayOutput) Index

func (GetProductsProductArrayOutput) ToGetProductsProductArrayOutput

func (o GetProductsProductArrayOutput) ToGetProductsProductArrayOutput() GetProductsProductArrayOutput

func (GetProductsProductArrayOutput) ToGetProductsProductArrayOutputWithContext

func (o GetProductsProductArrayOutput) ToGetProductsProductArrayOutputWithContext(ctx context.Context) GetProductsProductArrayOutput

type GetProductsProductInput

type GetProductsProductInput interface {
	pulumi.Input

	ToGetProductsProductOutput() GetProductsProductOutput
	ToGetProductsProductOutputWithContext(context.Context) GetProductsProductOutput
}

GetProductsProductInput is an input type that accepts GetProductsProductArgs and GetProductsProductOutput values. You can construct a concrete instance of `GetProductsProductInput` via:

GetProductsProductArgs{...}

type GetProductsProductOutput

type GetProductsProductOutput struct{ *pulumi.OutputState }

func (GetProductsProductOutput) ElementType

func (GetProductsProductOutput) ElementType() reflect.Type

func (GetProductsProductOutput) Id

The ID of the Product.

func (GetProductsProductOutput) ProductId

The ID of the Product.

func (GetProductsProductOutput) ProductName

The name of the Product.

func (GetProductsProductOutput) ToGetProductsProductOutput

func (o GetProductsProductOutput) ToGetProductsProductOutput() GetProductsProductOutput

func (GetProductsProductOutput) ToGetProductsProductOutputWithContext

func (o GetProductsProductOutput) ToGetProductsProductOutputWithContext(ctx context.Context) GetProductsProductOutput

type GetProductsResult

type GetProductsResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id         string               `pulumi:"id"`
	Ids        []string             `pulumi:"ids"`
	NameRegex  *string              `pulumi:"nameRegex"`
	Names      []string             `pulumi:"names"`
	OutputFile *string              `pulumi:"outputFile"`
	Products   []GetProductsProduct `pulumi:"products"`
}

A collection of values returned by getProducts.

func GetProducts

func GetProducts(ctx *pulumi.Context, args *GetProductsArgs, opts ...pulumi.InvokeOption) (*GetProductsResult, error)

This data source provides the Mhub Products of the current Alibaba Cloud user.

> **NOTE:** Available in v1.138.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/mhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/mhub"

)

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
		}
		ids, err := mhub.GetProducts(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("mhubProductId1", ids.Products[0].Id)
		nameRegex, err := mhub.GetProducts(ctx, &mhub.GetProductsArgs{
			NameRegex: pulumi.StringRef("^my-Product"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mhubProductId2", nameRegex.Products[0].Id)
		return nil
	})
}

```

type GetProductsResultOutput

type GetProductsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getProducts.

func (GetProductsResultOutput) ElementType

func (GetProductsResultOutput) ElementType() reflect.Type

func (GetProductsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetProductsResultOutput) Ids

func (GetProductsResultOutput) NameRegex

func (GetProductsResultOutput) Names

func (GetProductsResultOutput) OutputFile

func (GetProductsResultOutput) Products

func (GetProductsResultOutput) ToGetProductsResultOutput

func (o GetProductsResultOutput) ToGetProductsResultOutput() GetProductsResultOutput

func (GetProductsResultOutput) ToGetProductsResultOutputWithContext

func (o GetProductsResultOutput) ToGetProductsResultOutputWithContext(ctx context.Context) GetProductsResultOutput

type Product

type Product struct {
	pulumi.CustomResourceState

	// ProductName.
	ProductName pulumi.StringOutput `pulumi:"productName"`
}

Provides a MHUB Product resource.

For information about MHUB Product and how to use it, see [What is Product](https://help.aliyun.com/product/65109.html).

> **NOTE:** Available in v1.138.0+.

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

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/mhub"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := mhub.NewProduct(ctx, "example", &mhub.ProductArgs{
			ProductName: pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh

$ pulumi import alicloud:mhub/product:Product example <id>

```

func GetProduct

func GetProduct(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ProductState, opts ...pulumi.ResourceOption) (*Product, error)

GetProduct gets an existing Product resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewProduct

func NewProduct(ctx *pulumi.Context,
	name string, args *ProductArgs, opts ...pulumi.ResourceOption) (*Product, error)

NewProduct registers a new resource with the given unique name, arguments, and options.

func (*Product) ElementType

func (*Product) ElementType() reflect.Type

func (*Product) ToProductOutput

func (i *Product) ToProductOutput() ProductOutput

func (*Product) ToProductOutputWithContext

func (i *Product) ToProductOutputWithContext(ctx context.Context) ProductOutput

type ProductArgs

type ProductArgs struct {
	// ProductName.
	ProductName pulumi.StringInput
}

The set of arguments for constructing a Product resource.

func (ProductArgs) ElementType

func (ProductArgs) ElementType() reflect.Type

type ProductArray

type ProductArray []ProductInput

func (ProductArray) ElementType

func (ProductArray) ElementType() reflect.Type

func (ProductArray) ToProductArrayOutput

func (i ProductArray) ToProductArrayOutput() ProductArrayOutput

func (ProductArray) ToProductArrayOutputWithContext

func (i ProductArray) ToProductArrayOutputWithContext(ctx context.Context) ProductArrayOutput

type ProductArrayInput

type ProductArrayInput interface {
	pulumi.Input

	ToProductArrayOutput() ProductArrayOutput
	ToProductArrayOutputWithContext(context.Context) ProductArrayOutput
}

ProductArrayInput is an input type that accepts ProductArray and ProductArrayOutput values. You can construct a concrete instance of `ProductArrayInput` via:

ProductArray{ ProductArgs{...} }

type ProductArrayOutput

type ProductArrayOutput struct{ *pulumi.OutputState }

func (ProductArrayOutput) ElementType

func (ProductArrayOutput) ElementType() reflect.Type

func (ProductArrayOutput) Index

func (ProductArrayOutput) ToProductArrayOutput

func (o ProductArrayOutput) ToProductArrayOutput() ProductArrayOutput

func (ProductArrayOutput) ToProductArrayOutputWithContext

func (o ProductArrayOutput) ToProductArrayOutputWithContext(ctx context.Context) ProductArrayOutput

type ProductInput

type ProductInput interface {
	pulumi.Input

	ToProductOutput() ProductOutput
	ToProductOutputWithContext(ctx context.Context) ProductOutput
}

type ProductMap

type ProductMap map[string]ProductInput

func (ProductMap) ElementType

func (ProductMap) ElementType() reflect.Type

func (ProductMap) ToProductMapOutput

func (i ProductMap) ToProductMapOutput() ProductMapOutput

func (ProductMap) ToProductMapOutputWithContext

func (i ProductMap) ToProductMapOutputWithContext(ctx context.Context) ProductMapOutput

type ProductMapInput

type ProductMapInput interface {
	pulumi.Input

	ToProductMapOutput() ProductMapOutput
	ToProductMapOutputWithContext(context.Context) ProductMapOutput
}

ProductMapInput is an input type that accepts ProductMap and ProductMapOutput values. You can construct a concrete instance of `ProductMapInput` via:

ProductMap{ "key": ProductArgs{...} }

type ProductMapOutput

type ProductMapOutput struct{ *pulumi.OutputState }

func (ProductMapOutput) ElementType

func (ProductMapOutput) ElementType() reflect.Type

func (ProductMapOutput) MapIndex

func (ProductMapOutput) ToProductMapOutput

func (o ProductMapOutput) ToProductMapOutput() ProductMapOutput

func (ProductMapOutput) ToProductMapOutputWithContext

func (o ProductMapOutput) ToProductMapOutputWithContext(ctx context.Context) ProductMapOutput

type ProductOutput

type ProductOutput struct{ *pulumi.OutputState }

func (ProductOutput) ElementType

func (ProductOutput) ElementType() reflect.Type

func (ProductOutput) ProductName

func (o ProductOutput) ProductName() pulumi.StringOutput

ProductName.

func (ProductOutput) ToProductOutput

func (o ProductOutput) ToProductOutput() ProductOutput

func (ProductOutput) ToProductOutputWithContext

func (o ProductOutput) ToProductOutputWithContext(ctx context.Context) ProductOutput

type ProductState

type ProductState struct {
	// ProductName.
	ProductName pulumi.StringPtrInput
}

func (ProductState) ElementType

func (ProductState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL