Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.alb.getAscripts
Explore with Pulumi AI
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:
- Ascript
Name string - Script name.
- Enable
Details bool - Ids List<string>
- A list of AScript IDs.
- Listener
Id string - Listener ID of script attribution
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ascript
Name string - Script name.
- Enable
Details bool - Ids []string
- A list of AScript IDs.
- Listener
Id string - Listener ID of script attribution
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ascript
Name String - Script name.
- enable
Details Boolean - ids List<String>
- A list of AScript IDs.
- listener
Id String - Listener ID of script attribution
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ascript
Name string - Script name.
- enable
Details boolean - ids string[]
- A list of AScript IDs.
- listener
Id string - Listener ID of script attribution
- name
Regex string - A regex string to filter results by Group Metric Rule name.
- output
File 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
).
- ascript
Name String - Script name.
- enable
Details Boolean - ids List<String>
- A list of AScript IDs.
- listener
Id String - Listener ID of script attribution
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getAscripts Result
The following output properties are available:
- Ascripts
List<Pulumi.
Ali Cloud. Alb. Outputs. Get Ascripts Ascript> - 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.
- Ascript
Name string - Script name.
- Enable
Details bool - Listener
Id string - Listener ID of script attribution.
- Name
Regex string - Output
File string
- Ascripts
[]Get
Ascripts Ascript - 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.
- Ascript
Name string - Script name.
- Enable
Details bool - Listener
Id string - Listener ID of script attribution.
- Name
Regex string - Output
File string
- ascripts
List<Get
Ascripts Ascript> - 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.
- ascript
Name String - Script name.
- enable
Details Boolean - listener
Id String - Listener ID of script attribution.
- name
Regex String - output
File String
- ascripts
Get
Ascripts Ascript[] - 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.
- ascript
Name string - Script name.
- enable
Details boolean - listener
Id string - Listener ID of script attribution.
- name
Regex string - output
File string
- ascripts
Sequence[Get
Ascripts Ascript] - 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.
- ascript
Name String - Script name.
- enable
Details Boolean - listener
Id String - Listener ID of script attribution.
- name
Regex String - output
File String
Supporting Types
GetAscriptsAscript
- Ascript
Id string - Script identification.
- Ascript
Name string - Script name.
- Enabled bool
- Whether scripts are enabled.
- Ext
Attribute boolEnabled - Whether extension parameters are enabled.
- Ext
Attributes List<Pulumi.Ali Cloud. Alb. Inputs. Get Ascripts Ascript Ext Attribute> - Extended attribute list.
- Id string
- Listener
Id string - Listener ID of script attribution
- Load
Balancer stringId - Position string
- Script execution location.
- Script
Content string - Script content.
- Status string
- Script status.
- Ascript
Id string - Script identification.
- Ascript
Name string - Script name.
- Enabled bool
- Whether scripts are enabled.
- Ext
Attribute boolEnabled - Whether extension parameters are enabled.
- Ext
Attributes []GetAscripts Ascript Ext Attribute - Extended attribute list.
- Id string
- Listener
Id string - Listener ID of script attribution
- Load
Balancer stringId - Position string
- Script execution location.
- Script
Content string - Script content.
- Status string
- Script status.
- ascript
Id String - Script identification.
- ascript
Name String - Script name.
- enabled Boolean
- Whether scripts are enabled.
- ext
Attribute BooleanEnabled - Whether extension parameters are enabled.
- ext
Attributes List<GetAscripts Ascript Ext Attribute> - Extended attribute list.
- id String
- listener
Id String - Listener ID of script attribution
- load
Balancer StringId - position String
- Script execution location.
- script
Content String - Script content.
- status String
- Script status.
- ascript
Id string - Script identification.
- ascript
Name string - Script name.
- enabled boolean
- Whether scripts are enabled.
- ext
Attribute booleanEnabled - Whether extension parameters are enabled.
- ext
Attributes GetAscripts Ascript Ext Attribute[] - Extended attribute list.
- id string
- listener
Id string - Listener ID of script attribution
- load
Balancer stringId - position string
- Script execution location.
- script
Content 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_ boolenabled - Whether extension parameters are enabled.
- ext_
attributes Sequence[GetAscripts Ascript Ext Attribute] - Extended attribute list.
- id str
- listener_
id str - Listener ID of script attribution
- load_
balancer_ strid - position str
- Script execution location.
- script_
content str - Script content.
- status str
- Script status.
- ascript
Id String - Script identification.
- ascript
Name String - Script name.
- enabled Boolean
- Whether scripts are enabled.
- ext
Attribute BooleanEnabled - Whether extension parameters are enabled.
- ext
Attributes List<Property Map> - Extended attribute list.
- id String
- listener
Id String - Listener ID of script attribution
- load
Balancer StringId - position String
- Script execution location.
- script
Content String - Script content.
- status String
- Script status.
GetAscriptsAscriptExtAttribute
- Attribute
Key string - The key of the extended attribute.
- Attribute
Value string - The value of the extended attribute.
- Attribute
Key string - The key of the extended attribute.
- Attribute
Value string - The value of the extended attribute.
- attribute
Key String - The key of the extended attribute.
- attribute
Value String - The value of the extended attribute.
- attribute
Key string - The key of the extended attribute.
- attribute
Value 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.
- attribute
Key String - The key of the extended attribute.
- attribute
Value 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.