1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cloudfirewall
  5. AddressBook
Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 by Pulumi

alicloud.cloudfirewall.AddressBook

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 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 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.

    GroupName string

    The name of the Address Book.

    GroupType string

    The type of the Address Book. Valid values: ip, tag.

    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.AddressBookEcsTagArgs>

    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.

    TagRelation 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.

    GroupName string

    The name of the Address Book.

    GroupType string

    The type of the Address Book. Valid values: ip, tag.

    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 the following Block ecs_tags.

    Lang string

    The language of the content within the request and response. Valid values: en, zh.

    TagRelation 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.

    groupName String

    The name of the Address Book.

    groupType String

    The type of the Address Book. Valid values: ip, tag.

    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<AddressBookEcsTagArgs>

    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.

    tagRelation 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.

    groupName string

    The name of the Address Book.

    groupType string

    The type of the Address Book. Valid values: ip, tag.

    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 AddressBookEcsTagArgs[]

    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.

    tagRelation 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_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 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.

    groupName String

    The name of the Address Book.

    groupType String

    The type of the Address Book. Valid values: ip, tag.

    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 the following Block ecs_tags.

    lang String

    The language of the content within the request and response. Valid values: en, zh.

    tagRelation 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.
    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.AddressBookEcsTagArgs>

    A list of ECS tags. See the following Block ecs_tags.

    GroupName string

    The name of the Address Book.

    GroupType 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.

    TagRelation 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.
    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 the following Block ecs_tags.

    GroupName string

    The name of the Address Book.

    GroupType 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.

    TagRelation 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.
    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<AddressBookEcsTagArgs>

    A list of ECS tags. See the following Block ecs_tags.

    groupName String

    The name of the Address Book.

    groupType 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.

    tagRelation 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.
    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 AddressBookEcsTagArgs[]

    A list of ECS tags. See the following Block ecs_tags.

    groupName string

    The name of the Address Book.

    groupType 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.

    tagRelation 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_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 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.
    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 the following Block ecs_tags.

    groupName String

    The name of the Address Book.

    groupType 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.

    tagRelation 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

    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>
    

    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.38.0 published on Friday, Jun 2, 2023 by Pulumi