1. Packages
  2. Alicloud Provider
  3. API Docs
  4. alb
  5. getAscripts
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.alb.getAscripts

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides Alb Ascript available to the user.

    NOTE: Available in 1.195.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.alb.getAscripts({
        ids: [defaultAlicloudAlbAscript.id],
        nameRegex: defaultAlicloudAlbAscript.name,
        ascriptName: "test",
        listenerId: listenerId,
    });
    export const alicloudAlbAscriptExampleId = _default.then(_default => _default.ascripts?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.alb.get_ascripts(ids=[default_alicloud_alb_ascript["id"]],
        name_regex=default_alicloud_alb_ascript["name"],
        ascript_name="test",
        listener_id=listener_id)
    pulumi.export("alicloudAlbAscriptExampleId", default.ascripts[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _default, err := alb.GetAscripts(ctx, &alb.GetAscriptsArgs{
    Ids: interface{}{
    defaultAlicloudAlbAscript.Id,
    },
    NameRegex: pulumi.StringRef(defaultAlicloudAlbAscript.Name),
    AscriptName: pulumi.StringRef("test"),
    ListenerId: pulumi.StringRef(listenerId),
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("alicloudAlbAscriptExampleId", _default.Ascripts[0].Id)
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Alb.GetAscripts.Invoke(new()
        {
            Ids = new[]
            {
                defaultAlicloudAlbAscript.Id,
            },
            NameRegex = defaultAlicloudAlbAscript.Name,
            AscriptName = "test",
            ListenerId = listenerId,
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudAlbAscriptExampleId"] = @default.Apply(@default => @default.Apply(getAscriptsResult => getAscriptsResult.Ascripts[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.alb.AlbFunctions;
    import com.pulumi.alicloud.alb.inputs.GetAscriptsArgs;
    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 default = AlbFunctions.getAscripts(GetAscriptsArgs.builder()
                .ids(defaultAlicloudAlbAscript.id())
                .nameRegex(defaultAlicloudAlbAscript.name())
                .ascriptName("test")
                .listenerId(listenerId)
                .build());
    
            ctx.export("alicloudAlbAscriptExampleId", default_.ascripts()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:alb:getAscripts
          Arguments:
            ids:
              - ${defaultAlicloudAlbAscript.id}
            nameRegex: ${defaultAlicloudAlbAscript.name}
            ascriptName: test
            listenerId: ${listenerId}
    outputs:
      alicloudAlbAscriptExampleId: ${default.ascripts[0].id}
    

    Using getAscripts

    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 getAscripts(args: GetAscriptsArgs, opts?: InvokeOptions): Promise<GetAscriptsResult>
    function getAscriptsOutput(args: GetAscriptsOutputArgs, opts?: InvokeOptions): Output<GetAscriptsResult>
    def get_ascripts(ascript_name: Optional[str] = None,
                     enable_details: Optional[bool] = None,
                     ids: Optional[Sequence[str]] = None,
                     listener_id: Optional[str] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAscriptsResult
    def get_ascripts_output(ascript_name: Optional[pulumi.Input[str]] = None,
                     enable_details: Optional[pulumi.Input[bool]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     listener_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[GetAscriptsResult]
    func GetAscripts(ctx *Context, args *GetAscriptsArgs, opts ...InvokeOption) (*GetAscriptsResult, error)
    func GetAscriptsOutput(ctx *Context, args *GetAscriptsOutputArgs, opts ...InvokeOption) GetAscriptsResultOutput

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

    public static class GetAscripts 
    {
        public static Task<GetAscriptsResult> InvokeAsync(GetAscriptsArgs args, InvokeOptions? opts = null)
        public static Output<GetAscriptsResult> Invoke(GetAscriptsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAscriptsResult> getAscripts(GetAscriptsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:alb/getAscripts:getAscripts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AscriptName string
    Script name.
    EnableDetails bool
    Ids List<string>
    A list of AScript IDs.
    ListenerId string
    Listener ID of script attribution
    NameRegex string
    A regex string to filter results by Group Metric Rule name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    AscriptName string
    Script name.
    EnableDetails bool
    Ids []string
    A list of AScript IDs.
    ListenerId string
    Listener ID of script attribution
    NameRegex string
    A regex string to filter results by Group Metric Rule name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ascriptName String
    Script name.
    enableDetails Boolean
    ids List<String>
    A list of AScript IDs.
    listenerId String
    Listener ID of script attribution
    nameRegex String
    A regex string to filter results by Group Metric Rule name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ascriptName string
    Script name.
    enableDetails boolean
    ids string[]
    A list of AScript IDs.
    listenerId string
    Listener ID of script attribution
    nameRegex string
    A regex string to filter results by Group Metric Rule name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ascript_name str
    Script name.
    enable_details bool
    ids Sequence[str]
    A list of AScript IDs.
    listener_id str
    Listener ID of script attribution
    name_regex str
    A regex string to filter results by Group Metric Rule name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ascriptName String
    Script name.
    enableDetails Boolean
    ids List<String>
    A list of AScript IDs.
    listenerId String
    Listener ID of script attribution
    nameRegex String
    A regex string to filter results by Group Metric Rule name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getAscripts Result

    The following output properties are available:

    Ascripts List<Pulumi.AliCloud.Alb.Outputs.GetAscriptsAscript>
    A list of AScript Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of AScript IDs.
    Names List<string>
    A list of name of AScripts.
    AscriptName string
    Script name.
    EnableDetails bool
    ListenerId string
    Listener ID of script attribution.
    NameRegex string
    OutputFile string
    Ascripts []GetAscriptsAscript
    A list of AScript Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of AScript IDs.
    Names []string
    A list of name of AScripts.
    AscriptName string
    Script name.
    EnableDetails bool
    ListenerId string
    Listener ID of script attribution.
    NameRegex string
    OutputFile string
    ascripts List<GetAscriptsAscript>
    A list of AScript Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of AScript IDs.
    names List<String>
    A list of name of AScripts.
    ascriptName String
    Script name.
    enableDetails Boolean
    listenerId String
    Listener ID of script attribution.
    nameRegex String
    outputFile String
    ascripts GetAscriptsAscript[]
    A list of AScript Entries. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of AScript IDs.
    names string[]
    A list of name of AScripts.
    ascriptName string
    Script name.
    enableDetails boolean
    listenerId string
    Listener ID of script attribution.
    nameRegex string
    outputFile string
    ascripts Sequence[GetAscriptsAscript]
    A list of AScript Entries. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of AScript IDs.
    names Sequence[str]
    A list of name of AScripts.
    ascript_name str
    Script name.
    enable_details bool
    listener_id str
    Listener ID of script attribution.
    name_regex str
    output_file str
    ascripts List<Property Map>
    A list of AScript Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of AScript IDs.
    names List<String>
    A list of name of AScripts.
    ascriptName String
    Script name.
    enableDetails Boolean
    listenerId String
    Listener ID of script attribution.
    nameRegex String
    outputFile String

    Supporting Types

    GetAscriptsAscript

    AscriptId string
    Script identification.
    AscriptName string
    Script name.
    Enabled bool
    Whether scripts are enabled.
    ExtAttributeEnabled bool
    Whether extension parameters are enabled.
    ExtAttributes List<Pulumi.AliCloud.Alb.Inputs.GetAscriptsAscriptExtAttribute>
    Extended attribute list.
    Id string
    ListenerId string
    Listener ID of script attribution
    LoadBalancerId string
    Position string
    Script execution location.
    ScriptContent string
    Script content.
    Status string
    Script status.
    AscriptId string
    Script identification.
    AscriptName string
    Script name.
    Enabled bool
    Whether scripts are enabled.
    ExtAttributeEnabled bool
    Whether extension parameters are enabled.
    ExtAttributes []GetAscriptsAscriptExtAttribute
    Extended attribute list.
    Id string
    ListenerId string
    Listener ID of script attribution
    LoadBalancerId string
    Position string
    Script execution location.
    ScriptContent string
    Script content.
    Status string
    Script status.
    ascriptId String
    Script identification.
    ascriptName String
    Script name.
    enabled Boolean
    Whether scripts are enabled.
    extAttributeEnabled Boolean
    Whether extension parameters are enabled.
    extAttributes List<GetAscriptsAscriptExtAttribute>
    Extended attribute list.
    id String
    listenerId String
    Listener ID of script attribution
    loadBalancerId String
    position String
    Script execution location.
    scriptContent String
    Script content.
    status String
    Script status.
    ascriptId string
    Script identification.
    ascriptName string
    Script name.
    enabled boolean
    Whether scripts are enabled.
    extAttributeEnabled boolean
    Whether extension parameters are enabled.
    extAttributes GetAscriptsAscriptExtAttribute[]
    Extended attribute list.
    id string
    listenerId string
    Listener ID of script attribution
    loadBalancerId string
    position string
    Script execution location.
    scriptContent string
    Script content.
    status string
    Script status.
    ascript_id str
    Script identification.
    ascript_name str
    Script name.
    enabled bool
    Whether scripts are enabled.
    ext_attribute_enabled bool
    Whether extension parameters are enabled.
    ext_attributes Sequence[GetAscriptsAscriptExtAttribute]
    Extended attribute list.
    id str
    listener_id str
    Listener ID of script attribution
    load_balancer_id str
    position str
    Script execution location.
    script_content str
    Script content.
    status str
    Script status.
    ascriptId String
    Script identification.
    ascriptName String
    Script name.
    enabled Boolean
    Whether scripts are enabled.
    extAttributeEnabled Boolean
    Whether extension parameters are enabled.
    extAttributes List<Property Map>
    Extended attribute list.
    id String
    listenerId String
    Listener ID of script attribution
    loadBalancerId String
    position String
    Script execution location.
    scriptContent String
    Script content.
    status String
    Script status.

    GetAscriptsAscriptExtAttribute

    AttributeKey string
    The key of the extended attribute.
    AttributeValue string
    The value of the extended attribute.
    AttributeKey string
    The key of the extended attribute.
    AttributeValue string
    The value of the extended attribute.
    attributeKey String
    The key of the extended attribute.
    attributeValue String
    The value of the extended attribute.
    attributeKey string
    The key of the extended attribute.
    attributeValue string
    The value of the extended attribute.
    attribute_key str
    The key of the extended attribute.
    attribute_value str
    The value of the extended attribute.
    attributeKey String
    The key of the extended attribute.
    attributeValue String
    The value of the extended attribute.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi