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:
- Group
Type string The type of the Address Book.
- Ids List<string>
A list of Address Book IDs.
- Name
Regex string A regex string to filter results Address Book name.
- Output
File string
- Group
Type string The type of the Address Book.
- Ids []string
A list of Address Book IDs.
- Name
Regex string A regex string to filter results Address Book name.
- Output
File string
- group
Type String The type of the Address Book.
- ids List<String>
A list of Address Book IDs.
- name
Regex String A regex string to filter results Address Book name.
- output
File String
- group
Type string The type of the Address Book.
- ids string[]
A list of Address Book IDs.
- name
Regex string A regex string to filter results Address Book name.
- output
File 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
- group
Type String The type of the Address Book.
- ids List<String>
A list of Address Book IDs.
- name
Regex String A regex string to filter results Address Book name.
- output
File String
getAddressBooks Result
The following output properties are available:
- Books
List<Pulumi.
Ali Cloud. Cloud Firewall. Outputs. Get Address Books Book> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Group
Type string - Name
Regex string - Output
File string
- Books
[]Get
Address Books Book - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Group
Type string - Name
Regex string - Output
File string
- books
List<Get
Address Books Book> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- group
Type String - name
Regex String - output
File String
- books
Get
Address Books Book[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- group
Type string - name
Regex string - output
File string
- books
Sequence[Get
Address Books Book] - 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>
- group
Type String - name
Regex String - output
File String
Supporting Types
GetAddressBooksBook
- Address
Lists List<string> The addresses in the Address Book.
- Auto
Add intTag Ecs 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.
- Group
Name string The name of the Address Book.
- Group
Type string The type of the Address Book.
- Group
Uuid string The ID of the Address Book.
- Id string
The ID of the Address Book.
- Tag
Relation string One or more tags for the relationship between.
- List<Pulumi.
Ali Cloud. Cloud Firewall. Inputs. Get Address Books Book Ecs Tag> The logical relation among the ECS tags that to be matchedh.
- Address
Lists []string The addresses in the Address Book.
- Auto
Add intTag Ecs 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.
- Group
Name string The name of the Address Book.
- Group
Type string The type of the Address Book.
- Group
Uuid string The ID of the Address Book.
- Id string
The ID of the Address Book.
- Tag
Relation string One or more tags for the relationship between.
- []Get
Address Books Book Ecs Tag The logical relation among the ECS tags that to be matchedh.
- address
Lists List<String> The addresses in the Address Book.
- auto
Add IntegerTag Ecs 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.
- group
Name String The name of the Address Book.
- group
Type String The type of the Address Book.
- group
Uuid String The ID of the Address Book.
- id String
The ID of the Address Book.
- tag
Relation String One or more tags for the relationship between.
- List<Get
Address Books Book Ecs Tag> The logical relation among the ECS tags that to be matchedh.
- address
Lists string[] The addresses in the Address Book.
- auto
Add numberTag Ecs 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.
- group
Name string The name of the Address Book.
- group
Type string The type of the Address Book.
- group
Uuid string The ID of the Address Book.
- id string
The ID of the Address Book.
- tag
Relation string One or more tags for the relationship between.
- Get
Address Books Book Ecs Tag[] The logical relation among the ECS tags that to be matchedh.
- address_
lists Sequence[str] The addresses in the Address Book.
- auto_
add_ inttag_ ecs 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.
- Sequence[Get
Address Books Book Ecs Tag] The logical relation among the ECS tags that to be matchedh.
- address
Lists List<String> The addresses in the Address Book.
- auto
Add NumberTag Ecs 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.
- group
Name String The name of the Address Book.
- group
Type String The type of the Address Book.
- group
Uuid String The ID of the Address Book.
- id String
The ID of the Address Book.
- tag
Relation String One or more tags for the relationship between.
- List<Property Map>
The logical relation among the ECS tags that to be matchedh.
GetAddressBooksBookEcsTag
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.