alicloud logo
Alibaba Cloud v3.37.0, May 15 23

alicloud.cloudfirewall.InstanceMember

Explore with Pulumi AI

Provides a Cloud Firewall Instance Member resource.

For information about Cloud Firewall Instance Member and how to use it, see What is Instance Member.

NOTE: Available in v1.194.0+.

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") ?? "AliyunTerraform";
    var defaultAccount = new AliCloud.ResourceManager.Account("defaultAccount", new()
    {
        DisplayName = name,
    });

    var defaultInstanceMember = new AliCloud.CloudFirewall.InstanceMember("defaultInstanceMember", new()
    {
        MemberDesc = name,
        MemberUid = defaultAccount.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudfirewall"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
	"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 := "AliyunTerraform"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		defaultAccount, err := resourcemanager.NewAccount(ctx, "defaultAccount", &resourcemanager.AccountArgs{
			DisplayName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		_, err = cloudfirewall.NewInstanceMember(ctx, "defaultInstanceMember", &cloudfirewall.InstanceMemberArgs{
			MemberDesc: pulumi.String(name),
			MemberUid:  defaultAccount.ID(),
		})
		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.resourcemanager.Account;
import com.pulumi.alicloud.resourcemanager.AccountArgs;
import com.pulumi.alicloud.cloudfirewall.InstanceMember;
import com.pulumi.alicloud.cloudfirewall.InstanceMemberArgs;
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("AliyunTerraform");
        var defaultAccount = new Account("defaultAccount", AccountArgs.builder()        
            .displayName(name)
            .build());

        var defaultInstanceMember = new InstanceMember("defaultInstanceMember", InstanceMemberArgs.builder()        
            .memberDesc(name)
            .memberUid(defaultAccount.id())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "AliyunTerraform"
default_account = alicloud.resourcemanager.Account("defaultAccount", display_name=name)
default_instance_member = alicloud.cloudfirewall.InstanceMember("defaultInstanceMember",
    member_desc=name,
    member_uid=default_account.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "AliyunTerraform";
const defaultAccount = new alicloud.resourcemanager.Account("defaultAccount", {displayName: name});
const defaultInstanceMember = new alicloud.cloudfirewall.InstanceMember("defaultInstanceMember", {
    memberDesc: name,
    memberUid: defaultAccount.id,
});
configuration:
  name:
    type: string
    default: AliyunTerraform
resources:
  defaultAccount:
    type: alicloud:resourcemanager:Account
    properties:
      displayName: ${name}
  defaultInstanceMember:
    type: alicloud:cloudfirewall:InstanceMember
    properties:
      memberDesc: ${name}
      memberUid: ${defaultAccount.id}

Create InstanceMember Resource

new InstanceMember(name: string, args: InstanceMemberArgs, opts?: CustomResourceOptions);
@overload
def InstanceMember(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   member_desc: Optional[str] = None,
                   member_uid: Optional[str] = None)
@overload
def InstanceMember(resource_name: str,
                   args: InstanceMemberArgs,
                   opts: Optional[ResourceOptions] = None)
func NewInstanceMember(ctx *Context, name string, args InstanceMemberArgs, opts ...ResourceOption) (*InstanceMember, error)
public InstanceMember(string name, InstanceMemberArgs args, CustomResourceOptions? opts = null)
public InstanceMember(String name, InstanceMemberArgs args)
public InstanceMember(String name, InstanceMemberArgs args, CustomResourceOptions options)
type: alicloud:cloudfirewall:InstanceMember
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args InstanceMemberArgs
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 InstanceMemberArgs
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 InstanceMemberArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceMemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args InstanceMemberArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

InstanceMember 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 InstanceMember resource accepts the following input properties:

MemberUid string

The UID of the cloud firewall member account.

MemberDesc string

Remarks of cloud firewall member accounts.

MemberUid string

The UID of the cloud firewall member account.

MemberDesc string

Remarks of cloud firewall member accounts.

memberUid String

The UID of the cloud firewall member account.

memberDesc String

Remarks of cloud firewall member accounts.

memberUid string

The UID of the cloud firewall member account.

memberDesc string

Remarks of cloud firewall member accounts.

member_uid str

The UID of the cloud firewall member account.

member_desc str

Remarks of cloud firewall member accounts.

memberUid String

The UID of the cloud firewall member account.

memberDesc String

Remarks of cloud firewall member accounts.

Outputs

All input properties are implicitly available as output properties. Additionally, the InstanceMember resource produces the following output properties:

CreateTime int

When the cloud firewall member account was added.> use second-level timestamp format.

Id string

The provider-assigned unique ID for this managed resource.

MemberDisplayName string

The name of the cloud firewall member account.

ModifyTime int

The last modification time of the cloud firewall member account.> use second-level timestamp format.

Status string

The resource attribute field that represents the resource status.

CreateTime int

When the cloud firewall member account was added.> use second-level timestamp format.

Id string

The provider-assigned unique ID for this managed resource.

MemberDisplayName string

The name of the cloud firewall member account.

ModifyTime int

The last modification time of the cloud firewall member account.> use second-level timestamp format.

Status string

The resource attribute field that represents the resource status.

createTime Integer

When the cloud firewall member account was added.> use second-level timestamp format.

id String

The provider-assigned unique ID for this managed resource.

memberDisplayName String

The name of the cloud firewall member account.

modifyTime Integer

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status String

The resource attribute field that represents the resource status.

createTime number

When the cloud firewall member account was added.> use second-level timestamp format.

id string

The provider-assigned unique ID for this managed resource.

memberDisplayName string

The name of the cloud firewall member account.

modifyTime number

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status string

The resource attribute field that represents the resource status.

create_time int

When the cloud firewall member account was added.> use second-level timestamp format.

id str

The provider-assigned unique ID for this managed resource.

member_display_name str

The name of the cloud firewall member account.

modify_time int

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status str

The resource attribute field that represents the resource status.

createTime Number

When the cloud firewall member account was added.> use second-level timestamp format.

id String

The provider-assigned unique ID for this managed resource.

memberDisplayName String

The name of the cloud firewall member account.

modifyTime Number

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status String

The resource attribute field that represents the resource status.

Look up Existing InstanceMember Resource

Get an existing InstanceMember 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?: InstanceMemberState, opts?: CustomResourceOptions): InstanceMember
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[int] = None,
        member_desc: Optional[str] = None,
        member_display_name: Optional[str] = None,
        member_uid: Optional[str] = None,
        modify_time: Optional[int] = None,
        status: Optional[str] = None) -> InstanceMember
func GetInstanceMember(ctx *Context, name string, id IDInput, state *InstanceMemberState, opts ...ResourceOption) (*InstanceMember, error)
public static InstanceMember Get(string name, Input<string> id, InstanceMemberState? state, CustomResourceOptions? opts = null)
public static InstanceMember get(String name, Output<String> id, InstanceMemberState 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:
CreateTime int

When the cloud firewall member account was added.> use second-level timestamp format.

MemberDesc string

Remarks of cloud firewall member accounts.

MemberDisplayName string

The name of the cloud firewall member account.

MemberUid string

The UID of the cloud firewall member account.

ModifyTime int

The last modification time of the cloud firewall member account.> use second-level timestamp format.

Status string

The resource attribute field that represents the resource status.

CreateTime int

When the cloud firewall member account was added.> use second-level timestamp format.

MemberDesc string

Remarks of cloud firewall member accounts.

MemberDisplayName string

The name of the cloud firewall member account.

MemberUid string

The UID of the cloud firewall member account.

ModifyTime int

The last modification time of the cloud firewall member account.> use second-level timestamp format.

Status string

The resource attribute field that represents the resource status.

createTime Integer

When the cloud firewall member account was added.> use second-level timestamp format.

memberDesc String

Remarks of cloud firewall member accounts.

memberDisplayName String

The name of the cloud firewall member account.

memberUid String

The UID of the cloud firewall member account.

modifyTime Integer

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status String

The resource attribute field that represents the resource status.

createTime number

When the cloud firewall member account was added.> use second-level timestamp format.

memberDesc string

Remarks of cloud firewall member accounts.

memberDisplayName string

The name of the cloud firewall member account.

memberUid string

The UID of the cloud firewall member account.

modifyTime number

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status string

The resource attribute field that represents the resource status.

create_time int

When the cloud firewall member account was added.> use second-level timestamp format.

member_desc str

Remarks of cloud firewall member accounts.

member_display_name str

The name of the cloud firewall member account.

member_uid str

The UID of the cloud firewall member account.

modify_time int

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status str

The resource attribute field that represents the resource status.

createTime Number

When the cloud firewall member account was added.> use second-level timestamp format.

memberDesc String

Remarks of cloud firewall member accounts.

memberDisplayName String

The name of the cloud firewall member account.

memberUid String

The UID of the cloud firewall member account.

modifyTime Number

The last modification time of the cloud firewall member account.> use second-level timestamp format.

status String

The resource attribute field that represents the resource status.

Import

Cloud Firewall Instance Member can be imported using the id, e.g.

 $ pulumi import alicloud:cloudfirewall/instanceMember:InstanceMember example <id>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.