alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.cloudfirewall.getAddressBooks

This data source provides the Cloud Firewall Address Books of the current Alibaba Cloud user.

NOTE: Available in v1.178.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.CloudFirewall.GetAddressBooks.Invoke();

    return new Dictionary<string, object?>
    {
        ["cloudFirewallAddressBookId1"] = ids.Apply(getAddressBooksResult => getAddressBooksResult.Books[0]?.Id),
    };
});
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 {
		ids, err := cloudfirewall.GetAddressBooks(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("cloudFirewallAddressBookId1", ids.Books[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudfirewall.CloudfirewallFunctions;
import com.pulumi.alicloud.cloudfirewall.inputs.GetAddressBooksArgs;
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 ids = CloudfirewallFunctions.getAddressBooks();

        ctx.export("cloudFirewallAddressBookId1", ids.applyValue(getAddressBooksResult -> getAddressBooksResult.books()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.cloudfirewall.get_address_books()
pulumi.export("cloudFirewallAddressBookId1", ids.books[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.cloudfirewall.getAddressBooks({});
export const cloudFirewallAddressBookId1 = ids.then(ids => ids.books?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:cloudfirewall:getAddressBooks
      Arguments: {}
outputs:
  cloudFirewallAddressBookId1: ${ids.books[0].id}

Using getAddressBooks

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAddressBooks(args: GetAddressBooksArgs, opts?: InvokeOptions): Promise<GetAddressBooksResult>
function getAddressBooksOutput(args: GetAddressBooksOutputArgs, opts?: InvokeOptions): Output<GetAddressBooksResult>
def get_address_books(group_type: Optional[str] = None,
                      ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetAddressBooksResult
def get_address_books_output(group_type: Optional[pulumi.Input[str]] = None,
                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetAddressBooksResult]
func GetAddressBooks(ctx *Context, args *GetAddressBooksArgs, opts ...InvokeOption) (*GetAddressBooksResult, error)
func GetAddressBooksOutput(ctx *Context, args *GetAddressBooksOutputArgs, opts ...InvokeOption) GetAddressBooksResultOutput

> Note: This function is named GetAddressBooks in the Go SDK.

public static class GetAddressBooks 
{
    public static Task<GetAddressBooksResult> InvokeAsync(GetAddressBooksArgs args, InvokeOptions? opts = null)
    public static Output<GetAddressBooksResult> Invoke(GetAddressBooksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAddressBooksResult> getAddressBooks(GetAddressBooksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:cloudfirewall/getAddressBooks:getAddressBooks
  arguments:
    # arguments dictionary

The following arguments are supported:

GroupType string

The type of the Address Book.

Ids List<string>

A list of Address Book IDs.

NameRegex string

A regex string to filter results Address Book name.

OutputFile string
GroupType string

The type of the Address Book.

Ids []string

A list of Address Book IDs.

NameRegex string

A regex string to filter results Address Book name.

OutputFile string
groupType String

The type of the Address Book.

ids List<String>

A list of Address Book IDs.

nameRegex String

A regex string to filter results Address Book name.

outputFile String
groupType string

The type of the Address Book.

ids string[]

A list of Address Book IDs.

nameRegex string

A regex string to filter results Address Book name.

outputFile string
group_type str

The type of the Address Book.

ids Sequence[str]

A list of Address Book IDs.

name_regex str

A regex string to filter results Address Book name.

output_file str
groupType String

The type of the Address Book.

ids List<String>

A list of Address Book IDs.

nameRegex String

A regex string to filter results Address Book name.

outputFile String

getAddressBooks Result

The following output properties are available:

Books List<Pulumi.AliCloud.CloudFirewall.Outputs.GetAddressBooksBook>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
GroupType string
NameRegex string
OutputFile string
Books []GetAddressBooksBook
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
GroupType string
NameRegex string
OutputFile string
books List<GetAddressBooksBook>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
groupType String
nameRegex String
outputFile String
books GetAddressBooksBook[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
groupType string
nameRegex string
outputFile string
books Sequence[GetAddressBooksBook]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
group_type str
name_regex str
output_file str
books List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
groupType String
nameRegex String
outputFile String

Supporting Types

GetAddressBooksBook

AddressLists List<string>

The addresses in the Address Book.

AutoAddTagEcs int

Whether you want to automatically add new matching tags of the ECS IP address 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.

GroupUuid string

The ID of the Address Book.

Id string

The ID of the Address Book.

TagRelation string

One or more tags for the relationship between.

EcsTags List<Pulumi.AliCloud.CloudFirewall.Inputs.GetAddressBooksBookEcsTag>

The logical relation among the ECS tags that to be matchedh.

AddressLists []string

The addresses in the Address Book.

AutoAddTagEcs int

Whether you want to automatically add new matching tags of the ECS IP address 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.

GroupUuid string

The ID of the Address Book.

Id string

The ID of the Address Book.

TagRelation string

One or more tags for the relationship between.

EcsTags []GetAddressBooksBookEcsTag

The logical relation among the ECS tags that to be matchedh.

addressLists List<String>

The addresses in the Address Book.

autoAddTagEcs Integer

Whether you want to automatically add new matching tags of the ECS IP address 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.

groupUuid String

The ID of the Address Book.

id String

The ID of the Address Book.

tagRelation String

One or more tags for the relationship between.

ecsTags List<GetAddressBooksBookEcsTag>

The logical relation among the ECS tags that to be matchedh.

addressLists string[]

The addresses in the Address Book.

autoAddTagEcs number

Whether you want to automatically add new matching tags of the ECS IP address 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.

groupUuid string

The ID of the Address Book.

id string

The ID of the Address Book.

tagRelation string

One or more tags for the relationship between.

ecsTags GetAddressBooksBookEcsTag[]

The logical relation among the ECS tags that to be matchedh.

address_lists Sequence[str]

The addresses in the Address Book.

auto_add_tag_ecs int

Whether you want to automatically add new matching tags of the ECS IP address 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.

group_uuid str

The ID of the Address Book.

id str

The ID of the Address Book.

tag_relation str

One or more tags for the relationship between.

ecs_tags Sequence[GetAddressBooksBookEcsTag]

The logical relation among the ECS tags that to be matchedh.

addressLists List<String>

The addresses in the Address Book.

autoAddTagEcs Number

Whether you want to automatically add new matching tags of the ECS IP address 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.

groupUuid String

The ID of the Address Book.

id String

The ID of the Address Book.

tagRelation String

One or more tags for the relationship between.

ecsTags List<Property Map>

The logical relation among the ECS tags that to be matchedh.

GetAddressBooksBookEcsTag

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.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.