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 since v1.178.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.cloudfirewall.AddressBook("example", {
description: "example_value",
groupName: "example_value",
groupType: "tag",
tagRelation: "and",
autoAddTagEcs: 0,
ecsTags: [{
tagKey: "created",
tagValue: "tfTestAcc0",
}],
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.cloudfirewall.AddressBook("example",
description="example_value",
group_name="example_value",
group_type="tag",
tag_relation="and",
auto_add_tag_ecs=0,
ecs_tags=[{
"tag_key": "created",
"tag_value": "tfTestAcc0",
}])
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{
Description: pulumi.String("example_value"),
GroupName: pulumi.String("example_value"),
GroupType: pulumi.String("tag"),
TagRelation: pulumi.String("and"),
AutoAddTagEcs: pulumi.Int(0),
EcsTags: cloudfirewall.AddressBookEcsTagArray{
&cloudfirewall.AddressBookEcsTagArgs{
TagKey: pulumi.String("created"),
TagValue: pulumi.String("tfTestAcc0"),
},
},
})
if err != nil {
return err
}
return nil
})
}
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()
{
Description = "example_value",
GroupName = "example_value",
GroupType = "tag",
TagRelation = "and",
AutoAddTagEcs = 0,
EcsTags = new[]
{
new AliCloud.CloudFirewall.Inputs.AddressBookEcsTagArgs
{
TagKey = "created",
TagValue = "tfTestAcc0",
},
},
});
});
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()
.description("example_value")
.groupName("example_value")
.groupType("tag")
.tagRelation("and")
.autoAddTagEcs(0)
.ecsTags(AddressBookEcsTagArgs.builder()
.tagKey("created")
.tagValue("tfTestAcc0")
.build())
.build());
}
}
resources:
example:
type: alicloud:cloudfirewall:AddressBook
properties:
description: example_value
groupName: example_value
groupType: tag
tagRelation: and
autoAddTagEcs: 0
ecsTags:
- tagKey: created
tagValue: tfTestAcc0
Create AddressBook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AddressBook(name: string, args: AddressBookArgs, opts?: CustomResourceOptions);
@overload
def AddressBook(resource_name: str,
args: AddressBookArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AddressBook(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
group_name: Optional[str] = None,
group_type: Optional[str] = None,
address_lists: Optional[Sequence[str]] = None,
auto_add_tag_ecs: Optional[int] = None,
ecs_tags: Optional[Sequence[AddressBookEcsTagArgs]] = None,
lang: Optional[str] = None,
tag_relation: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var addressBookResource = new AliCloud.CloudFirewall.AddressBook("addressBookResource", new()
{
Description = "string",
GroupName = "string",
GroupType = "string",
AddressLists = new[]
{
"string",
},
AutoAddTagEcs = 0,
EcsTags = new[]
{
new AliCloud.CloudFirewall.Inputs.AddressBookEcsTagArgs
{
TagKey = "string",
TagValue = "string",
},
},
Lang = "string",
TagRelation = "string",
});
example, err := cloudfirewall.NewAddressBook(ctx, "addressBookResource", &cloudfirewall.AddressBookArgs{
Description: pulumi.String("string"),
GroupName: pulumi.String("string"),
GroupType: pulumi.String("string"),
AddressLists: pulumi.StringArray{
pulumi.String("string"),
},
AutoAddTagEcs: pulumi.Int(0),
EcsTags: cloudfirewall.AddressBookEcsTagArray{
&cloudfirewall.AddressBookEcsTagArgs{
TagKey: pulumi.String("string"),
TagValue: pulumi.String("string"),
},
},
Lang: pulumi.String("string"),
TagRelation: pulumi.String("string"),
})
var addressBookResource = new AddressBook("addressBookResource", AddressBookArgs.builder()
.description("string")
.groupName("string")
.groupType("string")
.addressLists("string")
.autoAddTagEcs(0)
.ecsTags(AddressBookEcsTagArgs.builder()
.tagKey("string")
.tagValue("string")
.build())
.lang("string")
.tagRelation("string")
.build());
address_book_resource = alicloud.cloudfirewall.AddressBook("addressBookResource",
description="string",
group_name="string",
group_type="string",
address_lists=["string"],
auto_add_tag_ecs=0,
ecs_tags=[alicloud.cloudfirewall.AddressBookEcsTagArgs(
tag_key="string",
tag_value="string",
)],
lang="string",
tag_relation="string")
const addressBookResource = new alicloud.cloudfirewall.AddressBook("addressBookResource", {
description: "string",
groupName: "string",
groupType: "string",
addressLists: ["string"],
autoAddTagEcs: 0,
ecsTags: [{
tagKey: "string",
tagValue: "string",
}],
lang: "string",
tagRelation: "string",
});
type: alicloud:cloudfirewall:AddressBook
properties:
addressLists:
- string
autoAddTagEcs: 0
description: string
ecsTags:
- tagKey: string
tagValue: string
groupName: string
groupType: string
lang: string
tagRelation: string
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
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - 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> - A list of ECS tags. See
ecs_tags
below. - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Tag
Relation string - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - 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
ecs_tags
below. - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Tag
Relation string - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - 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> - A list of ECS tags. See
ecs_tags
below. - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - tag
Relation String - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - 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[] - A list of ECS tags. See
ecs_tags
below. - lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - tag
Relation string - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - 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
ecs_tags
below. - lang str
- The language of the content within the request and response. Valid values:
zh
,en
. - tag_
relation str - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - 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
ecs_tags
below. - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - tag
Relation String - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
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> - A list of ECS tags. See
ecs_tags
below. - Group
Name string - The name of the Address Book.
- Group
Type string - The type of the Address Book. Valid values:
ip
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Tag
Relation string - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
ecs_tags
below. - Group
Name string - The name of the Address Book.
- Group
Type string - The type of the Address Book. Valid values:
ip
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Tag
Relation string - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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> - A list of ECS tags. See
ecs_tags
below. - group
Name String - The name of the Address Book.
- group
Type String - The type of the Address Book. Valid values:
ip
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - tag
Relation String - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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[] - A list of ECS tags. See
ecs_tags
below. - group
Name string - The name of the Address Book.
- group
Type string - The type of the Address Book. Valid values:
ip
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - tag
Relation string - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
ecs_tags
below. - group_
name str - The name of the Address Book.
- group_
type str - The type of the Address Book. Valid values:
ip
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - lang str
- The language of the content within the request and response. Valid values:
zh
,en
. - tag_
relation str - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
- 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
ecs_tags
below. - group
Name String - The name of the Address Book.
- group
Type String - The type of the Address Book. Valid values:
ip
,ipv6
,domain
,port
,tag
. NOTE: From version 1.213.1,group_type
can be set toipv6
,domain
,port
. - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - tag
Relation String - The logical relation among the ECS tags that to be matched. Default value:
and
. Valid values:
Supporting Types
AddressBookEcsTag, AddressBookEcsTagArgs
Import
Cloud Firewall Address Book can be imported using the id, e.g.
$ pulumi import alicloud:cloudfirewall/addressBook:AddressBook 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.