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,
});
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)
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
}
_, 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.String(fmt.Sprintf("%v-%v", name, _default.Result)),
})
if err != nil {
return err
}
_, err = cloudfirewall.NewInstanceMember(ctx, "default", &cloudfirewall.InstanceMemberArgs{
MemberDesc: pulumi.String(fmt.Sprintf("%v-%v", name, _default.Result)),
MemberUid: defaultAccount.ID(),
})
if err != nil {
return err
}
return nil
})
}
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,
});
});
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());
}
}
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}
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 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.
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",
});
example, err := cloudfirewall.NewInstanceMember(ctx, "instanceMemberResource", &cloudfirewall.InstanceMemberArgs{
MemberUid: pulumi.String("string"),
MemberDesc: pulumi.String("string"),
})
var instanceMemberResource = new InstanceMember("instanceMemberResource", InstanceMemberArgs.builder()
.memberUid("string")
.memberDesc("string")
.build());
instance_member_resource = alicloud.cloudfirewall.InstanceMember("instanceMemberResource",
member_uid="string",
member_desc="string")
const instanceMemberResource = new alicloud.cloudfirewall.InstanceMember("instanceMemberResource", {
memberUid: "string",
memberDesc: "string",
});
type: alicloud:cloudfirewall:InstanceMember
properties:
memberDesc: string
memberUid: string
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:
- Member
Uid string - The UID of the cloud firewall member account.
- Member
Desc string - Remarks of cloud firewall member accounts.
- Member
Uid string - The UID of the cloud firewall member account.
- Member
Desc string - Remarks of cloud firewall member accounts.
- member
Uid String - The UID of the cloud firewall member account.
- member
Desc String - Remarks of cloud firewall member accounts.
- member
Uid string - The UID of the cloud firewall member account.
- member
Desc 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.
- member
Uid String - The UID of the cloud firewall member account.
- member
Desc 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:
- Create
Time 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.
- Member
Display stringName - 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 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 string
- The provider-assigned unique ID for this managed resource.
- Member
Display stringName - 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 string
- The resource attribute field that represents the resource status.
- create
Time 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.
- member
Display StringName - The name of the cloud firewall member account.
- modify
Time 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.
- create
Time 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.
- member
Display stringName - The name of the cloud firewall member account.
- modify
Time 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_ strname - 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.
- create
Time 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.
- member
Display StringName - The name of the cloud firewall member account.
- modify
Time 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.
- Create
Time int - When the cloud firewall member account was added.> use second-level timestamp format.
- Member
Desc string - Remarks of cloud firewall member accounts.
- Member
Display stringName - The name of the cloud firewall member account.
- Member
Uid string - 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 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 string - Remarks of cloud firewall member accounts.
- Member
Display stringName - The name of the cloud firewall member account.
- Member
Uid string - 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 string
- The resource attribute field that represents the resource status.
- create
Time Integer - When the cloud firewall member account was added.> use second-level timestamp format.
- member
Desc String - Remarks of cloud firewall member accounts.
- member
Display StringName - The name of the cloud firewall member account.
- member
Uid String - The UID of the cloud firewall member account.
- modify
Time 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.
- create
Time number - When the cloud firewall member account was added.> use second-level timestamp format.
- member
Desc string - Remarks of cloud firewall member accounts.
- member
Display stringName - The name of the cloud firewall member account.
- member
Uid string - The UID of the cloud firewall member account.
- modify
Time 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_ strname - 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.
- create
Time Number - When the cloud firewall member account was added.> use second-level timestamp format.
- member
Desc String - Remarks of cloud firewall member accounts.
- member
Display StringName - The name of the cloud firewall member account.
- member
Uid String - The UID of the cloud firewall member account.
- modify
Time 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>
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.