Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.dns.getAccessStrategies
Explore with Pulumi AI
This data source provides the Alidns Access Strategies 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.getAccessStrategies({
instanceId: "example_value",
strategyMode: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
nameRegex: "the_resource_name",
});
export const alidnsAccessStrategyId1 = ids.then(ids => ids.strategies?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.dns.get_access_strategies(instance_id="example_value",
strategy_mode="example_value",
ids=[
"example_value-1",
"example_value-2",
],
name_regex="the_resource_name")
pulumi.export("alidnsAccessStrategyId1", ids.strategies[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.GetAccessStrategies(ctx, &dns.GetAccessStrategiesArgs{
InstanceId: "example_value",
StrategyMode: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("alidnsAccessStrategyId1", ids.Strategies[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.GetAccessStrategies.Invoke(new()
{
InstanceId = "example_value",
StrategyMode = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["alidnsAccessStrategyId1"] = ids.Apply(getAccessStrategiesResult => getAccessStrategiesResult.Strategies[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.GetAccessStrategiesArgs;
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.getAccessStrategies(GetAccessStrategiesArgs.builder()
.instanceId("example_value")
.strategyMode("example_value")
.ids(
"example_value-1",
"example_value-2")
.nameRegex("the_resource_name")
.build());
ctx.export("alidnsAccessStrategyId1", ids.applyValue(getAccessStrategiesResult -> getAccessStrategiesResult.strategies()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:dns:getAccessStrategies
Arguments:
instanceId: example_value
strategyMode: example_value
ids:
- example_value-1
- example_value-2
nameRegex: the_resource_name
outputs:
alidnsAccessStrategyId1: ${ids.strategies[0].id}
Using getAccessStrategies
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 getAccessStrategies(args: GetAccessStrategiesArgs, opts?: InvokeOptions): Promise<GetAccessStrategiesResult>
function getAccessStrategiesOutput(args: GetAccessStrategiesOutputArgs, opts?: InvokeOptions): Output<GetAccessStrategiesResult>
def get_access_strategies(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
lang: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
strategy_mode: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccessStrategiesResult
def get_access_strategies_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
lang: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
strategy_mode: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccessStrategiesResult]
func GetAccessStrategies(ctx *Context, args *GetAccessStrategiesArgs, opts ...InvokeOption) (*GetAccessStrategiesResult, error)
func GetAccessStrategiesOutput(ctx *Context, args *GetAccessStrategiesOutputArgs, opts ...InvokeOption) GetAccessStrategiesResultOutput
> Note: This function is named GetAccessStrategies
in the Go SDK.
public static class GetAccessStrategies
{
public static Task<GetAccessStrategiesResult> InvokeAsync(GetAccessStrategiesArgs args, InvokeOptions? opts = null)
public static Output<GetAccessStrategiesResult> Invoke(GetAccessStrategiesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccessStrategiesResult> getAccessStrategies(GetAccessStrategiesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dns/getAccessStrategies:getAccessStrategies
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The Id of the associated instance.
- Strategy
Mode string - The type of the access policy. Valid values:
GEO
: based on geographic location.LATENCY
: Based on delay.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids List<string>
- A list of Access Strategy IDs.
- Lang string
- The lang.
- Name
Regex string - A regex string to filter results by Access Strategy name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Instance
Id string - The Id of the associated instance.
- Strategy
Mode string - The type of the access policy. Valid values:
GEO
: based on geographic location.LATENCY
: Based on delay.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids []string
- A list of Access Strategy IDs.
- Lang string
- The lang.
- Name
Regex string - A regex string to filter results by Access Strategy name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- instance
Id String - The Id of the associated instance.
- strategy
Mode String - The type of the access policy. Valid values:
GEO
: based on geographic location.LATENCY
: Based on delay.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Access Strategy IDs.
- lang String
- The lang.
- name
Regex String - A regex string to filter results by Access Strategy name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- instance
Id string - The Id of the associated instance.
- strategy
Mode string - The type of the access policy. Valid values:
GEO
: based on geographic location.LATENCY
: Based on delay.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids string[]
- A list of Access Strategy IDs.
- lang string
- The lang.
- name
Regex string - A regex string to filter results by Access Strategy name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- instance_
id str - The Id of the associated instance.
- strategy_
mode str - The type of the access policy. Valid values:
GEO
: based on geographic location.LATENCY
: Based on delay.
- enable_
details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - ids Sequence[str]
- A list of Access Strategy IDs.
- lang str
- The lang.
- name_
regex str - A regex string to filter results by Access Strategy name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- instance
Id String - The Id of the associated instance.
- strategy
Mode String - The type of the access policy. Valid values:
GEO
: based on geographic location.LATENCY
: Based on delay.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Access Strategy IDs.
- lang String
- The lang.
- name
Regex String - A regex string to filter results by Access Strategy name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getAccessStrategies 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>
- Strategies
List<Pulumi.
Ali Cloud. Dns. Outputs. Get Access Strategies Strategy> - Strategy
Mode string - Enable
Details bool - Lang string
- Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - Names []string
- Strategies
[]Get
Access Strategies Strategy - Strategy
Mode string - Enable
Details bool - Lang string
- 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>
- strategies
List<Get
Access Strategies Strategy> - strategy
Mode String - enable
Details Boolean - lang String
- name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - names string[]
- strategies
Get
Access Strategies Strategy[] - strategy
Mode string - enable
Details boolean - lang string
- 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]
- strategies
Sequence[Get
Access Strategies Strategy] - strategy_
mode str - enable_
details bool - lang str
- 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>
- strategies List<Property Map>
- strategy
Mode String - enable
Details Boolean - lang String
- name
Regex String - output
File String
Supporting Types
GetAccessStrategiesStrategy
- Access
Mode string - The primary/secondary switchover policy for address pool groups.
- Access
Strategy stringId - The first ID of the resource.
- Create
Time string - The time when the access policy was created.
- Create
Timestamp string - The timestamp that indicates when the access policy was created.
- Default
Addr stringPool Type - The type of the primary address pool.
- Default
Addr List<Pulumi.Pools Ali Cloud. Dns. Inputs. Get Access Strategies Strategy Default Addr Pool> - The address pools in the primary address pool group.
- Default
Available intAddr Num - The number of addresses currently available in the primary address pool.
- Default
Latency stringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.
- Default
Lba stringStrategy - The load balancing policy of the primary address pool group.
- Default
Max intReturn Addr Num - The maximum number of addresses returned by the primary address pool set.
- int
- The minimum number of available addresses for the primary address pool set.
- Effective
Addr stringPool Group Type - The type of the active address pool group.
- Failover
Addr stringPool Type - The type of the secondary address pool.
- Failover
Addr List<Pulumi.Pools Ali Cloud. Dns. Inputs. Get Access Strategies Strategy Failover Addr Pool> - The address pools in the secondary address pool group.
- Failover
Available intAddr Num - The number of available addresses in the standby address pool.
- Failover
Latency stringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.
- Failover
Lba stringStrategy - The load balancing policy of the secondary address pool group.
- Failover
Max intReturn Addr Num - The maximum number of returned addresses in the standby address pool.
- int
- The minimum number of available addresses in the standby address pool.
- Id string
- The ID of the Access Strategy.
- Instance
Id string - The Id of the associated instance.
- Lines
List<Pulumi.
Ali Cloud. Dns. Inputs. Get Access Strategies Strategy Line> - List of source regions.
- Strategy
Mode string - The type of the access policy.
- Strategy
Name string - The name of the access policy.
- Access
Mode string - The primary/secondary switchover policy for address pool groups.
- Access
Strategy stringId - The first ID of the resource.
- Create
Time string - The time when the access policy was created.
- Create
Timestamp string - The timestamp that indicates when the access policy was created.
- Default
Addr stringPool Type - The type of the primary address pool.
- Default
Addr []GetPools Access Strategies Strategy Default Addr Pool - The address pools in the primary address pool group.
- Default
Available intAddr Num - The number of addresses currently available in the primary address pool.
- Default
Latency stringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.
- Default
Lba stringStrategy - The load balancing policy of the primary address pool group.
- Default
Max intReturn Addr Num - The maximum number of addresses returned by the primary address pool set.
- int
- The minimum number of available addresses for the primary address pool set.
- Effective
Addr stringPool Group Type - The type of the active address pool group.
- Failover
Addr stringPool Type - The type of the secondary address pool.
- Failover
Addr []GetPools Access Strategies Strategy Failover Addr Pool - The address pools in the secondary address pool group.
- Failover
Available intAddr Num - The number of available addresses in the standby address pool.
- Failover
Latency stringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.
- Failover
Lba stringStrategy - The load balancing policy of the secondary address pool group.
- Failover
Max intReturn Addr Num - The maximum number of returned addresses in the standby address pool.
- int
- The minimum number of available addresses in the standby address pool.
- Id string
- The ID of the Access Strategy.
- Instance
Id string - The Id of the associated instance.
- Lines
[]Get
Access Strategies Strategy Line - List of source regions.
- Strategy
Mode string - The type of the access policy.
- Strategy
Name string - The name of the access policy.
- access
Mode String - The primary/secondary switchover policy for address pool groups.
- access
Strategy StringId - The first ID of the resource.
- create
Time String - The time when the access policy was created.
- create
Timestamp String - The timestamp that indicates when the access policy was created.
- default
Addr StringPool Type - The type of the primary address pool.
- default
Addr List<GetPools Access Strategies Strategy Default Addr Pool> - The address pools in the primary address pool group.
- default
Available IntegerAddr Num - The number of addresses currently available in the primary address pool.
- default
Latency StringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.
- default
Lba StringStrategy - The load balancing policy of the primary address pool group.
- default
Max IntegerReturn Addr Num - The maximum number of addresses returned by the primary address pool set.
- Integer
- The minimum number of available addresses for the primary address pool set.
- effective
Addr StringPool Group Type - The type of the active address pool group.
- failover
Addr StringPool Type - The type of the secondary address pool.
- failover
Addr List<GetPools Access Strategies Strategy Failover Addr Pool> - The address pools in the secondary address pool group.
- failover
Available IntegerAddr Num - The number of available addresses in the standby address pool.
- failover
Latency StringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.
- failover
Lba StringStrategy - The load balancing policy of the secondary address pool group.
- failover
Max IntegerReturn Addr Num - The maximum number of returned addresses in the standby address pool.
- Integer
- The minimum number of available addresses in the standby address pool.
- id String
- The ID of the Access Strategy.
- instance
Id String - The Id of the associated instance.
- lines
List<Get
Access Strategies Strategy Line> - List of source regions.
- strategy
Mode String - The type of the access policy.
- strategy
Name String - The name of the access policy.
- access
Mode string - The primary/secondary switchover policy for address pool groups.
- access
Strategy stringId - The first ID of the resource.
- create
Time string - The time when the access policy was created.
- create
Timestamp string - The timestamp that indicates when the access policy was created.
- default
Addr stringPool Type - The type of the primary address pool.
- default
Addr GetPools Access Strategies Strategy Default Addr Pool[] - The address pools in the primary address pool group.
- default
Available numberAddr Num - The number of addresses currently available in the primary address pool.
- default
Latency stringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.
- default
Lba stringStrategy - The load balancing policy of the primary address pool group.
- default
Max numberReturn Addr Num - The maximum number of addresses returned by the primary address pool set.
- number
- The minimum number of available addresses for the primary address pool set.
- effective
Addr stringPool Group Type - The type of the active address pool group.
- failover
Addr stringPool Type - The type of the secondary address pool.
- failover
Addr GetPools Access Strategies Strategy Failover Addr Pool[] - The address pools in the secondary address pool group.
- failover
Available numberAddr Num - The number of available addresses in the standby address pool.
- failover
Latency stringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.
- failover
Lba stringStrategy - The load balancing policy of the secondary address pool group.
- failover
Max numberReturn Addr Num - The maximum number of returned addresses in the standby address pool.
- number
- The minimum number of available addresses in the standby address pool.
- id string
- The ID of the Access Strategy.
- instance
Id string - The Id of the associated instance.
- lines
Get
Access Strategies Strategy Line[] - List of source regions.
- strategy
Mode string - The type of the access policy.
- strategy
Name string - The name of the access policy.
- access_
mode str - The primary/secondary switchover policy for address pool groups.
- access_
strategy_ strid - The first ID of the resource.
- create_
time str - The time when the access policy was created.
- create_
timestamp str - The timestamp that indicates when the access policy was created.
- default_
addr_ strpool_ type - The type of the primary address pool.
- default_
addr_ Sequence[Getpools Access Strategies Strategy Default Addr Pool] - The address pools in the primary address pool group.
- default_
available_ intaddr_ num - The number of addresses currently available in the primary address pool.
- default_
latency_ stroptimization - Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.
- default_
lba_ strstrategy - The load balancing policy of the primary address pool group.
- default_
max_ intreturn_ addr_ num - The maximum number of addresses returned by the primary address pool set.
- default_
min_ intavailable_ addr_ num - The minimum number of available addresses for the primary address pool set.
- effective_
addr_ strpool_ group_ type - The type of the active address pool group.
- failover_
addr_ strpool_ type - The type of the secondary address pool.
- failover_
addr_ Sequence[Getpools Access Strategies Strategy Failover Addr Pool] - The address pools in the secondary address pool group.
- failover_
available_ intaddr_ num - The number of available addresses in the standby address pool.
- failover_
latency_ stroptimization - Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.
- failover_
lba_ strstrategy - The load balancing policy of the secondary address pool group.
- failover_
max_ intreturn_ addr_ num - The maximum number of returned addresses in the standby address pool.
- failover_
min_ intavailable_ addr_ num - The minimum number of available addresses in the standby address pool.
- id str
- The ID of the Access Strategy.
- instance_
id str - The Id of the associated instance.
- lines
Sequence[Get
Access Strategies Strategy Line] - List of source regions.
- strategy_
mode str - The type of the access policy.
- strategy_
name str - The name of the access policy.
- access
Mode String - The primary/secondary switchover policy for address pool groups.
- access
Strategy StringId - The first ID of the resource.
- create
Time String - The time when the access policy was created.
- create
Timestamp String - The timestamp that indicates when the access policy was created.
- default
Addr StringPool Type - The type of the primary address pool.
- default
Addr List<Property Map>Pools - The address pools in the primary address pool group.
- default
Available NumberAddr Num - The number of addresses currently available in the primary address pool.
- default
Latency StringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.
- default
Lba StringStrategy - The load balancing policy of the primary address pool group.
- default
Max NumberReturn Addr Num - The maximum number of addresses returned by the primary address pool set.
- Number
- The minimum number of available addresses for the primary address pool set.
- effective
Addr StringPool Group Type - The type of the active address pool group.
- failover
Addr StringPool Type - The type of the secondary address pool.
- failover
Addr List<Property Map>Pools - The address pools in the secondary address pool group.
- failover
Available NumberAddr Num - The number of available addresses in the standby address pool.
- failover
Latency StringOptimization - Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.
- failover
Lba StringStrategy - The load balancing policy of the secondary address pool group.
- failover
Max NumberReturn Addr Num - The maximum number of returned addresses in the standby address pool.
- Number
- The minimum number of available addresses in the standby address pool.
- id String
- The ID of the Access Strategy.
- instance
Id String - The Id of the associated instance.
- lines List<Property Map>
- List of source regions.
- strategy
Mode String - The type of the access policy.
- strategy
Name String - The name of the access policy.
GetAccessStrategiesStrategyDefaultAddrPool
- Addr
Count int - The number of addresses in the address pool.
- Addr
Pool stringId - The ID of the address pool.
- Lba
Weight int - The weight of the address pool.
- Name string
- The name of the address pool.
- Addr
Count int - The number of addresses in the address pool.
- Addr
Pool stringId - The ID of the address pool.
- Lba
Weight int - The weight of the address pool.
- Name string
- The name of the address pool.
- addr
Count Integer - The number of addresses in the address pool.
- addr
Pool StringId - The ID of the address pool.
- lba
Weight Integer - The weight of the address pool.
- name String
- The name of the address pool.
- addr
Count number - The number of addresses in the address pool.
- addr
Pool stringId - The ID of the address pool.
- lba
Weight number - The weight of the address pool.
- name string
- The name of the address pool.
- addr_
count int - The number of addresses in the address pool.
- addr_
pool_ strid - The ID of the address pool.
- lba_
weight int - The weight of the address pool.
- name str
- The name of the address pool.
- addr
Count Number - The number of addresses in the address pool.
- addr
Pool StringId - The ID of the address pool.
- lba
Weight Number - The weight of the address pool.
- name String
- The name of the address pool.
GetAccessStrategiesStrategyFailoverAddrPool
- Addr
Count int - The number of addresses in the address pool.
- Addr
Pool stringId - The ID of the address pool.
- Lba
Weight int - The weight of the address pool.
- Name string
- The name of the address pool.
- Addr
Count int - The number of addresses in the address pool.
- Addr
Pool stringId - The ID of the address pool.
- Lba
Weight int - The weight of the address pool.
- Name string
- The name of the address pool.
- addr
Count Integer - The number of addresses in the address pool.
- addr
Pool StringId - The ID of the address pool.
- lba
Weight Integer - The weight of the address pool.
- name String
- The name of the address pool.
- addr
Count number - The number of addresses in the address pool.
- addr
Pool stringId - The ID of the address pool.
- lba
Weight number - The weight of the address pool.
- name string
- The name of the address pool.
- addr_
count int - The number of addresses in the address pool.
- addr_
pool_ strid - The ID of the address pool.
- lba_
weight int - The weight of the address pool.
- name str
- The name of the address pool.
- addr
Count Number - The number of addresses in the address pool.
- addr
Pool StringId - The ID of the address pool.
- lba
Weight Number - The weight of the address pool.
- name String
- The name of the address pool.
GetAccessStrategiesStrategyLine
- group_
code str - The code of the source region group.
- group_
name str - The name of the source region group.
- line_
code str - The line code of the source region.
- line_
name str - The line name of the source region.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.