1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cloudfirewall
  5. AddressBook
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.cloudfirewall.AddressBook

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

    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=[alicloud.cloudfirewall.AddressBookEcsTagArgs(
            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.

    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.
    GroupName string
    The name of the Address Book.
    GroupType 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 to ipv6, domain, port.
    AddressLists List<string>
    The list of addresses.
    AutoAddTagEcs int
    Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
    EcsTags List<Pulumi.AliCloud.CloudFirewall.Inputs.AddressBookEcsTag>
    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.
    TagRelation 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.
    GroupName string
    The name of the Address Book.
    GroupType 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 to ipv6, domain, port.
    AddressLists []string
    The list of addresses.
    AutoAddTagEcs int
    Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
    EcsTags []AddressBookEcsTagArgs
    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.
    TagRelation 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.
    groupName String
    The name of the Address Book.
    groupType 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 to ipv6, domain, port.
    addressLists List<String>
    The list of addresses.
    autoAddTagEcs Integer
    Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
    ecsTags List<AddressBookEcsTag>
    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.
    tagRelation 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.
    groupName string
    The name of the Address Book.
    groupType 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 to ipv6, domain, port.
    addressLists string[]
    The list of addresses.
    autoAddTagEcs number
    Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
    ecsTags AddressBookEcsTag[]
    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.
    tagRelation 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 to ipv6, domain, port.
    address_lists Sequence[str]
    The list of addresses.
    auto_add_tag_ecs int
    Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
    ecs_tags Sequence[AddressBookEcsTagArgs]
    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.
    groupName String
    The name of the Address Book.
    groupType 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 to ipv6, domain, port.
    addressLists List<String>
    The list of addresses.
    autoAddTagEcs Number
    Whether you want to automatically add new matching tags of the ECS IP address to the Address Book. Valid values: 0, 1.
    ecsTags 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.
    tagRelation 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.
    The following state arguments are supported:
    AddressLists List<string>
    The list of addresses.
    AutoAddTagEcs int
    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.
    EcsTags List<Pulumi.AliCloud.CloudFirewall.Inputs.AddressBookEcsTag>
    A list of ECS tags. See ecs_tags below.
    GroupName string
    The name of the Address Book.
    GroupType 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 to ipv6, domain, port.
    Lang string
    The language of the content within the request and response. Valid values: zh, en.
    TagRelation string
    The logical relation among the ECS tags that to be matched. Default value: and. Valid values:
    AddressLists []string
    The list of addresses.
    AutoAddTagEcs int
    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.
    EcsTags []AddressBookEcsTagArgs
    A list of ECS tags. See ecs_tags below.
    GroupName string
    The name of the Address Book.
    GroupType 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 to ipv6, domain, port.
    Lang string
    The language of the content within the request and response. Valid values: zh, en.
    TagRelation string
    The logical relation among the ECS tags that to be matched. Default value: and. Valid values:
    addressLists List<String>
    The list of addresses.
    autoAddTagEcs Integer
    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.
    ecsTags List<AddressBookEcsTag>
    A list of ECS tags. See ecs_tags below.
    groupName String
    The name of the Address Book.
    groupType 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 to ipv6, domain, port.
    lang String
    The language of the content within the request and response. Valid values: zh, en.
    tagRelation String
    The logical relation among the ECS tags that to be matched. Default value: and. Valid values:
    addressLists string[]
    The list of addresses.
    autoAddTagEcs number
    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.
    ecsTags AddressBookEcsTag[]
    A list of ECS tags. See ecs_tags below.
    groupName string
    The name of the Address Book.
    groupType 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 to ipv6, domain, port.
    lang string
    The language of the content within the request and response. Valid values: zh, en.
    tagRelation 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_tag_ecs int
    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.
    ecs_tags Sequence[AddressBookEcsTagArgs]
    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 to ipv6, 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:
    addressLists List<String>
    The list of addresses.
    autoAddTagEcs Number
    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.
    ecsTags List<Property Map>
    A list of ECS tags. See ecs_tags below.
    groupName String
    The name of the Address Book.
    groupType 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 to ipv6, domain, port.
    lang String
    The language of the content within the request and response. Valid values: zh, en.
    tagRelation String
    The logical relation among the ECS tags that to be matched. Default value: and. Valid values:

    Supporting Types

    AddressBookEcsTag, AddressBookEcsTagArgs

    TagKey string
    The key of ECS tag that to be matched.
    TagValue string
    The value of ECS tag that to be matched.
    TagKey string
    The key of ECS tag that to be matched.
    TagValue string
    The value of ECS tag that to be matched.
    tagKey String
    The key of ECS tag that to be matched.
    tagValue String
    The value of ECS tag that to be matched.
    tagKey string
    The key of ECS tag that to be matched.
    tagValue string
    The value of ECS tag that to be matched.
    tag_key str
    The key of ECS tag that to be matched.
    tag_value str
    The value of ECS tag that to be matched.
    tagKey String
    The key of ECS tag that to be matched.
    tagValue String
    The value of ECS tag that to be matched.

    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.
    alicloud logo
    Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi