Documentation ¶
Index ¶
- func PkgVersion() (semver.Version, error)
- type LookupProjectArgs
- type LookupProjectOutputArgs
- type LookupProjectResult
- type LookupProjectResultOutput
- func (o LookupProjectResultOutput) CreatedAt() pulumi.StringOutput
- func (o LookupProjectResultOutput) Description() pulumi.StringOutput
- func (LookupProjectResultOutput) ElementType() reflect.Type
- func (o LookupProjectResultOutput) Id() pulumi.StringOutput
- func (o LookupProjectResultOutput) Name() pulumi.StringOutput
- func (o LookupProjectResultOutput) Status() pulumi.IntOutput
- func (o LookupProjectResultOutput) ToLookupProjectResultOutput() LookupProjectResultOutput
- func (o LookupProjectResultOutput) ToLookupProjectResultOutputWithContext(ctx context.Context) LookupProjectResultOutput
- func (o LookupProjectResultOutput) UpdatedAt() pulumi.StringOutput
- type Project
- type ProjectArgs
- type ProjectArray
- type ProjectArrayInput
- type ProjectArrayOutput
- type ProjectInput
- type ProjectMap
- type ProjectMapInput
- type ProjectMapOutput
- type ProjectOutput
- func (o ProjectOutput) CreatedAt() pulumi.StringOutput
- func (o ProjectOutput) Description() pulumi.StringPtrOutput
- func (ProjectOutput) ElementType() reflect.Type
- func (o ProjectOutput) Enable() pulumi.BoolPtrOutput
- func (o ProjectOutput) Name() pulumi.StringOutput
- func (o ProjectOutput) SkipDisableOnDestroy() pulumi.BoolPtrOutput
- func (o ProjectOutput) Status() pulumi.IntOutput
- func (o ProjectOutput) ToProjectOutput() ProjectOutput
- func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput
- func (o ProjectOutput) Type() pulumi.StringOutput
- func (o ProjectOutput) UpdatedAt() pulumi.StringOutput
- type ProjectState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v0.0.2
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 LookupProjectArgs ¶
type LookupProjectArgs struct { // Specifies the ID of an enterprise project. The value 0 indicates enterprise project default. Id *string `pulumi:"id"` // Specifies the enterprise project name. Fuzzy search is supported. Name *string `pulumi:"name"` // Specifies the status of an enterprise project. // + 1 indicates Enabled. // + 2 indicates Disabled. Status *int `pulumi:"status"` }
A collection of arguments for invoking getProject.
type LookupProjectOutputArgs ¶
type LookupProjectOutputArgs struct { // Specifies the ID of an enterprise project. The value 0 indicates enterprise project default. Id pulumi.StringPtrInput `pulumi:"id"` // Specifies the enterprise project name. Fuzzy search is supported. Name pulumi.StringPtrInput `pulumi:"name"` // Specifies the status of an enterprise project. // + 1 indicates Enabled. // + 2 indicates Disabled. Status pulumi.IntPtrInput `pulumi:"status"` }
A collection of arguments for invoking getProject.
func (LookupProjectOutputArgs) ElementType ¶
func (LookupProjectOutputArgs) ElementType() reflect.Type
type LookupProjectResult ¶
type LookupProjectResult struct { // Specifies the time (UTC) when the enterprise project was created. Example: 2018-05-18T06:49:06Z CreatedAt string `pulumi:"createdAt"` // Provides supplementary information about the enterprise project. Description string `pulumi:"description"` Id string `pulumi:"id"` Name string `pulumi:"name"` Status int `pulumi:"status"` // Specifies the time (UTC) when the enterprise project was modified. Example: 2018-05-28T02:21:36Z UpdatedAt string `pulumi:"updatedAt"` }
A collection of values returned by getProject.
func LookupProject ¶
func LookupProject(ctx *pulumi.Context, args *LookupProjectArgs, opts ...pulumi.InvokeOption) (*LookupProjectResult, error)
Use this data source to get an enterprise project from HuaweiCloud
## Example Usage
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Eps" "github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/Eps" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Eps.GetProject(ctx, &eps.GetProjectArgs{ Name: pulumi.StringRef("test"), }, nil) if err != nil { return err } return nil }) }
``` ## Resources Supported Currently
<!-- markdownlint-disable MD033 --> Service Name | Resource Name | Sub Resource Name ---- | --- | --- AS | As.Group | BCS | Bcs.Instance | BMS | Bms.Instance | CBR | Cbr.Vault | CCE | Cce.Cluster | huaweicloud_cce_node<br>huaweicloud_cce_node_pool<br>huaweicloud_cce_addon CDM | Cdm.Cluster | CDN | Cdn.Domain | CES | Cse.Alarmrule | DCS | Dcs.Instance | DDS | Dds.Instance | DMS | huaweicloud_dms_kafka_instance<br>huaweicloud_dms_rabbitmq_instance | DNS | huaweicloud_dns_ptrrecord<br>huaweicloud_dns_zone | ECS | Ecs.Instance | EIP | huaweicloud_vpc_eip<br>huaweicloud_vpc_bandwidth | ELB | Elb.Loadbalancer | Dedicated ELB | huaweicloud_elb_certificate<br>huaweicloud_elb_ipgroup<br>huaweicloud_elb_loadbalancer | EVS | Evs.Volume | FGS | FunctionGraph.Function | GaussDB | huaweicloud_gaussdb_cassandra_instance<br>huaweicloud_gaussdb_mysql_instance<br>huaweicloud_gaussdb_opengauss_instance | IMS | Ims.Image | KMS | Dew.Key | NAT | Nat.Gateway | huaweicloud_nat_snat_rule<br>huaweicloud_nat_dnat_rule OBS | Obs.Bucket | huaweicloud_obs_bucket_object<br>huaweicloud_obs_bucket_policy RDS | huaweicloud_rds_instance<br>huaweicloud_rds_read_replica_instance | SFS | huaweicloud_sfs_file_system<br>huaweicloud_sfs_turbo | Sfs.AccessRule SMN | Smn.Topic | VPC | huaweicloud_vpc<br>huaweicloud_networking_secgroup | huaweicloud_vpc_subnet<br>huaweicloud_vpc_route<br>huaweicloud_networking_secgroup_rule <!-- markdownlint-enable MD033 -->
type LookupProjectResultOutput ¶
type LookupProjectResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getProject.
func LookupProjectOutput ¶
func LookupProjectOutput(ctx *pulumi.Context, args LookupProjectOutputArgs, opts ...pulumi.InvokeOption) LookupProjectResultOutput
func (LookupProjectResultOutput) CreatedAt ¶
func (o LookupProjectResultOutput) CreatedAt() pulumi.StringOutput
Specifies the time (UTC) when the enterprise project was created. Example: 2018-05-18T06:49:06Z
func (LookupProjectResultOutput) Description ¶
func (o LookupProjectResultOutput) Description() pulumi.StringOutput
Provides supplementary information about the enterprise project.
func (LookupProjectResultOutput) ElementType ¶
func (LookupProjectResultOutput) ElementType() reflect.Type
func (LookupProjectResultOutput) Id ¶
func (o LookupProjectResultOutput) Id() pulumi.StringOutput
func (LookupProjectResultOutput) Name ¶
func (o LookupProjectResultOutput) Name() pulumi.StringOutput
func (LookupProjectResultOutput) Status ¶
func (o LookupProjectResultOutput) Status() pulumi.IntOutput
func (LookupProjectResultOutput) ToLookupProjectResultOutput ¶
func (o LookupProjectResultOutput) ToLookupProjectResultOutput() LookupProjectResultOutput
func (LookupProjectResultOutput) ToLookupProjectResultOutputWithContext ¶
func (o LookupProjectResultOutput) ToLookupProjectResultOutputWithContext(ctx context.Context) LookupProjectResultOutput
func (LookupProjectResultOutput) UpdatedAt ¶
func (o LookupProjectResultOutput) UpdatedAt() pulumi.StringOutput
Specifies the time (UTC) when the enterprise project was modified. Example: 2018-05-28T02:21:36Z
type Project ¶
type Project struct { pulumi.CustomResourceState // Indicates the time (UTC) when the enterprise project was created. Example: `2018-05-18T06:49:06Z`. CreatedAt pulumi.StringOutput `pulumi:"createdAt"` // Specifies the description of the enterprise project. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies whether to enable the enterprise project. Defaults to **true**. Enable pulumi.BoolPtrOutput `pulumi:"enable"` // Specifies the name of the enterprise project. // This parameter can contain `1` to `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. // The name must be unique in the domain and cannot include any form of the word "default" ("deFaulT", for instance). Name pulumi.StringOutput `pulumi:"name"` // Specifies whether to skip disable the enterprise project on destroy. // Defaults to **false**. SkipDisableOnDestroy pulumi.BoolPtrOutput `pulumi:"skipDisableOnDestroy"` // Indicates the status of an enterprise project. // + **1**: Indicates enabled. // + **2**: Indicates disabled. Status pulumi.IntOutput `pulumi:"status"` // Specifies the type of the enterprise project. // The valid values are **poc** and **prod**, defaults to **prod**. Type pulumi.StringOutput `pulumi:"type"` // Indicates the time (UTC) when the enterprise project was modified. Example: `2018-05-28T02:21:36Z`. UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"` }
Use this resource to manage an enterprise project within HuaweiCloud.
> **NOTE:** Deleting enterprise projects is not support. If you destroy a resource of enterprise project,
the project is only disabled and removed from the state, but it remains in the cloud
## Example Usage
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Eps" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Eps.NewProject(ctx, "test", &Eps.ProjectArgs{ Description: pulumi.String("example project"), }) if err != nil { return err } return nil }) }
```
## Import
Enterprise projects can be imported using their `id`, e.g. bash
```sh
$ pulumi import huaweicloud:Eps/project:Project test 88f889c7-270e-4e77-8230-bf7db08d9b0e
```
func GetProject ¶
func GetProject(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error)
GetProject gets an existing Project 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 NewProject ¶
func NewProject(ctx *pulumi.Context, name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error)
NewProject registers a new resource with the given unique name, arguments, and options.
func (*Project) ElementType ¶
func (*Project) ToProjectOutput ¶
func (i *Project) ToProjectOutput() ProjectOutput
func (*Project) ToProjectOutputWithContext ¶
func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput
type ProjectArgs ¶
type ProjectArgs struct { // Specifies the description of the enterprise project. Description pulumi.StringPtrInput // Specifies whether to enable the enterprise project. Defaults to **true**. Enable pulumi.BoolPtrInput // Specifies the name of the enterprise project. // This parameter can contain `1` to `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. // The name must be unique in the domain and cannot include any form of the word "default" ("deFaulT", for instance). Name pulumi.StringPtrInput // Specifies whether to skip disable the enterprise project on destroy. // Defaults to **false**. SkipDisableOnDestroy pulumi.BoolPtrInput // Specifies the type of the enterprise project. // The valid values are **poc** and **prod**, defaults to **prod**. Type pulumi.StringPtrInput }
The set of arguments for constructing a Project resource.
func (ProjectArgs) ElementType ¶
func (ProjectArgs) ElementType() reflect.Type
type ProjectArray ¶
type ProjectArray []ProjectInput
func (ProjectArray) ElementType ¶
func (ProjectArray) ElementType() reflect.Type
func (ProjectArray) ToProjectArrayOutput ¶
func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput
func (ProjectArray) ToProjectArrayOutputWithContext ¶
func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput
type ProjectArrayInput ¶
type ProjectArrayInput interface { pulumi.Input ToProjectArrayOutput() ProjectArrayOutput ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput }
ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values. You can construct a concrete instance of `ProjectArrayInput` via:
ProjectArray{ ProjectArgs{...} }
type ProjectArrayOutput ¶
type ProjectArrayOutput struct{ *pulumi.OutputState }
func (ProjectArrayOutput) ElementType ¶
func (ProjectArrayOutput) ElementType() reflect.Type
func (ProjectArrayOutput) Index ¶
func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput
func (ProjectArrayOutput) ToProjectArrayOutput ¶
func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput
func (ProjectArrayOutput) ToProjectArrayOutputWithContext ¶
func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput
type ProjectInput ¶
type ProjectInput interface { pulumi.Input ToProjectOutput() ProjectOutput ToProjectOutputWithContext(ctx context.Context) ProjectOutput }
type ProjectMap ¶
type ProjectMap map[string]ProjectInput
func (ProjectMap) ElementType ¶
func (ProjectMap) ElementType() reflect.Type
func (ProjectMap) ToProjectMapOutput ¶
func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput
func (ProjectMap) ToProjectMapOutputWithContext ¶
func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput
type ProjectMapInput ¶
type ProjectMapInput interface { pulumi.Input ToProjectMapOutput() ProjectMapOutput ToProjectMapOutputWithContext(context.Context) ProjectMapOutput }
ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values. You can construct a concrete instance of `ProjectMapInput` via:
ProjectMap{ "key": ProjectArgs{...} }
type ProjectMapOutput ¶
type ProjectMapOutput struct{ *pulumi.OutputState }
func (ProjectMapOutput) ElementType ¶
func (ProjectMapOutput) ElementType() reflect.Type
func (ProjectMapOutput) MapIndex ¶
func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput
func (ProjectMapOutput) ToProjectMapOutput ¶
func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput
func (ProjectMapOutput) ToProjectMapOutputWithContext ¶
func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput
type ProjectOutput ¶
type ProjectOutput struct{ *pulumi.OutputState }
func (ProjectOutput) CreatedAt ¶
func (o ProjectOutput) CreatedAt() pulumi.StringOutput
Indicates the time (UTC) when the enterprise project was created. Example: `2018-05-18T06:49:06Z`.
func (ProjectOutput) Description ¶
func (o ProjectOutput) Description() pulumi.StringPtrOutput
Specifies the description of the enterprise project.
func (ProjectOutput) ElementType ¶
func (ProjectOutput) ElementType() reflect.Type
func (ProjectOutput) Enable ¶
func (o ProjectOutput) Enable() pulumi.BoolPtrOutput
Specifies whether to enable the enterprise project. Defaults to **true**.
func (ProjectOutput) Name ¶
func (o ProjectOutput) Name() pulumi.StringOutput
Specifies the name of the enterprise project. This parameter can contain `1` to `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. The name must be unique in the domain and cannot include any form of the word "default" ("deFaulT", for instance).
func (ProjectOutput) SkipDisableOnDestroy ¶
func (o ProjectOutput) SkipDisableOnDestroy() pulumi.BoolPtrOutput
Specifies whether to skip disable the enterprise project on destroy. Defaults to **false**.
func (ProjectOutput) Status ¶
func (o ProjectOutput) Status() pulumi.IntOutput
Indicates the status of an enterprise project. + **1**: Indicates enabled. + **2**: Indicates disabled.
func (ProjectOutput) ToProjectOutput ¶
func (o ProjectOutput) ToProjectOutput() ProjectOutput
func (ProjectOutput) ToProjectOutputWithContext ¶
func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput
func (ProjectOutput) Type ¶
func (o ProjectOutput) Type() pulumi.StringOutput
Specifies the type of the enterprise project. The valid values are **poc** and **prod**, defaults to **prod**.
func (ProjectOutput) UpdatedAt ¶
func (o ProjectOutput) UpdatedAt() pulumi.StringOutput
Indicates the time (UTC) when the enterprise project was modified. Example: `2018-05-28T02:21:36Z`.
type ProjectState ¶
type ProjectState struct { // Indicates the time (UTC) when the enterprise project was created. Example: `2018-05-18T06:49:06Z`. CreatedAt pulumi.StringPtrInput // Specifies the description of the enterprise project. Description pulumi.StringPtrInput // Specifies whether to enable the enterprise project. Defaults to **true**. Enable pulumi.BoolPtrInput // Specifies the name of the enterprise project. // This parameter can contain `1` to `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. // The name must be unique in the domain and cannot include any form of the word "default" ("deFaulT", for instance). Name pulumi.StringPtrInput // Specifies whether to skip disable the enterprise project on destroy. // Defaults to **false**. SkipDisableOnDestroy pulumi.BoolPtrInput // Indicates the status of an enterprise project. // + **1**: Indicates enabled. // + **2**: Indicates disabled. Status pulumi.IntPtrInput // Specifies the type of the enterprise project. // The valid values are **poc** and **prod**, defaults to **prod**. Type pulumi.StringPtrInput // Indicates the time (UTC) when the enterprise project was modified. Example: `2018-05-28T02:21:36Z`. UpdatedAt pulumi.StringPtrInput }
func (ProjectState) ElementType ¶
func (ProjectState) ElementType() reflect.Type