governance

package
v3.75.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	pulumi.CustomResourceState

	// The ID of the enrolled account.
	// - If you are creating a new resource account, this parameter is not required.
	// - If you are enrolling a existing account to account factory, this parameter is required.
	AccountId pulumi.IntOutput `pulumi:"accountId"`
	// Account name prefix.
	// - This parameter is required if you are creating a new resource account.
	// - If the registration application is applied to an existing account, this parameter does not need to be filled in.
	AccountNamePrefix pulumi.StringPtrOutput `pulumi:"accountNamePrefix"`
	// The tags of the account See `accountTags` below.
	AccountTags AccountAccountTagArrayOutput `pulumi:"accountTags"`
	// The baseline ID.
	//
	// If it is left blank, the system default baseline is used by default.
	BaselineId pulumi.StringOutput `pulumi:"baselineId"`
	// The domain name is used to qualify the login name of RAM users and RAM roles.
	DefaultDomainName pulumi.StringPtrOutput `pulumi:"defaultDomainName"`
	// The account display name.
	// - This parameter is required if you are creating a new resource account.
	// - If the registration application is applied to an existing account, this parameter does not need to be filled in.
	DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
	// The ID of the parent resource folder.
	//
	// If you want to create a new resource account and leave this parameter blank, the account is created in the Root folder by default.
	//
	// If the registration application is applied to an existing account, this parameter does not need to be filled in.
	FolderId pulumi.StringPtrOutput `pulumi:"folderId"`
	// The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.
	PayerAccountId pulumi.IntPtrOutput `pulumi:"payerAccountId"`
	// Account registration status. Value:
	Status pulumi.StringOutput `pulumi:"status"`
}

## Import

Governance Account can be imported using the id, e.g.

```sh $ pulumi import alicloud:governance/account:Account example <id> ```

func GetAccount

func GetAccount(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error)

GetAccount gets an existing Account 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 NewAccount

func NewAccount(ctx *pulumi.Context,
	name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error)

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

func (*Account) ElementType

func (*Account) ElementType() reflect.Type

func (*Account) ToAccountOutput

func (i *Account) ToAccountOutput() AccountOutput

func (*Account) ToAccountOutputWithContext

func (i *Account) ToAccountOutputWithContext(ctx context.Context) AccountOutput

type AccountAccountTag added in v3.65.1

type AccountAccountTag struct {
	// The key of the tags
	TagKey *string `pulumi:"tagKey"`
	// The value of the tags
	TagValue *string `pulumi:"tagValue"`
}

type AccountAccountTagArgs added in v3.65.1

type AccountAccountTagArgs struct {
	// The key of the tags
	TagKey pulumi.StringPtrInput `pulumi:"tagKey"`
	// The value of the tags
	TagValue pulumi.StringPtrInput `pulumi:"tagValue"`
}

func (AccountAccountTagArgs) ElementType added in v3.65.1

func (AccountAccountTagArgs) ElementType() reflect.Type

func (AccountAccountTagArgs) ToAccountAccountTagOutput added in v3.65.1

func (i AccountAccountTagArgs) ToAccountAccountTagOutput() AccountAccountTagOutput

func (AccountAccountTagArgs) ToAccountAccountTagOutputWithContext added in v3.65.1

func (i AccountAccountTagArgs) ToAccountAccountTagOutputWithContext(ctx context.Context) AccountAccountTagOutput

type AccountAccountTagArray added in v3.65.1

type AccountAccountTagArray []AccountAccountTagInput

func (AccountAccountTagArray) ElementType added in v3.65.1

func (AccountAccountTagArray) ElementType() reflect.Type

func (AccountAccountTagArray) ToAccountAccountTagArrayOutput added in v3.65.1

func (i AccountAccountTagArray) ToAccountAccountTagArrayOutput() AccountAccountTagArrayOutput

func (AccountAccountTagArray) ToAccountAccountTagArrayOutputWithContext added in v3.65.1

func (i AccountAccountTagArray) ToAccountAccountTagArrayOutputWithContext(ctx context.Context) AccountAccountTagArrayOutput

type AccountAccountTagArrayInput added in v3.65.1

type AccountAccountTagArrayInput interface {
	pulumi.Input

	ToAccountAccountTagArrayOutput() AccountAccountTagArrayOutput
	ToAccountAccountTagArrayOutputWithContext(context.Context) AccountAccountTagArrayOutput
}

AccountAccountTagArrayInput is an input type that accepts AccountAccountTagArray and AccountAccountTagArrayOutput values. You can construct a concrete instance of `AccountAccountTagArrayInput` via:

AccountAccountTagArray{ AccountAccountTagArgs{...} }

type AccountAccountTagArrayOutput added in v3.65.1

type AccountAccountTagArrayOutput struct{ *pulumi.OutputState }

func (AccountAccountTagArrayOutput) ElementType added in v3.65.1

func (AccountAccountTagArrayOutput) Index added in v3.65.1

func (AccountAccountTagArrayOutput) ToAccountAccountTagArrayOutput added in v3.65.1

func (o AccountAccountTagArrayOutput) ToAccountAccountTagArrayOutput() AccountAccountTagArrayOutput

func (AccountAccountTagArrayOutput) ToAccountAccountTagArrayOutputWithContext added in v3.65.1

func (o AccountAccountTagArrayOutput) ToAccountAccountTagArrayOutputWithContext(ctx context.Context) AccountAccountTagArrayOutput

type AccountAccountTagInput added in v3.65.1

type AccountAccountTagInput interface {
	pulumi.Input

	ToAccountAccountTagOutput() AccountAccountTagOutput
	ToAccountAccountTagOutputWithContext(context.Context) AccountAccountTagOutput
}

AccountAccountTagInput is an input type that accepts AccountAccountTagArgs and AccountAccountTagOutput values. You can construct a concrete instance of `AccountAccountTagInput` via:

AccountAccountTagArgs{...}

type AccountAccountTagOutput added in v3.65.1

type AccountAccountTagOutput struct{ *pulumi.OutputState }

func (AccountAccountTagOutput) ElementType added in v3.65.1

func (AccountAccountTagOutput) ElementType() reflect.Type

func (AccountAccountTagOutput) TagKey added in v3.65.1

The key of the tags

func (AccountAccountTagOutput) TagValue added in v3.65.1

The value of the tags

func (AccountAccountTagOutput) ToAccountAccountTagOutput added in v3.65.1

func (o AccountAccountTagOutput) ToAccountAccountTagOutput() AccountAccountTagOutput

func (AccountAccountTagOutput) ToAccountAccountTagOutputWithContext added in v3.65.1

func (o AccountAccountTagOutput) ToAccountAccountTagOutputWithContext(ctx context.Context) AccountAccountTagOutput

type AccountArgs

type AccountArgs struct {
	// The ID of the enrolled account.
	// - If you are creating a new resource account, this parameter is not required.
	// - If you are enrolling a existing account to account factory, this parameter is required.
	AccountId pulumi.IntPtrInput
	// Account name prefix.
	// - This parameter is required if you are creating a new resource account.
	// - If the registration application is applied to an existing account, this parameter does not need to be filled in.
	AccountNamePrefix pulumi.StringPtrInput
	// The tags of the account See `accountTags` below.
	AccountTags AccountAccountTagArrayInput
	// The baseline ID.
	//
	// If it is left blank, the system default baseline is used by default.
	BaselineId pulumi.StringInput
	// The domain name is used to qualify the login name of RAM users and RAM roles.
	DefaultDomainName pulumi.StringPtrInput
	// The account display name.
	// - This parameter is required if you are creating a new resource account.
	// - If the registration application is applied to an existing account, this parameter does not need to be filled in.
	DisplayName pulumi.StringPtrInput
	// The ID of the parent resource folder.
	//
	// If you want to create a new resource account and leave this parameter blank, the account is created in the Root folder by default.
	//
	// If the registration application is applied to an existing account, this parameter does not need to be filled in.
	FolderId pulumi.StringPtrInput
	// The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.
	PayerAccountId pulumi.IntPtrInput
}

The set of arguments for constructing a Account resource.

func (AccountArgs) ElementType

func (AccountArgs) ElementType() reflect.Type

type AccountArray

type AccountArray []AccountInput

func (AccountArray) ElementType

func (AccountArray) ElementType() reflect.Type

func (AccountArray) ToAccountArrayOutput

func (i AccountArray) ToAccountArrayOutput() AccountArrayOutput

func (AccountArray) ToAccountArrayOutputWithContext

func (i AccountArray) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput

type AccountArrayInput

type AccountArrayInput interface {
	pulumi.Input

	ToAccountArrayOutput() AccountArrayOutput
	ToAccountArrayOutputWithContext(context.Context) AccountArrayOutput
}

AccountArrayInput is an input type that accepts AccountArray and AccountArrayOutput values. You can construct a concrete instance of `AccountArrayInput` via:

AccountArray{ AccountArgs{...} }

type AccountArrayOutput

type AccountArrayOutput struct{ *pulumi.OutputState }

func (AccountArrayOutput) ElementType

func (AccountArrayOutput) ElementType() reflect.Type

func (AccountArrayOutput) Index

func (AccountArrayOutput) ToAccountArrayOutput

func (o AccountArrayOutput) ToAccountArrayOutput() AccountArrayOutput

func (AccountArrayOutput) ToAccountArrayOutputWithContext

func (o AccountArrayOutput) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput

type AccountInput

type AccountInput interface {
	pulumi.Input

	ToAccountOutput() AccountOutput
	ToAccountOutputWithContext(ctx context.Context) AccountOutput
}

type AccountMap

type AccountMap map[string]AccountInput

func (AccountMap) ElementType

func (AccountMap) ElementType() reflect.Type

func (AccountMap) ToAccountMapOutput

func (i AccountMap) ToAccountMapOutput() AccountMapOutput

func (AccountMap) ToAccountMapOutputWithContext

func (i AccountMap) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput

type AccountMapInput

type AccountMapInput interface {
	pulumi.Input

	ToAccountMapOutput() AccountMapOutput
	ToAccountMapOutputWithContext(context.Context) AccountMapOutput
}

AccountMapInput is an input type that accepts AccountMap and AccountMapOutput values. You can construct a concrete instance of `AccountMapInput` via:

AccountMap{ "key": AccountArgs{...} }

type AccountMapOutput

type AccountMapOutput struct{ *pulumi.OutputState }

func (AccountMapOutput) ElementType

func (AccountMapOutput) ElementType() reflect.Type

func (AccountMapOutput) MapIndex

func (AccountMapOutput) ToAccountMapOutput

func (o AccountMapOutput) ToAccountMapOutput() AccountMapOutput

func (AccountMapOutput) ToAccountMapOutputWithContext

func (o AccountMapOutput) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput

type AccountOutput

type AccountOutput struct{ *pulumi.OutputState }

func (AccountOutput) AccountId

func (o AccountOutput) AccountId() pulumi.IntOutput

The ID of the enrolled account. - If you are creating a new resource account, this parameter is not required. - If you are enrolling a existing account to account factory, this parameter is required.

func (AccountOutput) AccountNamePrefix

func (o AccountOutput) AccountNamePrefix() pulumi.StringPtrOutput

Account name prefix. - This parameter is required if you are creating a new resource account. - If the registration application is applied to an existing account, this parameter does not need to be filled in.

func (AccountOutput) AccountTags added in v3.65.1

The tags of the account See `accountTags` below.

func (AccountOutput) BaselineId

func (o AccountOutput) BaselineId() pulumi.StringOutput

The baseline ID.

If it is left blank, the system default baseline is used by default.

func (AccountOutput) DefaultDomainName added in v3.63.0

func (o AccountOutput) DefaultDomainName() pulumi.StringPtrOutput

The domain name is used to qualify the login name of RAM users and RAM roles.

func (AccountOutput) DisplayName

func (o AccountOutput) DisplayName() pulumi.StringPtrOutput

The account display name. - This parameter is required if you are creating a new resource account. - If the registration application is applied to an existing account, this parameter does not need to be filled in.

func (AccountOutput) ElementType

func (AccountOutput) ElementType() reflect.Type

func (AccountOutput) FolderId

func (o AccountOutput) FolderId() pulumi.StringPtrOutput

The ID of the parent resource folder.

If you want to create a new resource account and leave this parameter blank, the account is created in the Root folder by default.

If the registration application is applied to an existing account, this parameter does not need to be filled in.

func (AccountOutput) PayerAccountId

func (o AccountOutput) PayerAccountId() pulumi.IntPtrOutput

The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.

func (AccountOutput) Status

func (o AccountOutput) Status() pulumi.StringOutput

Account registration status. Value:

func (AccountOutput) ToAccountOutput

func (o AccountOutput) ToAccountOutput() AccountOutput

func (AccountOutput) ToAccountOutputWithContext

func (o AccountOutput) ToAccountOutputWithContext(ctx context.Context) AccountOutput

type AccountState

type AccountState struct {
	// The ID of the enrolled account.
	// - If you are creating a new resource account, this parameter is not required.
	// - If you are enrolling a existing account to account factory, this parameter is required.
	AccountId pulumi.IntPtrInput
	// Account name prefix.
	// - This parameter is required if you are creating a new resource account.
	// - If the registration application is applied to an existing account, this parameter does not need to be filled in.
	AccountNamePrefix pulumi.StringPtrInput
	// The tags of the account See `accountTags` below.
	AccountTags AccountAccountTagArrayInput
	// The baseline ID.
	//
	// If it is left blank, the system default baseline is used by default.
	BaselineId pulumi.StringPtrInput
	// The domain name is used to qualify the login name of RAM users and RAM roles.
	DefaultDomainName pulumi.StringPtrInput
	// The account display name.
	// - This parameter is required if you are creating a new resource account.
	// - If the registration application is applied to an existing account, this parameter does not need to be filled in.
	DisplayName pulumi.StringPtrInput
	// The ID of the parent resource folder.
	//
	// If you want to create a new resource account and leave this parameter blank, the account is created in the Root folder by default.
	//
	// If the registration application is applied to an existing account, this parameter does not need to be filled in.
	FolderId pulumi.StringPtrInput
	// The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.
	PayerAccountId pulumi.IntPtrInput
	// Account registration status. Value:
	Status pulumi.StringPtrInput
}

func (AccountState) ElementType

func (AccountState) ElementType() reflect.Type

type Baseline

type Baseline struct {
	pulumi.CustomResourceState

	// List of baseline items.
	//
	// You can invoke [ListAccountFactoryBaselineItems](https://next.api.aliyun.com/document/governance/2021-01-20/ListAccountFactoryBaselineItems) to get a list of account factory baseline items supported by the Cloud Governance Center. See `baselineItems` below.
	BaselineItems BaselineBaselineItemArrayOutput `pulumi:"baselineItems"`
	// Baseline Name.
	BaselineName pulumi.StringPtrOutput `pulumi:"baselineName"`
	// Baseline Description.
	Description pulumi.StringPtrOutput `pulumi:"description"`
}

Provides a Governance Baseline resource.

Account Factory Baseline.

For information about Governance Baseline and how to use it, see [What is Baseline](https://next.api.aliyun.com/document/governance/2021-01-20/CreateAccountFactoryBaseline).

> **NOTE:** Available since v1.228.0.

## Example Usage

Basic Usage

```go package main

import (

"encoding/json"
"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/governance"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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 := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		itemPasswordPolicy := "ACS-BP_ACCOUNT_FACTORY_RAM_USER_PASSWORD_POLICY"
		if param := cfg.Get("itemPasswordPolicy"); param != "" {
			itemPasswordPolicy = param
		}
		baselineNameUpdate := "tf-auto-example-baseline-update"
		if param := cfg.Get("baselineNameUpdate"); param != "" {
			baselineNameUpdate = param
		}
		itemServices := "ACS-BP_ACCOUNT_FACTORY_SUBSCRIBE_SERVICES"
		if param := cfg.Get("itemServices"); param != "" {
			itemServices = param
		}
		baselineName := "tf-auto-example-baseline"
		if param := cfg.Get("baselineName"); param != "" {
			baselineName = param
		}
		itemRamSecurity := "ACS-BP_ACCOUNT_FACTORY_RAM_SECURITY_PREFERENCE"
		if param := cfg.Get("itemRamSecurity"); param != "" {
			itemRamSecurity = param
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"MinimumPasswordLength":      8,
			"RequireLowercaseCharacters": true,
			"RequireUppercaseCharacters": true,
			"RequireNumbers":             true,
			"RequireSymbols":             true,
			"MaxPasswordAge":             0,
			"HardExpiry":                 false,
			"PasswordReusePrevention":    0,
			"MaxLoginAttempts":           0,
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = governance.NewBaseline(ctx, "default", &governance.BaselineArgs{
			BaselineItems: governance.BaselineBaselineItemArray{
				&governance.BaselineBaselineItemArgs{
					Version: pulumi.String("1.0"),
					Name:    pulumi.String(itemPasswordPolicy),
					Config:  pulumi.String(json0),
				},
			},
			Description:  pulumi.String(name),
			BaselineName: pulumi.Sprintf("%v-%v", name, _default.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Governance Baseline can be imported using the id, e.g.

```sh $ pulumi import alicloud:governance/baseline:Baseline example <id> ```

func GetBaseline

func GetBaseline(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *BaselineState, opts ...pulumi.ResourceOption) (*Baseline, error)

GetBaseline gets an existing Baseline 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 NewBaseline

func NewBaseline(ctx *pulumi.Context,
	name string, args *BaselineArgs, opts ...pulumi.ResourceOption) (*Baseline, error)

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

func (*Baseline) ElementType

func (*Baseline) ElementType() reflect.Type

func (*Baseline) ToBaselineOutput

func (i *Baseline) ToBaselineOutput() BaselineOutput

func (*Baseline) ToBaselineOutputWithContext

func (i *Baseline) ToBaselineOutputWithContext(ctx context.Context) BaselineOutput

type BaselineArgs

type BaselineArgs struct {
	// List of baseline items.
	//
	// You can invoke [ListAccountFactoryBaselineItems](https://next.api.aliyun.com/document/governance/2021-01-20/ListAccountFactoryBaselineItems) to get a list of account factory baseline items supported by the Cloud Governance Center. See `baselineItems` below.
	BaselineItems BaselineBaselineItemArrayInput
	// Baseline Name.
	BaselineName pulumi.StringPtrInput
	// Baseline Description.
	Description pulumi.StringPtrInput
}

The set of arguments for constructing a Baseline resource.

func (BaselineArgs) ElementType

func (BaselineArgs) ElementType() reflect.Type

type BaselineArray

type BaselineArray []BaselineInput

func (BaselineArray) ElementType

func (BaselineArray) ElementType() reflect.Type

func (BaselineArray) ToBaselineArrayOutput

func (i BaselineArray) ToBaselineArrayOutput() BaselineArrayOutput

func (BaselineArray) ToBaselineArrayOutputWithContext

func (i BaselineArray) ToBaselineArrayOutputWithContext(ctx context.Context) BaselineArrayOutput

type BaselineArrayInput

type BaselineArrayInput interface {
	pulumi.Input

	ToBaselineArrayOutput() BaselineArrayOutput
	ToBaselineArrayOutputWithContext(context.Context) BaselineArrayOutput
}

BaselineArrayInput is an input type that accepts BaselineArray and BaselineArrayOutput values. You can construct a concrete instance of `BaselineArrayInput` via:

BaselineArray{ BaselineArgs{...} }

type BaselineArrayOutput

type BaselineArrayOutput struct{ *pulumi.OutputState }

func (BaselineArrayOutput) ElementType

func (BaselineArrayOutput) ElementType() reflect.Type

func (BaselineArrayOutput) Index

func (BaselineArrayOutput) ToBaselineArrayOutput

func (o BaselineArrayOutput) ToBaselineArrayOutput() BaselineArrayOutput

func (BaselineArrayOutput) ToBaselineArrayOutputWithContext

func (o BaselineArrayOutput) ToBaselineArrayOutputWithContext(ctx context.Context) BaselineArrayOutput

type BaselineBaselineItem

type BaselineBaselineItem struct {
	// Baseline item configuration. The format is a JSON string.
	Config *string `pulumi:"config"`
	// The baseline item name.
	Name *string `pulumi:"name"`
	// The baseline item version.
	Version *string `pulumi:"version"`
}

type BaselineBaselineItemArgs

type BaselineBaselineItemArgs struct {
	// Baseline item configuration. The format is a JSON string.
	Config pulumi.StringPtrInput `pulumi:"config"`
	// The baseline item name.
	Name pulumi.StringPtrInput `pulumi:"name"`
	// The baseline item version.
	Version pulumi.StringPtrInput `pulumi:"version"`
}

func (BaselineBaselineItemArgs) ElementType

func (BaselineBaselineItemArgs) ElementType() reflect.Type

func (BaselineBaselineItemArgs) ToBaselineBaselineItemOutput

func (i BaselineBaselineItemArgs) ToBaselineBaselineItemOutput() BaselineBaselineItemOutput

func (BaselineBaselineItemArgs) ToBaselineBaselineItemOutputWithContext

func (i BaselineBaselineItemArgs) ToBaselineBaselineItemOutputWithContext(ctx context.Context) BaselineBaselineItemOutput

type BaselineBaselineItemArray

type BaselineBaselineItemArray []BaselineBaselineItemInput

func (BaselineBaselineItemArray) ElementType

func (BaselineBaselineItemArray) ElementType() reflect.Type

func (BaselineBaselineItemArray) ToBaselineBaselineItemArrayOutput

func (i BaselineBaselineItemArray) ToBaselineBaselineItemArrayOutput() BaselineBaselineItemArrayOutput

func (BaselineBaselineItemArray) ToBaselineBaselineItemArrayOutputWithContext

func (i BaselineBaselineItemArray) ToBaselineBaselineItemArrayOutputWithContext(ctx context.Context) BaselineBaselineItemArrayOutput

type BaselineBaselineItemArrayInput

type BaselineBaselineItemArrayInput interface {
	pulumi.Input

	ToBaselineBaselineItemArrayOutput() BaselineBaselineItemArrayOutput
	ToBaselineBaselineItemArrayOutputWithContext(context.Context) BaselineBaselineItemArrayOutput
}

BaselineBaselineItemArrayInput is an input type that accepts BaselineBaselineItemArray and BaselineBaselineItemArrayOutput values. You can construct a concrete instance of `BaselineBaselineItemArrayInput` via:

BaselineBaselineItemArray{ BaselineBaselineItemArgs{...} }

type BaselineBaselineItemArrayOutput

type BaselineBaselineItemArrayOutput struct{ *pulumi.OutputState }

func (BaselineBaselineItemArrayOutput) ElementType

func (BaselineBaselineItemArrayOutput) Index

func (BaselineBaselineItemArrayOutput) ToBaselineBaselineItemArrayOutput

func (o BaselineBaselineItemArrayOutput) ToBaselineBaselineItemArrayOutput() BaselineBaselineItemArrayOutput

func (BaselineBaselineItemArrayOutput) ToBaselineBaselineItemArrayOutputWithContext

func (o BaselineBaselineItemArrayOutput) ToBaselineBaselineItemArrayOutputWithContext(ctx context.Context) BaselineBaselineItemArrayOutput

type BaselineBaselineItemInput

type BaselineBaselineItemInput interface {
	pulumi.Input

	ToBaselineBaselineItemOutput() BaselineBaselineItemOutput
	ToBaselineBaselineItemOutputWithContext(context.Context) BaselineBaselineItemOutput
}

BaselineBaselineItemInput is an input type that accepts BaselineBaselineItemArgs and BaselineBaselineItemOutput values. You can construct a concrete instance of `BaselineBaselineItemInput` via:

BaselineBaselineItemArgs{...}

type BaselineBaselineItemOutput

type BaselineBaselineItemOutput struct{ *pulumi.OutputState }

func (BaselineBaselineItemOutput) Config

Baseline item configuration. The format is a JSON string.

func (BaselineBaselineItemOutput) ElementType

func (BaselineBaselineItemOutput) ElementType() reflect.Type

func (BaselineBaselineItemOutput) Name

The baseline item name.

func (BaselineBaselineItemOutput) ToBaselineBaselineItemOutput

func (o BaselineBaselineItemOutput) ToBaselineBaselineItemOutput() BaselineBaselineItemOutput

func (BaselineBaselineItemOutput) ToBaselineBaselineItemOutputWithContext

func (o BaselineBaselineItemOutput) ToBaselineBaselineItemOutputWithContext(ctx context.Context) BaselineBaselineItemOutput

func (BaselineBaselineItemOutput) Version

The baseline item version.

type BaselineInput

type BaselineInput interface {
	pulumi.Input

	ToBaselineOutput() BaselineOutput
	ToBaselineOutputWithContext(ctx context.Context) BaselineOutput
}

type BaselineMap

type BaselineMap map[string]BaselineInput

func (BaselineMap) ElementType

func (BaselineMap) ElementType() reflect.Type

func (BaselineMap) ToBaselineMapOutput

func (i BaselineMap) ToBaselineMapOutput() BaselineMapOutput

func (BaselineMap) ToBaselineMapOutputWithContext

func (i BaselineMap) ToBaselineMapOutputWithContext(ctx context.Context) BaselineMapOutput

type BaselineMapInput

type BaselineMapInput interface {
	pulumi.Input

	ToBaselineMapOutput() BaselineMapOutput
	ToBaselineMapOutputWithContext(context.Context) BaselineMapOutput
}

BaselineMapInput is an input type that accepts BaselineMap and BaselineMapOutput values. You can construct a concrete instance of `BaselineMapInput` via:

BaselineMap{ "key": BaselineArgs{...} }

type BaselineMapOutput

type BaselineMapOutput struct{ *pulumi.OutputState }

func (BaselineMapOutput) ElementType

func (BaselineMapOutput) ElementType() reflect.Type

func (BaselineMapOutput) MapIndex

func (BaselineMapOutput) ToBaselineMapOutput

func (o BaselineMapOutput) ToBaselineMapOutput() BaselineMapOutput

func (BaselineMapOutput) ToBaselineMapOutputWithContext

func (o BaselineMapOutput) ToBaselineMapOutputWithContext(ctx context.Context) BaselineMapOutput

type BaselineOutput

type BaselineOutput struct{ *pulumi.OutputState }

func (BaselineOutput) BaselineItems

List of baseline items.

You can invoke [ListAccountFactoryBaselineItems](https://next.api.aliyun.com/document/governance/2021-01-20/ListAccountFactoryBaselineItems) to get a list of account factory baseline items supported by the Cloud Governance Center. See `baselineItems` below.

func (BaselineOutput) BaselineName

func (o BaselineOutput) BaselineName() pulumi.StringPtrOutput

Baseline Name.

func (BaselineOutput) Description

func (o BaselineOutput) Description() pulumi.StringPtrOutput

Baseline Description.

func (BaselineOutput) ElementType

func (BaselineOutput) ElementType() reflect.Type

func (BaselineOutput) ToBaselineOutput

func (o BaselineOutput) ToBaselineOutput() BaselineOutput

func (BaselineOutput) ToBaselineOutputWithContext

func (o BaselineOutput) ToBaselineOutputWithContext(ctx context.Context) BaselineOutput

type BaselineState

type BaselineState struct {
	// List of baseline items.
	//
	// You can invoke [ListAccountFactoryBaselineItems](https://next.api.aliyun.com/document/governance/2021-01-20/ListAccountFactoryBaselineItems) to get a list of account factory baseline items supported by the Cloud Governance Center. See `baselineItems` below.
	BaselineItems BaselineBaselineItemArrayInput
	// Baseline Name.
	BaselineName pulumi.StringPtrInput
	// Baseline Description.
	Description pulumi.StringPtrInput
}

func (BaselineState) ElementType

func (BaselineState) ElementType() reflect.Type

type GetBaselinesArgs

type GetBaselinesArgs struct {
	// A list of Baseline IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by Group Metric Rule name.
	NameRegex *string `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getBaselines.

type GetBaselinesBaseline

type GetBaselinesBaseline struct {
	// Baseline ID
	BaselineId string `pulumi:"baselineId"`
	// Baseline Name.
	BaselineName string `pulumi:"baselineName"`
	// Baseline Description.
	Description string `pulumi:"description"`
}

type GetBaselinesBaselineArgs

type GetBaselinesBaselineArgs struct {
	// Baseline ID
	BaselineId pulumi.StringInput `pulumi:"baselineId"`
	// Baseline Name.
	BaselineName pulumi.StringInput `pulumi:"baselineName"`
	// Baseline Description.
	Description pulumi.StringInput `pulumi:"description"`
}

func (GetBaselinesBaselineArgs) ElementType

func (GetBaselinesBaselineArgs) ElementType() reflect.Type

func (GetBaselinesBaselineArgs) ToGetBaselinesBaselineOutput

func (i GetBaselinesBaselineArgs) ToGetBaselinesBaselineOutput() GetBaselinesBaselineOutput

func (GetBaselinesBaselineArgs) ToGetBaselinesBaselineOutputWithContext

func (i GetBaselinesBaselineArgs) ToGetBaselinesBaselineOutputWithContext(ctx context.Context) GetBaselinesBaselineOutput

type GetBaselinesBaselineArray

type GetBaselinesBaselineArray []GetBaselinesBaselineInput

func (GetBaselinesBaselineArray) ElementType

func (GetBaselinesBaselineArray) ElementType() reflect.Type

func (GetBaselinesBaselineArray) ToGetBaselinesBaselineArrayOutput

func (i GetBaselinesBaselineArray) ToGetBaselinesBaselineArrayOutput() GetBaselinesBaselineArrayOutput

func (GetBaselinesBaselineArray) ToGetBaselinesBaselineArrayOutputWithContext

func (i GetBaselinesBaselineArray) ToGetBaselinesBaselineArrayOutputWithContext(ctx context.Context) GetBaselinesBaselineArrayOutput

type GetBaselinesBaselineArrayInput

type GetBaselinesBaselineArrayInput interface {
	pulumi.Input

	ToGetBaselinesBaselineArrayOutput() GetBaselinesBaselineArrayOutput
	ToGetBaselinesBaselineArrayOutputWithContext(context.Context) GetBaselinesBaselineArrayOutput
}

GetBaselinesBaselineArrayInput is an input type that accepts GetBaselinesBaselineArray and GetBaselinesBaselineArrayOutput values. You can construct a concrete instance of `GetBaselinesBaselineArrayInput` via:

GetBaselinesBaselineArray{ GetBaselinesBaselineArgs{...} }

type GetBaselinesBaselineArrayOutput

type GetBaselinesBaselineArrayOutput struct{ *pulumi.OutputState }

func (GetBaselinesBaselineArrayOutput) ElementType

func (GetBaselinesBaselineArrayOutput) Index

func (GetBaselinesBaselineArrayOutput) ToGetBaselinesBaselineArrayOutput

func (o GetBaselinesBaselineArrayOutput) ToGetBaselinesBaselineArrayOutput() GetBaselinesBaselineArrayOutput

func (GetBaselinesBaselineArrayOutput) ToGetBaselinesBaselineArrayOutputWithContext

func (o GetBaselinesBaselineArrayOutput) ToGetBaselinesBaselineArrayOutputWithContext(ctx context.Context) GetBaselinesBaselineArrayOutput

type GetBaselinesBaselineInput

type GetBaselinesBaselineInput interface {
	pulumi.Input

	ToGetBaselinesBaselineOutput() GetBaselinesBaselineOutput
	ToGetBaselinesBaselineOutputWithContext(context.Context) GetBaselinesBaselineOutput
}

GetBaselinesBaselineInput is an input type that accepts GetBaselinesBaselineArgs and GetBaselinesBaselineOutput values. You can construct a concrete instance of `GetBaselinesBaselineInput` via:

GetBaselinesBaselineArgs{...}

type GetBaselinesBaselineOutput

type GetBaselinesBaselineOutput struct{ *pulumi.OutputState }

func (GetBaselinesBaselineOutput) BaselineId

Baseline ID

func (GetBaselinesBaselineOutput) BaselineName

Baseline Name.

func (GetBaselinesBaselineOutput) Description

Baseline Description.

func (GetBaselinesBaselineOutput) ElementType

func (GetBaselinesBaselineOutput) ElementType() reflect.Type

func (GetBaselinesBaselineOutput) ToGetBaselinesBaselineOutput

func (o GetBaselinesBaselineOutput) ToGetBaselinesBaselineOutput() GetBaselinesBaselineOutput

func (GetBaselinesBaselineOutput) ToGetBaselinesBaselineOutputWithContext

func (o GetBaselinesBaselineOutput) ToGetBaselinesBaselineOutputWithContext(ctx context.Context) GetBaselinesBaselineOutput

type GetBaselinesOutputArgs

type GetBaselinesOutputArgs struct {
	// A list of Baseline IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter results by Group Metric Rule name.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getBaselines.

func (GetBaselinesOutputArgs) ElementType

func (GetBaselinesOutputArgs) ElementType() reflect.Type

type GetBaselinesResult

type GetBaselinesResult struct {
	// A list of Baseline Entries. Each element contains the following attributes:
	Baselines []GetBaselinesBaseline `pulumi:"baselines"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of Baseline IDs.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of name of Baselines.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
}

A collection of values returned by getBaselines.

func GetBaselines

func GetBaselines(ctx *pulumi.Context, args *GetBaselinesArgs, opts ...pulumi.InvokeOption) (*GetBaselinesResult, error)

This data source provides Governance Baseline available to the user.[What is Baseline](https://next.api.aliyun.com/document/governance/2021-01-20/CreateAccountFactoryBaseline)

> **NOTE:** Available since v1.228.0.

## Example Usage

```go package main

import (

"encoding/json"
"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/governance"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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 := "terraform_example"; if param := cfg.Get("name"); param != ""{ name = param } defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{ Min: 10000, Max: 99999, }) if err != nil { return err } itemPasswordPolicy := "ACS-BP_ACCOUNT_FACTORY_RAM_USER_PASSWORD_POLICY"; if param := cfg.Get("itemPasswordPolicy"); param != ""{ itemPasswordPolicy = param } itemServices := "ACS-BP_ACCOUNT_FACTORY_SUBSCRIBE_SERVICES"; if param := cfg.Get("itemServices"); param != ""{ itemServices = param } itemRamSecurity := "ACS-BP_ACCOUNT_FACTORY_RAM_SECURITY_PREFERENCE"; if param := cfg.Get("itemRamSecurity"); param != ""{ itemRamSecurity = param } tmpJSON0, err := json.Marshal(map[string]interface{}{ "MinimumPasswordLength": 8, "RequireLowercaseCharacters": true, "RequireUppercaseCharacters": true, "RequireNumbers": true, "RequireSymbols": true, "MaxPasswordAge": 0, "HardExpiry": false, "PasswordReusePrevention": 0, "MaxLoginAttempts": 0, }) if err != nil { return err } json0 := string(tmpJSON0) defaultBaseline, err := governance.NewBaseline(ctx, "default", &governance.BaselineArgs{ BaselineItems: governance.BaselineBaselineItemArray{ &governance.BaselineBaselineItemArgs{ Version: pulumi.String("1.0"), Name: pulumi.String(itemPasswordPolicy), Config: pulumi.String(json0), }, }, Description: pulumi.String(name), BaselineName: pulumi.Sprintf("%v-%v", name, defaultInteger.Result), }) if err != nil { return err } _default := pulumi.All(defaultBaseline.ID(),defaultBaseline.BaselineName).ApplyT(func(_args []interface{}) (governance.GetBaselinesResult, error) { id := _args[0].(string) baselineName := _args[1].(*string) return governance.GetBaselinesResult(interface{}(governance.GetBaselinesOutput(ctx, governance.GetBaselinesOutputArgs{ Ids: []string{ id, }, NameRegex: baselineName, }, nil))), nil }).(governance.GetBaselinesResultOutput) ctx.Export("alicloudGovernanceBaselineExampleId", _default.ApplyT(func(_default governance.GetBaselinesResult) (*string, error) { return &default.Baselines[0].BaselineId, nil }).(pulumi.StringPtrOutput)) return nil }) } ```

type GetBaselinesResultOutput

type GetBaselinesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getBaselines.

func (GetBaselinesResultOutput) Baselines

A list of Baseline Entries. Each element contains the following attributes:

func (GetBaselinesResultOutput) ElementType

func (GetBaselinesResultOutput) ElementType() reflect.Type

func (GetBaselinesResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetBaselinesResultOutput) Ids

A list of Baseline IDs.

func (GetBaselinesResultOutput) NameRegex

func (GetBaselinesResultOutput) Names

A list of name of Baselines.

func (GetBaselinesResultOutput) OutputFile

func (GetBaselinesResultOutput) ToGetBaselinesResultOutput

func (o GetBaselinesResultOutput) ToGetBaselinesResultOutput() GetBaselinesResultOutput

func (GetBaselinesResultOutput) ToGetBaselinesResultOutputWithContext

func (o GetBaselinesResultOutput) ToGetBaselinesResultOutputWithContext(ctx context.Context) GetBaselinesResultOutput

Jump to

Keyboard shortcuts

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