Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.dns.getAddressPools
Explore with Pulumi AI
This data source provides the Alidns Address Pools of the current Alibaba Cloud user.
NOTE: Available in v1.152.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.dns.getAddressPools({
instanceId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const alidnsAddressPoolId1 = ids.then(ids => ids.pools?.[0]?.id);
const nameRegex = alicloud.dns.getAddressPools({
instanceId: "example_value",
nameRegex: "^my-AddressPool",
});
export const alidnsAddressPoolId2 = nameRegex.then(nameRegex => nameRegex.pools?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.dns.get_address_pools(instance_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("alidnsAddressPoolId1", ids.pools[0].id)
name_regex = alicloud.dns.get_address_pools(instance_id="example_value",
name_regex="^my-AddressPool")
pulumi.export("alidnsAddressPoolId2", name_regex.pools[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := dns.GetAddressPools(ctx, &dns.GetAddressPoolsArgs{
InstanceId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("alidnsAddressPoolId1", ids.Pools[0].Id)
nameRegex, err := dns.GetAddressPools(ctx, &dns.GetAddressPoolsArgs{
InstanceId: "example_value",
NameRegex: pulumi.StringRef("^my-AddressPool"),
}, nil)
if err != nil {
return err
}
ctx.Export("alidnsAddressPoolId2", nameRegex.Pools[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Dns.GetAddressPools.Invoke(new()
{
InstanceId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
var nameRegex = AliCloud.Dns.GetAddressPools.Invoke(new()
{
InstanceId = "example_value",
NameRegex = "^my-AddressPool",
});
return new Dictionary<string, object?>
{
["alidnsAddressPoolId1"] = ids.Apply(getAddressPoolsResult => getAddressPoolsResult.Pools[0]?.Id),
["alidnsAddressPoolId2"] = nameRegex.Apply(getAddressPoolsResult => getAddressPoolsResult.Pools[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.DnsFunctions;
import com.pulumi.alicloud.dns.inputs.GetAddressPoolsArgs;
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 = DnsFunctions.getAddressPools(GetAddressPoolsArgs.builder()
.instanceId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("alidnsAddressPoolId1", ids.applyValue(getAddressPoolsResult -> getAddressPoolsResult.pools()[0].id()));
final var nameRegex = DnsFunctions.getAddressPools(GetAddressPoolsArgs.builder()
.instanceId("example_value")
.nameRegex("^my-AddressPool")
.build());
ctx.export("alidnsAddressPoolId2", nameRegex.applyValue(getAddressPoolsResult -> getAddressPoolsResult.pools()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:dns:getAddressPools
Arguments:
instanceId: example_value
ids:
- example_value-1
- example_value-2
nameRegex:
fn::invoke:
Function: alicloud:dns:getAddressPools
Arguments:
instanceId: example_value
nameRegex: ^my-AddressPool
outputs:
alidnsAddressPoolId1: ${ids.pools[0].id}
alidnsAddressPoolId2: ${nameRegex.pools[0].id}
Using getAddressPools
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 getAddressPools(args: GetAddressPoolsArgs, opts?: InvokeOptions): Promise<GetAddressPoolsResult>
function getAddressPoolsOutput(args: GetAddressPoolsOutputArgs, opts?: InvokeOptions): Output<GetAddressPoolsResult>
def get_address_pools(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAddressPoolsResult
def get_address_pools_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAddressPoolsResult]
func GetAddressPools(ctx *Context, args *GetAddressPoolsArgs, opts ...InvokeOption) (*GetAddressPoolsResult, error)
func GetAddressPoolsOutput(ctx *Context, args *GetAddressPoolsOutputArgs, opts ...InvokeOption) GetAddressPoolsResultOutput
> Note: This function is named GetAddressPools
in the Go SDK.
public static class GetAddressPools
{
public static Task<GetAddressPoolsResult> InvokeAsync(GetAddressPoolsArgs args, InvokeOptions? opts = null)
public static Output<GetAddressPoolsResult> Invoke(GetAddressPoolsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAddressPoolsResult> getAddressPools(GetAddressPoolsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dns/getAddressPools:getAddressPools
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The id of the instance.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids List<string>
- A list of Address Pool IDs.
- Name
Regex string - A regex string to filter results by Address Pool name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Instance
Id string - The id of the instance.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids []string
- A list of Address Pool IDs.
- Name
Regex string - A regex string to filter results by Address Pool name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- instance
Id String - The id of the instance.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Address Pool IDs.
- name
Regex String - A regex string to filter results by Address Pool name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- instance
Id string - The id of the instance.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids string[]
- A list of Address Pool IDs.
- name
Regex string - A regex string to filter results by Address Pool name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- instance_
id str - The id of the instance.
- enable_
details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - ids Sequence[str]
- A list of Address Pool IDs.
- name_
regex str - A regex string to filter results by Address Pool name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- instance
Id String - The id of the instance.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Address Pool IDs.
- name
Regex String - A regex string to filter results by Address Pool name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getAddressPools Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instance
Id string - Names List<string>
- Pools
List<Pulumi.
Ali Cloud. Dns. Outputs. Get Address Pools Pool> - Enable
Details bool - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - Names []string
- Pools
[]Get
Address Pools Pool - Enable
Details bool - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - names List<String>
- pools
List<Get
Address Pools Pool> - enable
Details Boolean - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - names string[]
- pools
Get
Address Pools Pool[] - enable
Details boolean - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instance_
id str - names Sequence[str]
- pools
Sequence[Get
Address Pools Pool] - enable_
details bool - name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - names List<String>
- pools List<Property Map>
- enable
Details Boolean - name
Regex String - output
File String
Supporting Types
GetAddressPoolsPool
- Address
Pool stringId - The first ID of the resource.
- Address
Pool stringName - The name of the address pool.
- Addresses
List<Pulumi.
Ali Cloud. Dns. Inputs. Get Address Pools Pool Address> - The address lists of the Address Pool.
- Create
Time string - The time when the address pool was created.
- Create
Timestamp string - The timestamp that indicates when the address pool was created.
- Id string
- The ID of the Address Pool.
- Instance
Id string - The id of the instance.
- Lba
Strategy string - The load balancing policy of the address pool.
- Monitor
Config stringId - The ID of the health check task.
- Monitor
Status string - Indicates whether health checks are configured.
- Type string
- The type of the address pool.
- Update
Time string - The time when the address pool was updated.
- Update
Timestamp string - The timestamp that indicates when the address pool was updated.
- Address
Pool stringId - The first ID of the resource.
- Address
Pool stringName - The name of the address pool.
- Addresses
[]Get
Address Pools Pool Address - The address lists of the Address Pool.
- Create
Time string - The time when the address pool was created.
- Create
Timestamp string - The timestamp that indicates when the address pool was created.
- Id string
- The ID of the Address Pool.
- Instance
Id string - The id of the instance.
- Lba
Strategy string - The load balancing policy of the address pool.
- Monitor
Config stringId - The ID of the health check task.
- Monitor
Status string - Indicates whether health checks are configured.
- Type string
- The type of the address pool.
- Update
Time string - The time when the address pool was updated.
- Update
Timestamp string - The timestamp that indicates when the address pool was updated.
- address
Pool StringId - The first ID of the resource.
- address
Pool StringName - The name of the address pool.
- addresses
List<Get
Address Pools Pool Address> - The address lists of the Address Pool.
- create
Time String - The time when the address pool was created.
- create
Timestamp String - The timestamp that indicates when the address pool was created.
- id String
- The ID of the Address Pool.
- instance
Id String - The id of the instance.
- lba
Strategy String - The load balancing policy of the address pool.
- monitor
Config StringId - The ID of the health check task.
- monitor
Status String - Indicates whether health checks are configured.
- type String
- The type of the address pool.
- update
Time String - The time when the address pool was updated.
- update
Timestamp String - The timestamp that indicates when the address pool was updated.
- address
Pool stringId - The first ID of the resource.
- address
Pool stringName - The name of the address pool.
- addresses
Get
Address Pools Pool Address[] - The address lists of the Address Pool.
- create
Time string - The time when the address pool was created.
- create
Timestamp string - The timestamp that indicates when the address pool was created.
- id string
- The ID of the Address Pool.
- instance
Id string - The id of the instance.
- lba
Strategy string - The load balancing policy of the address pool.
- monitor
Config stringId - The ID of the health check task.
- monitor
Status string - Indicates whether health checks are configured.
- type string
- The type of the address pool.
- update
Time string - The time when the address pool was updated.
- update
Timestamp string - The timestamp that indicates when the address pool was updated.
- address_
pool_ strid - The first ID of the resource.
- address_
pool_ strname - The name of the address pool.
- addresses
Sequence[Get
Address Pools Pool Address] - The address lists of the Address Pool.
- create_
time str - The time when the address pool was created.
- create_
timestamp str - The timestamp that indicates when the address pool was created.
- id str
- The ID of the Address Pool.
- instance_
id str - The id of the instance.
- lba_
strategy str - The load balancing policy of the address pool.
- monitor_
config_ strid - The ID of the health check task.
- monitor_
status str - Indicates whether health checks are configured.
- type str
- The type of the address pool.
- update_
time str - The time when the address pool was updated.
- update_
timestamp str - The timestamp that indicates when the address pool was updated.
- address
Pool StringId - The first ID of the resource.
- address
Pool StringName - The name of the address pool.
- addresses List<Property Map>
- The address lists of the Address Pool.
- create
Time String - The time when the address pool was created.
- create
Timestamp String - The timestamp that indicates when the address pool was created.
- id String
- The ID of the Address Pool.
- instance
Id String - The id of the instance.
- lba
Strategy String - The load balancing policy of the address pool.
- monitor
Config StringId - The ID of the health check task.
- monitor
Status String - Indicates whether health checks are configured.
- type String
- The type of the address pool.
- update
Time String - The time when the address pool was updated.
- update
Timestamp String - The timestamp that indicates when the address pool was updated.
GetAddressPoolsPoolAddress
- Address string
- The address that you want to add to the address pool.
- Attribute
Info string - The source region of the address.
- Lba
Weight int - The weight of the address.
- Mode string
- The type of the address.
- Remark string
- The description of the address.
- Address string
- The address that you want to add to the address pool.
- Attribute
Info string - The source region of the address.
- Lba
Weight int - The weight of the address.
- Mode string
- The type of the address.
- Remark string
- The description of the address.
- address String
- The address that you want to add to the address pool.
- attribute
Info String - The source region of the address.
- lba
Weight Integer - The weight of the address.
- mode String
- The type of the address.
- remark String
- The description of the address.
- address string
- The address that you want to add to the address pool.
- attribute
Info string - The source region of the address.
- lba
Weight number - The weight of the address.
- mode string
- The type of the address.
- remark string
- The description of the address.
- address str
- The address that you want to add to the address pool.
- attribute_
info str - The source region of the address.
- lba_
weight int - The weight of the address.
- mode str
- The type of the address.
- remark str
- The description of the address.
- address String
- The address that you want to add to the address pool.
- attribute
Info String - The source region of the address.
- lba
Weight Number - The weight of the address.
- mode String
- The type of the address.
- remark String
- The description of the address.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.