Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

getAccessStrategies

This data source provides the Alidns Access Strategies of the current Alibaba Cloud user.

NOTE: Available in v1.152.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Dns.GetAccessStrategies.InvokeAsync(new AliCloud.Dns.GetAccessStrategiesArgs
        {
            InstanceId = "example_value",
            StrategyMode = "example_value",
            Ids = 
            {
                "example_value-1",
                "example_value-2",
            },
            NameRegex = "the_resource_name",
        }));
        this.AlidnsAccessStrategyId1 = ids.Apply(ids => ids.Strategies?[0]?.Id);
    }

    [Output("alidnsAccessStrategyId1")]
    public Output<string> AlidnsAccessStrategyId1 { get; set; }
}
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
	})
}
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()));
    }
}
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)
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);
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:

InstanceId string

The Id of the associated instance.

StrategyMode string

The type of the access policy.

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids List<string>

A list of Access Strategy IDs.

Lang string

The lang.

NameRegex string

A regex string to filter results by Access Strategy name.

OutputFile string
InstanceId string

The Id of the associated instance.

StrategyMode string

The type of the access policy.

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids []string

A list of Access Strategy IDs.

Lang string

The lang.

NameRegex string

A regex string to filter results by Access Strategy name.

OutputFile string
instanceId String

The Id of the associated instance.

strategyMode String

The type of the access policy.

enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Access Strategy IDs.

lang String

The lang.

nameRegex String

A regex string to filter results by Access Strategy name.

outputFile String
instanceId string

The Id of the associated instance.

strategyMode string

The type of the access policy.

enableDetails boolean

Default to false. Set it to true can output more details about resource attributes.

ids string[]

A list of Access Strategy IDs.

lang string

The lang.

nameRegex string

A regex string to filter results by Access Strategy name.

outputFile string
instance_id str

The Id of the associated instance.

strategy_mode str

The type of the access policy.

enable_details bool

Default to false. Set it to true 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
instanceId String

The Id of the associated instance.

strategyMode String

The type of the access policy.

enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Access Strategy IDs.

lang String

The lang.

nameRegex String

A regex string to filter results by Access Strategy name.

outputFile String

getAccessStrategies Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
InstanceId string
Names List<string>
Strategies List<Pulumi.AliCloud.Dns.Outputs.GetAccessStrategiesStrategy>
StrategyMode string
EnableDetails bool
Lang string
NameRegex string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
InstanceId string
Names []string
Strategies []GetAccessStrategiesStrategy
StrategyMode string
EnableDetails bool
Lang string
NameRegex string
OutputFile string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
instanceId String
names List<String>
strategies List<GetAccessStrategiesStrategy>
strategyMode String
enableDetails Boolean
lang String
nameRegex String
outputFile String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
instanceId string
names string[]
strategies GetAccessStrategiesStrategy[]
strategyMode string
enableDetails boolean
lang string
nameRegex string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
instance_id str
names Sequence[str]
strategies Sequence[GetAccessStrategiesStrategy]
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>
instanceId String
names List<String>
strategies List<Property Map>
strategyMode String
enableDetails Boolean
lang String
nameRegex String
outputFile String

Supporting Types

GetAccessStrategiesStrategy

AccessMode string

The primary/secondary switchover policy for address pool groups.

AccessStrategyId string

The first ID of the resource.

CreateTime string

The time when the access policy was created.

CreateTimestamp string

The timestamp that indicates when the access policy was created.

DefaultAddrPoolType string

The type of the primary address pool.

DefaultAddrPools List<Pulumi.AliCloud.Dns.Inputs.GetAccessStrategiesStrategyDefaultAddrPool>

The address pools in the primary address pool group.

DefaultAvailableAddrNum int

The number of addresses currently available in the primary address pool.

DefaultLatencyOptimization string

Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.

DefaultLbaStrategy string

The load balancing policy of the primary address pool group.

DefaultMaxReturnAddrNum int

The maximum number of addresses returned by the primary address pool set.

DefaultMinAvailableAddrNum int

The minimum number of available addresses for the primary address pool set.

EffectiveAddrPoolGroupType string

The type of the active address pool group.

FailoverAddrPoolType string

The type of the secondary address pool.

FailoverAddrPools List<Pulumi.AliCloud.Dns.Inputs.GetAccessStrategiesStrategyFailoverAddrPool>

The address pools in the secondary address pool group.

FailoverAvailableAddrNum int

The number of available addresses in the standby address pool.

FailoverLatencyOptimization string

Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.

FailoverLbaStrategy string

The load balancing policy of the secondary address pool group.

FailoverMaxReturnAddrNum int

The maximum number of returned addresses in the standby address pool.

FailoverMinAvailableAddrNum int

The minimum number of available addresses in the standby address pool.

Id string

The ID of the Access Strategy.

InstanceId string

The Id of the associated instance.

Lines List<Pulumi.AliCloud.Dns.Inputs.GetAccessStrategiesStrategyLine>

List of source regions.

StrategyMode string

The type of the access policy.

StrategyName string

The name of the access policy.

AccessMode string

The primary/secondary switchover policy for address pool groups.

AccessStrategyId string

The first ID of the resource.

CreateTime string

The time when the access policy was created.

CreateTimestamp string

The timestamp that indicates when the access policy was created.

DefaultAddrPoolType string

The type of the primary address pool.

DefaultAddrPools []GetAccessStrategiesStrategyDefaultAddrPool

The address pools in the primary address pool group.

DefaultAvailableAddrNum int

The number of addresses currently available in the primary address pool.

DefaultLatencyOptimization string

Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.

DefaultLbaStrategy string

The load balancing policy of the primary address pool group.

DefaultMaxReturnAddrNum int

The maximum number of addresses returned by the primary address pool set.

DefaultMinAvailableAddrNum int

The minimum number of available addresses for the primary address pool set.

EffectiveAddrPoolGroupType string

The type of the active address pool group.

FailoverAddrPoolType string

The type of the secondary address pool.

FailoverAddrPools []GetAccessStrategiesStrategyFailoverAddrPool

The address pools in the secondary address pool group.

FailoverAvailableAddrNum int

The number of available addresses in the standby address pool.

FailoverLatencyOptimization string

Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.

FailoverLbaStrategy string

The load balancing policy of the secondary address pool group.

FailoverMaxReturnAddrNum int

The maximum number of returned addresses in the standby address pool.

FailoverMinAvailableAddrNum int

The minimum number of available addresses in the standby address pool.

Id string

The ID of the Access Strategy.

InstanceId string

The Id of the associated instance.

Lines []GetAccessStrategiesStrategyLine

List of source regions.

StrategyMode string

The type of the access policy.

StrategyName string

The name of the access policy.

accessMode String

The primary/secondary switchover policy for address pool groups.

accessStrategyId String

The first ID of the resource.

createTime String

The time when the access policy was created.

createTimestamp String

The timestamp that indicates when the access policy was created.

defaultAddrPoolType String

The type of the primary address pool.

defaultAddrPools List<GetAccessStrategiesStrategyDefaultAddrPool>

The address pools in the primary address pool group.

defaultAvailableAddrNum Integer

The number of addresses currently available in the primary address pool.

defaultLatencyOptimization String

Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.

defaultLbaStrategy String

The load balancing policy of the primary address pool group.

defaultMaxReturnAddrNum Integer

The maximum number of addresses returned by the primary address pool set.

defaultMinAvailableAddrNum Integer

The minimum number of available addresses for the primary address pool set.

effectiveAddrPoolGroupType String

The type of the active address pool group.

failoverAddrPoolType String

The type of the secondary address pool.

failoverAddrPools List<GetAccessStrategiesStrategyFailoverAddrPool>

The address pools in the secondary address pool group.

failoverAvailableAddrNum Integer

The number of available addresses in the standby address pool.

failoverLatencyOptimization String

Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.

failoverLbaStrategy String

The load balancing policy of the secondary address pool group.

failoverMaxReturnAddrNum Integer

The maximum number of returned addresses in the standby address pool.

failoverMinAvailableAddrNum Integer

The minimum number of available addresses in the standby address pool.

id String

The ID of the Access Strategy.

instanceId String

The Id of the associated instance.

lines List<GetAccessStrategiesStrategyLine>

List of source regions.

strategyMode String

The type of the access policy.

strategyName String

The name of the access policy.

accessMode string

The primary/secondary switchover policy for address pool groups.

accessStrategyId string

The first ID of the resource.

createTime string

The time when the access policy was created.

createTimestamp string

The timestamp that indicates when the access policy was created.

defaultAddrPoolType string

The type of the primary address pool.

defaultAddrPools GetAccessStrategiesStrategyDefaultAddrPool[]

The address pools in the primary address pool group.

defaultAvailableAddrNum number

The number of addresses currently available in the primary address pool.

defaultLatencyOptimization string

Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.

defaultLbaStrategy string

The load balancing policy of the primary address pool group.

defaultMaxReturnAddrNum number

The maximum number of addresses returned by the primary address pool set.

defaultMinAvailableAddrNum number

The minimum number of available addresses for the primary address pool set.

effectiveAddrPoolGroupType string

The type of the active address pool group.

failoverAddrPoolType string

The type of the secondary address pool.

failoverAddrPools GetAccessStrategiesStrategyFailoverAddrPool[]

The address pools in the secondary address pool group.

failoverAvailableAddrNum number

The number of available addresses in the standby address pool.

failoverLatencyOptimization string

Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.

failoverLbaStrategy string

The load balancing policy of the secondary address pool group.

failoverMaxReturnAddrNum number

The maximum number of returned addresses in the standby address pool.

failoverMinAvailableAddrNum number

The minimum number of available addresses in the standby address pool.

id string

The ID of the Access Strategy.

instanceId string

The Id of the associated instance.

lines GetAccessStrategiesStrategyLine[]

List of source regions.

strategyMode string

The type of the access policy.

strategyName string

The name of the access policy.

access_mode str

The primary/secondary switchover policy for address pool groups.

access_strategy_id str

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_pool_type str

The type of the primary address pool.

default_addr_pools Sequence[GetAccessStrategiesStrategyDefaultAddrPool]

The address pools in the primary address pool group.

default_available_addr_num int

The number of addresses currently available in the primary address pool.

default_latency_optimization str

Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.

default_lba_strategy str

The load balancing policy of the primary address pool group.

default_max_return_addr_num int

The maximum number of addresses returned by the primary address pool set.

default_min_available_addr_num int

The minimum number of available addresses for the primary address pool set.

effective_addr_pool_group_type str

The type of the active address pool group.

failover_addr_pool_type str

The type of the secondary address pool.

failover_addr_pools Sequence[GetAccessStrategiesStrategyFailoverAddrPool]

The address pools in the secondary address pool group.

failover_available_addr_num int

The number of available addresses in the standby address pool.

failover_latency_optimization str

Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.

failover_lba_strategy str

The load balancing policy of the secondary address pool group.

failover_max_return_addr_num int

The maximum number of returned addresses in the standby address pool.

failover_min_available_addr_num int

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

List of source regions.

strategy_mode str

The type of the access policy.

strategy_name str

The name of the access policy.

accessMode String

The primary/secondary switchover policy for address pool groups.

accessStrategyId String

The first ID of the resource.

createTime String

The time when the access policy was created.

createTimestamp String

The timestamp that indicates when the access policy was created.

defaultAddrPoolType String

The type of the primary address pool.

defaultAddrPools List<Property Map>

The address pools in the primary address pool group.

defaultAvailableAddrNum Number

The number of addresses currently available in the primary address pool.

defaultLatencyOptimization String

Indicates whether scheduling optimization for latency resolution was enabled for the primary address pool group.

defaultLbaStrategy String

The load balancing policy of the primary address pool group.

defaultMaxReturnAddrNum Number

The maximum number of addresses returned by the primary address pool set.

defaultMinAvailableAddrNum Number

The minimum number of available addresses for the primary address pool set.

effectiveAddrPoolGroupType String

The type of the active address pool group.

failoverAddrPoolType String

The type of the secondary address pool.

failoverAddrPools List<Property Map>

The address pools in the secondary address pool group.

failoverAvailableAddrNum Number

The number of available addresses in the standby address pool.

failoverLatencyOptimization String

Indicates whether scheduling optimization for latency resolution was enabled for the secondary address pool group.

failoverLbaStrategy String

The load balancing policy of the secondary address pool group.

failoverMaxReturnAddrNum Number

The maximum number of returned addresses in the standby address pool.

failoverMinAvailableAddrNum Number

The minimum number of available addresses in the standby address pool.

id String

The ID of the Access Strategy.

instanceId String

The Id of the associated instance.

lines List<Property Map>

List of source regions.

strategyMode String

The type of the access policy.

strategyName String

The name of the access policy.

GetAccessStrategiesStrategyDefaultAddrPool

AddrCount int

The number of addresses in the address pool.

AddrPoolId string

The ID of the address pool.

LbaWeight int

The weight of the address pool.

Name string

The name of the address pool.

AddrCount int

The number of addresses in the address pool.

AddrPoolId string

The ID of the address pool.

LbaWeight int

The weight of the address pool.

Name string

The name of the address pool.

addrCount Integer

The number of addresses in the address pool.

addrPoolId String

The ID of the address pool.

lbaWeight Integer

The weight of the address pool.

name String

The name of the address pool.

addrCount number

The number of addresses in the address pool.

addrPoolId string

The ID of the address pool.

lbaWeight 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_id str

The ID of the address pool.

lba_weight int

The weight of the address pool.

name str

The name of the address pool.

addrCount Number

The number of addresses in the address pool.

addrPoolId String

The ID of the address pool.

lbaWeight Number

The weight of the address pool.

name String

The name of the address pool.

GetAccessStrategiesStrategyFailoverAddrPool

AddrCount int

The number of addresses in the address pool.

AddrPoolId string

The ID of the address pool.

LbaWeight int

The weight of the address pool.

Name string

The name of the address pool.

AddrCount int

The number of addresses in the address pool.

AddrPoolId string

The ID of the address pool.

LbaWeight int

The weight of the address pool.

Name string

The name of the address pool.

addrCount Integer

The number of addresses in the address pool.

addrPoolId String

The ID of the address pool.

lbaWeight Integer

The weight of the address pool.

name String

The name of the address pool.

addrCount number

The number of addresses in the address pool.

addrPoolId string

The ID of the address pool.

lbaWeight 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_id str

The ID of the address pool.

lba_weight int

The weight of the address pool.

name str

The name of the address pool.

addrCount Number

The number of addresses in the address pool.

addrPoolId String

The ID of the address pool.

lbaWeight Number

The weight of the address pool.

name String

The name of the address pool.

GetAccessStrategiesStrategyLine

GroupCode string

The code of the source region group.

GroupName string

The name of the source region group.

LineCode string

The line code of the source region.

LineName string

The line name of the source region.

GroupCode string

The code of the source region group.

GroupName string

The name of the source region group.

LineCode string

The line code of the source region.

LineName string

The line name of the source region.

groupCode String

The code of the source region group.

groupName String

The name of the source region group.

lineCode String

The line code of the source region.

lineName String

The line name of the source region.

groupCode string

The code of the source region group.

groupName string

The name of the source region group.

lineCode string

The line code of the source region.

lineName string

The line name of the source region.

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.

groupCode String

The code of the source region group.

groupName String

The name of the source region group.

lineCode String

The line code of the source region.

lineName String

The line name of the source region.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.