alicloud.cloudfirewall.AddressBook
Explore with Pulumi AI
Provides a Cloud Firewall Address Book resource.
For information about Cloud Firewall Address Book and how to use it, see What is Address Book.
NOTE: Available in v1.178.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.CloudFirewall.AddressBook("example", new()
{
AutoAddTagEcs = 0,
Description = "example_value",
EcsTags = new[]
{
new AliCloud.CloudFirewall.Inputs.AddressBookEcsTagArgs
{
TagKey = "created",
TagValue = "tfTestAcc0",
},
},
GroupName = "example_value",
GroupType = "tag",
TagRelation = "and",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudfirewall"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfirewall.NewAddressBook(ctx, "example", &cloudfirewall.AddressBookArgs{
AutoAddTagEcs: pulumi.Int(0),
Description: pulumi.String("example_value"),
EcsTags: cloudfirewall.AddressBookEcsTagArray{
&cloudfirewall.AddressBookEcsTagArgs{
TagKey: pulumi.String("created"),
TagValue: pulumi.String("tfTestAcc0"),
},
},
GroupName: pulumi.String("example_value"),
GroupType: pulumi.String("tag"),
TagRelation: pulumi.String("and"),
})
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.cloudfirewall.AddressBook;
import com.pulumi.alicloud.cloudfirewall.AddressBookArgs;
import com.pulumi.alicloud.cloudfirewall.inputs.AddressBookEcsTagArgs;
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) {
var example = new AddressBook("example", AddressBookArgs.builder()
.autoAddTagEcs(0)
.description("example_value")
.ecsTags(AddressBookEcsTagArgs.builder()
.tagKey("created")
.tagValue("tfTestAcc0")
.build())
.groupName("example_value")
.groupType("tag")
.tagRelation("and")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.cloudfirewall.AddressBook("example",
auto_add_tag_ecs=0,
description="example_value",
ecs_tags=[alicloud.cloudfirewall.AddressBookEcsTagArgs(
tag_key="created",
tag_value="tfTestAcc0",
)],
group_name="example_value",
group_type="tag",
tag_relation="and")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.cloudfirewall.AddressBook("example", {
autoAddTagEcs: 0,
description: "example_value",
ecsTags: [{
tagKey: "created",
tagValue: "tfTestAcc0",
}],
groupName: "example_value",
groupType: "tag",
tagRelation: "and",
});
resources:
example:
type: alicloud:cloudfirewall:AddressBook
properties:
autoAddTagEcs: 0
description: example_value
ecsTags:
- tagKey: created
tagValue: tfTestAcc0
groupName: example_value
groupType: tag
tagRelation: and
Create AddressBook Resource
new AddressBook(name: string, args: AddressBookArgs, opts?: CustomResourceOptions);
@overload
def AddressBook(resource_name: str,
opts: Optional[ResourceOptions] = None,
address_lists: Optional[Sequence[str]] = None,
auto_add_tag_ecs: Optional[int] = None,
description: Optional[str] = None,
ecs_tags: Optional[Sequence[AddressBookEcsTagArgs]] = None,
group_name: Optional[str] = None,
group_type: Optional[str] = None,
lang: Optional[str] = None,
tag_relation: Optional[str] = None)
@overload
def AddressBook(resource_name: str,
args: AddressBookArgs,
opts: Optional[ResourceOptions] = None)
func NewAddressBook(ctx *Context, name string, args AddressBookArgs, opts ...ResourceOption) (*AddressBook, error)
public AddressBook(string name, AddressBookArgs args, CustomResourceOptions? opts = null)
public AddressBook(String name, AddressBookArgs args)
public AddressBook(String name, AddressBookArgs args, CustomResourceOptions options)
type: alicloud:cloudfirewall:AddressBook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AddressBookArgs
- 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 AddressBookArgs
- 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 AddressBookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AddressBookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AddressBookArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AddressBook 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 AddressBook resource accepts the following input properties:
- Description string
The description of the Address Book.
- Group
Name string The name of the Address Book.
- Group
Type string The type of the Address Book. Valid values:
ip
,tag
.- Address
Lists List<string> The list of addresses.
- Auto
Add intTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- List<Pulumi.
Ali Cloud. Cloud Firewall. Inputs. Address Book Ecs Tag Args> A list of ECS tags. See the following
Block ecs_tags
.- Lang string
The language of the content within the request and response. Valid values:
en
,zh
.- Tag
Relation string The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- Description string
The description of the Address Book.
- Group
Name string The name of the Address Book.
- Group
Type string The type of the Address Book. Valid values:
ip
,tag
.- Address
Lists []string The list of addresses.
- Auto
Add intTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- []Address
Book Ecs Tag Args A list of ECS tags. See the following
Block ecs_tags
.- Lang string
The language of the content within the request and response. Valid values:
en
,zh
.- Tag
Relation string The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- description String
The description of the Address Book.
- group
Name String The name of the Address Book.
- group
Type String The type of the Address Book. Valid values:
ip
,tag
.- address
Lists List<String> The list of addresses.
- auto
Add IntegerTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- List<Address
Book Ecs Tag Args> A list of ECS tags. See the following
Block ecs_tags
.- lang String
The language of the content within the request and response. Valid values:
en
,zh
.- tag
Relation String The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- description string
The description of the Address Book.
- group
Name string The name of the Address Book.
- group
Type string The type of the Address Book. Valid values:
ip
,tag
.- address
Lists string[] The list of addresses.
- auto
Add numberTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- Address
Book Ecs Tag Args[] A list of ECS tags. See the following
Block ecs_tags
.- lang string
The language of the content within the request and response. Valid values:
en
,zh
.- tag
Relation string The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- description str
The description of the Address Book.
- group_
name str The name of the Address Book.
- group_
type str The type of the Address Book. Valid values:
ip
,tag
.- address_
lists Sequence[str] The list of addresses.
- auto_
add_ inttag_ ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- Sequence[Address
Book Ecs Tag Args] A list of ECS tags. See the following
Block ecs_tags
.- lang str
The language of the content within the request and response. Valid values:
en
,zh
.- tag_
relation str The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- description String
The description of the Address Book.
- group
Name String The name of the Address Book.
- group
Type String The type of the Address Book. Valid values:
ip
,tag
.- address
Lists List<String> The list of addresses.
- auto
Add NumberTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- List<Property Map>
A list of ECS tags. See the following
Block ecs_tags
.- lang String
The language of the content within the request and response. Valid values:
en
,zh
.- tag
Relation String The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
Outputs
All input properties are implicitly available as output properties. Additionally, the AddressBook resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing AddressBook Resource
Get an existing AddressBook 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?: AddressBookState, opts?: CustomResourceOptions): AddressBook
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address_lists: Optional[Sequence[str]] = None,
auto_add_tag_ecs: Optional[int] = None,
description: Optional[str] = None,
ecs_tags: Optional[Sequence[AddressBookEcsTagArgs]] = None,
group_name: Optional[str] = None,
group_type: Optional[str] = None,
lang: Optional[str] = None,
tag_relation: Optional[str] = None) -> AddressBook
func GetAddressBook(ctx *Context, name string, id IDInput, state *AddressBookState, opts ...ResourceOption) (*AddressBook, error)
public static AddressBook Get(string name, Input<string> id, AddressBookState? state, CustomResourceOptions? opts = null)
public static AddressBook get(String name, Output<String> id, AddressBookState 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.
- Address
Lists List<string> The list of addresses.
- Auto
Add intTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- Description string
The description of the Address Book.
- List<Pulumi.
Ali Cloud. Cloud Firewall. Inputs. Address Book Ecs Tag Args> A list of ECS tags. See the following
Block ecs_tags
.- Group
Name string The name of the Address Book.
- Group
Type string The type of the Address Book. Valid values:
ip
,tag
.- Lang string
The language of the content within the request and response. Valid values:
en
,zh
.- Tag
Relation string The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- Address
Lists []string The list of addresses.
- Auto
Add intTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- Description string
The description of the Address Book.
- []Address
Book Ecs Tag Args A list of ECS tags. See the following
Block ecs_tags
.- Group
Name string The name of the Address Book.
- Group
Type string The type of the Address Book. Valid values:
ip
,tag
.- Lang string
The language of the content within the request and response. Valid values:
en
,zh
.- Tag
Relation string The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- address
Lists List<String> The list of addresses.
- auto
Add IntegerTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- description String
The description of the Address Book.
- List<Address
Book Ecs Tag Args> A list of ECS tags. See the following
Block ecs_tags
.- group
Name String The name of the Address Book.
- group
Type String The type of the Address Book. Valid values:
ip
,tag
.- lang String
The language of the content within the request and response. Valid values:
en
,zh
.- tag
Relation String The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- address
Lists string[] The list of addresses.
- auto
Add numberTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- description string
The description of the Address Book.
- Address
Book Ecs Tag Args[] A list of ECS tags. See the following
Block ecs_tags
.- group
Name string The name of the Address Book.
- group
Type string The type of the Address Book. Valid values:
ip
,tag
.- lang string
The language of the content within the request and response. Valid values:
en
,zh
.- tag
Relation string The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- address_
lists Sequence[str] The list of addresses.
- auto_
add_ inttag_ ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- description str
The description of the Address Book.
- Sequence[Address
Book Ecs Tag Args] A list of ECS tags. See the following
Block ecs_tags
.- group_
name str The name of the Address Book.
- group_
type str The type of the Address Book. Valid values:
ip
,tag
.- lang str
The language of the content within the request and response. Valid values:
en
,zh
.- tag_
relation str The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
- address
Lists List<String> The list of addresses.
- auto
Add NumberTag Ecs Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values:
0
,1
.- description String
The description of the Address Book.
- List<Property Map>
A list of ECS tags. See the following
Block ecs_tags
.- group
Name String The name of the Address Book.
- group
Type String The type of the Address Book. Valid values:
ip
,tag
.- lang String
The language of the content within the request and response. Valid values:
en
,zh
.- tag
Relation String The logical relation among the ECS tags that to be matched. Valid values:
- and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the Address Book. This is the default value.
- or: The public IP addresses of ECS instances that match one of the specified tags can be added to the Address Book.
Supporting Types
AddressBookEcsTag
Import
Cloud Firewall Address Book can be imported using the id, e.g.
$ pulumi import alicloud:cloudfirewall/addressBook:AddressBook 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.