Alibaba Cloud v3.38.0, Jun 2 23
Alibaba Cloud v3.38.0, Jun 2 23
alicloud.alb.AScript
Explore with Pulumi AI
Provides a Alb Ascript resource.
For information about Alb Ascript and how to use it, see What is AScript.
NOTE: Available in v1.195.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Alb.AScript("default", new()
{
ScriptContent = "time()",
Position = "RequestHead",
AscriptName = "test",
Enabled = true,
ListenerId = @var.ListenerId,
});
});
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 {
_, err := alb.NewAScript(ctx, "default", &alb.AScriptArgs{
ScriptContent: pulumi.String("time()"),
Position: pulumi.String("RequestHead"),
AscriptName: pulumi.String("test"),
Enabled: pulumi.Bool(true),
ListenerId: pulumi.Any(_var.ListenerId),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.alb.AScript;
import com.pulumi.alicloud.alb.AScriptArgs;
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) {
var default_ = new AScript("default", AScriptArgs.builder()
.scriptContent("time()")
.position("RequestHead")
.ascriptName("test")
.enabled(true)
.listenerId(var_.listenerId())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.alb.AScript("default",
script_content="time()",
position="RequestHead",
ascript_name="test",
enabled=True,
listener_id=var["listenerId"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.alb.AScript("default", {
scriptContent: "time()",
position: "RequestHead",
ascriptName: "test",
enabled: true,
listenerId: _var.listenerId,
});
resources:
default:
type: alicloud:alb:AScript
properties:
scriptContent: time()
position: RequestHead
ascriptName: test
enabled: true
listenerId: ${var.listenerId}
Create AScript Resource
new AScript(name: string, args: AScriptArgs, opts?: CustomResourceOptions);
@overload
def AScript(resource_name: str,
opts: Optional[ResourceOptions] = None,
ascript_name: Optional[str] = None,
enabled: Optional[bool] = None,
ext_attribute_enabled: Optional[bool] = None,
ext_attributes: Optional[Sequence[AScriptExtAttributeArgs]] = None,
listener_id: Optional[str] = None,
position: Optional[str] = None,
script_content: Optional[str] = None)
@overload
def AScript(resource_name: str,
args: AScriptArgs,
opts: Optional[ResourceOptions] = None)
func NewAScript(ctx *Context, name string, args AScriptArgs, opts ...ResourceOption) (*AScript, error)
public AScript(string name, AScriptArgs args, CustomResourceOptions? opts = null)
public AScript(String name, AScriptArgs args)
public AScript(String name, AScriptArgs args, CustomResourceOptions options)
type: alicloud:alb:AScript
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AScriptArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AScriptArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AScriptArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AScriptArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AScriptArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AScript Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AScript resource accepts the following input properties:
- Ascript
Name string The name of AScript.
- Enabled bool
Whether scripts are enabled.
- Listener
Id string Listener ID of script attribution
- Position string
Execution location of AScript.
- Script
Content string The content of AScript.
- Ext
Attribute boolEnabled Whether extension parameters are enabled.
- Ext
Attributes List<Pulumi.Ali Cloud. Alb. Inputs. AScript Ext Attribute Args> Extended attribute list. See the following
Block ExtAttributes
.
- Ascript
Name string The name of AScript.
- Enabled bool
Whether scripts are enabled.
- Listener
Id string Listener ID of script attribution
- Position string
Execution location of AScript.
- Script
Content string The content of AScript.
- Ext
Attribute boolEnabled Whether extension parameters are enabled.
- Ext
Attributes []AScriptExt Attribute Args Extended attribute list. See the following
Block ExtAttributes
.
- ascript
Name String The name of AScript.
- enabled Boolean
Whether scripts are enabled.
- listener
Id String Listener ID of script attribution
- position String
Execution location of AScript.
- script
Content String The content of AScript.
- ext
Attribute BooleanEnabled Whether extension parameters are enabled.
- ext
Attributes List<AScriptExt Attribute Args> Extended attribute list. See the following
Block ExtAttributes
.
- ascript
Name string The name of AScript.
- enabled boolean
Whether scripts are enabled.
- listener
Id string Listener ID of script attribution
- position string
Execution location of AScript.
- script
Content string The content of AScript.
- ext
Attribute booleanEnabled Whether extension parameters are enabled.
- ext
Attributes AScriptExt Attribute Args[] Extended attribute list. See the following
Block ExtAttributes
.
- ascript_
name str The name of AScript.
- enabled bool
Whether scripts are enabled.
- listener_
id str Listener ID of script attribution
- position str
Execution location of AScript.
- script_
content str The content of AScript.
- ext_
attribute_ boolenabled Whether extension parameters are enabled.
- ext_
attributes Sequence[AScriptExt Attribute Args] Extended attribute list. See the following
Block ExtAttributes
.
- ascript
Name String The name of AScript.
- enabled Boolean
Whether scripts are enabled.
- listener
Id String Listener ID of script attribution
- position String
Execution location of AScript.
- script
Content String The content of AScript.
- ext
Attribute BooleanEnabled Whether extension parameters are enabled.
- ext
Attributes List<Property Map> Extended attribute list. See the following
Block ExtAttributes
.
Outputs
All input properties are implicitly available as output properties. Additionally, the AScript resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Load
Balancer stringId The ID of load balancer instance.
- Status string
The status of AScript.
- Id string
The provider-assigned unique ID for this managed resource.
- Load
Balancer stringId The ID of load balancer instance.
- Status string
The status of AScript.
- id String
The provider-assigned unique ID for this managed resource.
- load
Balancer StringId The ID of load balancer instance.
- status String
The status of AScript.
- id string
The provider-assigned unique ID for this managed resource.
- load
Balancer stringId The ID of load balancer instance.
- status string
The status of AScript.
- id str
The provider-assigned unique ID for this managed resource.
- load_
balancer_ strid The ID of load balancer instance.
- status str
The status of AScript.
- id String
The provider-assigned unique ID for this managed resource.
- load
Balancer StringId The ID of load balancer instance.
- status String
The status of AScript.
Look up Existing AScript Resource
Get an existing AScript resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AScriptState, opts?: CustomResourceOptions): AScript
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ascript_name: Optional[str] = None,
enabled: Optional[bool] = None,
ext_attribute_enabled: Optional[bool] = None,
ext_attributes: Optional[Sequence[AScriptExtAttributeArgs]] = None,
listener_id: Optional[str] = None,
load_balancer_id: Optional[str] = None,
position: Optional[str] = None,
script_content: Optional[str] = None,
status: Optional[str] = None) -> AScript
func GetAScript(ctx *Context, name string, id IDInput, state *AScriptState, opts ...ResourceOption) (*AScript, error)
public static AScript Get(string name, Input<string> id, AScriptState? state, CustomResourceOptions? opts = null)
public static AScript get(String name, Output<String> id, AScriptState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Ascript
Name string The name of AScript.
- Enabled bool
Whether scripts are enabled.
- Ext
Attribute boolEnabled Whether extension parameters are enabled.
- Ext
Attributes List<Pulumi.Ali Cloud. Alb. Inputs. AScript Ext Attribute Args> Extended attribute list. See the following
Block ExtAttributes
.- Listener
Id string Listener ID of script attribution
- Load
Balancer stringId The ID of load balancer instance.
- Position string
Execution location of AScript.
- Script
Content string The content of AScript.
- Status string
The status of AScript.
- Ascript
Name string The name of AScript.
- Enabled bool
Whether scripts are enabled.
- Ext
Attribute boolEnabled Whether extension parameters are enabled.
- Ext
Attributes []AScriptExt Attribute Args Extended attribute list. See the following
Block ExtAttributes
.- Listener
Id string Listener ID of script attribution
- Load
Balancer stringId The ID of load balancer instance.
- Position string
Execution location of AScript.
- Script
Content string The content of AScript.
- Status string
The status of AScript.
- ascript
Name String The name of AScript.
- enabled Boolean
Whether scripts are enabled.
- ext
Attribute BooleanEnabled Whether extension parameters are enabled.
- ext
Attributes List<AScriptExt Attribute Args> Extended attribute list. See the following
Block ExtAttributes
.- listener
Id String Listener ID of script attribution
- load
Balancer StringId The ID of load balancer instance.
- position String
Execution location of AScript.
- script
Content String The content of AScript.
- status String
The status of AScript.
- ascript
Name string The name of AScript.
- enabled boolean
Whether scripts are enabled.
- ext
Attribute booleanEnabled Whether extension parameters are enabled.
- ext
Attributes AScriptExt Attribute Args[] Extended attribute list. See the following
Block ExtAttributes
.- listener
Id string Listener ID of script attribution
- load
Balancer stringId The ID of load balancer instance.
- position string
Execution location of AScript.
- script
Content string The content of AScript.
- status string
The status of AScript.
- ascript_
name str The name of AScript.
- enabled bool
Whether scripts are enabled.
- ext_
attribute_ boolenabled Whether extension parameters are enabled.
- ext_
attributes Sequence[AScriptExt Attribute Args] Extended attribute list. See the following
Block ExtAttributes
.- listener_
id str Listener ID of script attribution
- load_
balancer_ strid The ID of load balancer instance.
- position str
Execution location of AScript.
- script_
content str The content of AScript.
- status str
The status of AScript.
- ascript
Name String The name of AScript.
- enabled Boolean
Whether scripts are enabled.
- ext
Attribute BooleanEnabled Whether extension parameters are enabled.
- ext
Attributes List<Property Map> Extended attribute list. See the following
Block ExtAttributes
.- listener
Id String Listener ID of script attribution
- load
Balancer StringId The ID of load balancer instance.
- position String
Execution location of AScript.
- script
Content String The content of AScript.
- status String
The status of AScript.
Supporting Types
AScriptExtAttribute
- 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.
Import
Alb AScript can be imported using the id, e.g.
$ pulumi import alicloud:alb/aScript:AScript example <id>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.