1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cloudfirewall
  5. InstanceMember
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";

const config = new pulumi.Config();
const name = config.get("name") || "AliyunTerraform";
const _default = new random.index.Integer("default", {
    min: 10000,
    max: 99999,
});
const defaultAccount = new alicloud.resourcemanager.Account("default", {displayName: `${name}-${_default.result}`});
const defaultInstanceMember = new alicloud.cloudfirewall.InstanceMember("default", {
    memberDesc: `${name}-${_default.result}`,
    memberUid: defaultAccount.id,
});
Copy
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "AliyunTerraform"
default = random.index.Integer("default",
    min=10000,
    max=99999)
default_account = alicloud.resourcemanager.Account("default", display_name=f"{name}-{default['result']}")
default_instance_member = alicloud.cloudfirewall.InstanceMember("default",
    member_desc=f"{name}-{default['result']}",
    member_uid=default_account.id)
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudfirewall"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
	"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 := "AliyunTerraform"
		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
		}
		defaultAccount, err := resourcemanager.NewAccount(ctx, "default", &resourcemanager.AccountArgs{
			DisplayName: pulumi.Sprintf("%v-%v", name, _default.Result),
		})
		if err != nil {
			return err
		}
		_, err = cloudfirewall.NewInstanceMember(ctx, "default", &cloudfirewall.InstanceMemberArgs{
			MemberDesc: pulumi.Sprintf("%v-%v", name, _default.Result),
			MemberUid:  defaultAccount.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "AliyunTerraform";
    var @default = new Random.Index.Integer("default", new()
    {
        Min = 10000,
        Max = 99999,
    });

    var defaultAccount = new AliCloud.ResourceManager.Account("default", new()
    {
        DisplayName = $"{name}-{@default.Result}",
    });

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

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
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 default_ = new Integer("default", IntegerArgs.builder()
            .min(10000)
            .max(99999)
            .build());

        var defaultAccount = new Account("defaultAccount", AccountArgs.builder()
            .displayName(String.format("%s-%s", name,default_.result()))
            .build());

        var defaultInstanceMember = new InstanceMember("defaultInstanceMember", InstanceMemberArgs.builder()
            .memberDesc(String.format("%s-%s", name,default_.result()))
            .memberUid(defaultAccount.id())
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: AliyunTerraform
resources:
  default:
    type: random:integer
    properties:
      min: 10000
      max: 99999
  defaultAccount:
    type: alicloud:resourcemanager:Account
    name: default
    properties:
      displayName: ${name}-${default.result}
  defaultInstanceMember:
    type: alicloud:cloudfirewall:InstanceMember
    name: default
    properties:
      memberDesc: ${name}-${default.result}
      memberUid: ${defaultAccount.id}
Copy

Create InstanceMember Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new InstanceMember(name: string, args: InstanceMemberArgs, opts?: CustomResourceOptions);
@overload
def InstanceMember(resource_name: str,
                   args: InstanceMemberArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def InstanceMember(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   member_uid: Optional[str] = None,
                   member_desc: Optional[str] = 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.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var instanceMemberResource = new AliCloud.CloudFirewall.InstanceMember("instanceMemberResource", new()
{
    MemberUid = "string",
    MemberDesc = "string",
});
Copy
example, err := cloudfirewall.NewInstanceMember(ctx, "instanceMemberResource", &cloudfirewall.InstanceMemberArgs{
	MemberUid:  pulumi.String("string"),
	MemberDesc: pulumi.String("string"),
})
Copy
var instanceMemberResource = new InstanceMember("instanceMemberResource", InstanceMemberArgs.builder()
    .memberUid("string")
    .memberDesc("string")
    .build());
Copy
instance_member_resource = alicloud.cloudfirewall.InstanceMember("instanceMemberResource",
    member_uid="string",
    member_desc="string")
Copy
const instanceMemberResource = new alicloud.cloudfirewall.InstanceMember("instanceMemberResource", {
    memberUid: "string",
    memberDesc: "string",
});
Copy
type: alicloud:cloudfirewall:InstanceMember
properties:
    memberDesc: string
    memberUid: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The InstanceMember resource accepts the following input properties:

MemberUid
This property is required.
Changes to this property will trigger replacement.
string
The UID of the cloud firewall member account.
MemberDesc string
Remarks of cloud firewall member accounts.
MemberUid
This property is required.
Changes to this property will trigger replacement.
string
The UID of the cloud firewall member account.
MemberDesc string
Remarks of cloud firewall member accounts.
memberUid
This property is required.
Changes to this property will trigger replacement.
String
The UID of the cloud firewall member account.
memberDesc String
Remarks of cloud firewall member accounts.
memberUid
This property is required.
Changes to this property will trigger replacement.
string
The UID of the cloud firewall member account.
memberDesc string
Remarks of cloud firewall member accounts.
member_uid
This property is required.
Changes to this property will trigger replacement.
str
The UID of the cloud firewall member account.
member_desc str
Remarks of cloud firewall member accounts.
memberUid
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: alicloud:cloudfirewall:InstanceMember    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.