1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. alb
  5. AScript
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.alb.AScript

Explore with Pulumi AI

Provides a Application Load Balancer (ALB) A Script resource.

For information about Application Load Balancer (ALB) A Script and how to use it, see What is A Script.

NOTE: Available since v1.195.0.

Create AScript Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AScript(name: string, args: AScriptArgs, opts?: CustomResourceOptions);
@overload
def AScript(resource_name: str,
            args: AScriptArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def AScript(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            ascript_name: Optional[str] = None,
            listener_id: Optional[str] = None,
            position: Optional[str] = None,
            script_content: Optional[str] = None,
            dry_run: Optional[bool] = None,
            enabled: Optional[bool] = None,
            ext_attribute_enabled: Optional[bool] = None,
            ext_attributes: Optional[Sequence[AScriptExtAttributeArgs]] = 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.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AScriptArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AScriptArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var ascriptResource = new AliCloud.Alb.AScript("ascriptResource", new()
{
    AscriptName = "string",
    ListenerId = "string",
    Position = "string",
    ScriptContent = "string",
    DryRun = false,
    Enabled = false,
    ExtAttributeEnabled = false,
    ExtAttributes = new[]
    {
        new AliCloud.Alb.Inputs.AScriptExtAttributeArgs
        {
            AttributeKey = "string",
            AttributeValue = "string",
        },
    },
});
Copy
example, err := alb.NewAScript(ctx, "ascriptResource", &alb.AScriptArgs{
	AscriptName:         pulumi.String("string"),
	ListenerId:          pulumi.String("string"),
	Position:            pulumi.String("string"),
	ScriptContent:       pulumi.String("string"),
	DryRun:              pulumi.Bool(false),
	Enabled:             pulumi.Bool(false),
	ExtAttributeEnabled: pulumi.Bool(false),
	ExtAttributes: alb.AScriptExtAttributeArray{
		&alb.AScriptExtAttributeArgs{
			AttributeKey:   pulumi.String("string"),
			AttributeValue: pulumi.String("string"),
		},
	},
})
Copy
var ascriptResource = new AScript("ascriptResource", AScriptArgs.builder()
    .ascriptName("string")
    .listenerId("string")
    .position("string")
    .scriptContent("string")
    .dryRun(false)
    .enabled(false)
    .extAttributeEnabled(false)
    .extAttributes(AScriptExtAttributeArgs.builder()
        .attributeKey("string")
        .attributeValue("string")
        .build())
    .build());
Copy
ascript_resource = alicloud.alb.AScript("ascriptResource",
    ascript_name="string",
    listener_id="string",
    position="string",
    script_content="string",
    dry_run=False,
    enabled=False,
    ext_attribute_enabled=False,
    ext_attributes=[{
        "attribute_key": "string",
        "attribute_value": "string",
    }])
Copy
const ascriptResource = new alicloud.alb.AScript("ascriptResource", {
    ascriptName: "string",
    listenerId: "string",
    position: "string",
    scriptContent: "string",
    dryRun: false,
    enabled: false,
    extAttributeEnabled: false,
    extAttributes: [{
        attributeKey: "string",
        attributeValue: "string",
    }],
});
Copy
type: alicloud:alb:AScript
properties:
    ascriptName: string
    dryRun: false
    enabled: false
    extAttributeEnabled: false
    extAttributes:
        - attributeKey: string
          attributeValue: string
    listenerId: string
    position: string
    scriptContent: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AScript resource accepts the following input properties:

AscriptName This property is required. string
AScript name.
ListenerId
This property is required.
Changes to this property will trigger replacement.
string
Listener ID of script attribution
Position
This property is required.
Changes to this property will trigger replacement.
string
Script execution location.
ScriptContent This property is required. string
AScript script content.
DryRun bool
Whether to PreCheck only this request
Enabled bool
Whether AScript is enabled.
ExtAttributeEnabled bool
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
ExtAttributes List<Pulumi.AliCloud.Alb.Inputs.AScriptExtAttribute>
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
AscriptName This property is required. string
AScript name.
ListenerId
This property is required.
Changes to this property will trigger replacement.
string
Listener ID of script attribution
Position
This property is required.
Changes to this property will trigger replacement.
string
Script execution location.
ScriptContent This property is required. string
AScript script content.
DryRun bool
Whether to PreCheck only this request
Enabled bool
Whether AScript is enabled.
ExtAttributeEnabled bool
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
ExtAttributes []AScriptExtAttributeArgs
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
ascriptName This property is required. String
AScript name.
listenerId
This property is required.
Changes to this property will trigger replacement.
String
Listener ID of script attribution
position
This property is required.
Changes to this property will trigger replacement.
String
Script execution location.
scriptContent This property is required. String
AScript script content.
dryRun Boolean
Whether to PreCheck only this request
enabled Boolean
Whether AScript is enabled.
extAttributeEnabled Boolean
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
extAttributes List<AScriptExtAttribute>
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
ascriptName This property is required. string
AScript name.
listenerId
This property is required.
Changes to this property will trigger replacement.
string
Listener ID of script attribution
position
This property is required.
Changes to this property will trigger replacement.
string
Script execution location.
scriptContent This property is required. string
AScript script content.
dryRun boolean
Whether to PreCheck only this request
enabled boolean
Whether AScript is enabled.
extAttributeEnabled boolean
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
extAttributes AScriptExtAttribute[]
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
ascript_name This property is required. str
AScript name.
listener_id
This property is required.
Changes to this property will trigger replacement.
str
Listener ID of script attribution
position
This property is required.
Changes to this property will trigger replacement.
str
Script execution location.
script_content This property is required. str
AScript script content.
dry_run bool
Whether to PreCheck only this request
enabled bool
Whether AScript is enabled.
ext_attribute_enabled bool
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
ext_attributes Sequence[AScriptExtAttributeArgs]
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
ascriptName This property is required. String
AScript name.
listenerId
This property is required.
Changes to this property will trigger replacement.
String
Listener ID of script attribution
position
This property is required.
Changes to this property will trigger replacement.
String
Script execution location.
scriptContent This property is required. String
AScript script content.
dryRun Boolean
Whether to PreCheck only this request
enabled Boolean
Whether AScript is enabled.
extAttributeEnabled Boolean
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
extAttributes List<Property Map>
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.

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.
Status string
Script status
Id string
The provider-assigned unique ID for this managed resource.
Status string
Script status
id String
The provider-assigned unique ID for this managed resource.
status String
Script status
id string
The provider-assigned unique ID for this managed resource.
status string
Script status
id str
The provider-assigned unique ID for this managed resource.
status str
Script status
id String
The provider-assigned unique ID for this managed resource.
status String
Script status

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,
        dry_run: Optional[bool] = 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,
        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)
resources:  _:    type: alicloud:alb:AScript    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AscriptName string
AScript name.
DryRun bool
Whether to PreCheck only this request
Enabled bool
Whether AScript is enabled.
ExtAttributeEnabled bool
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
ExtAttributes List<Pulumi.AliCloud.Alb.Inputs.AScriptExtAttribute>
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
ListenerId Changes to this property will trigger replacement. string
Listener ID of script attribution
Position Changes to this property will trigger replacement. string
Script execution location.
ScriptContent string
AScript script content.
Status string
Script status
AscriptName string
AScript name.
DryRun bool
Whether to PreCheck only this request
Enabled bool
Whether AScript is enabled.
ExtAttributeEnabled bool
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
ExtAttributes []AScriptExtAttributeArgs
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
ListenerId Changes to this property will trigger replacement. string
Listener ID of script attribution
Position Changes to this property will trigger replacement. string
Script execution location.
ScriptContent string
AScript script content.
Status string
Script status
ascriptName String
AScript name.
dryRun Boolean
Whether to PreCheck only this request
enabled Boolean
Whether AScript is enabled.
extAttributeEnabled Boolean
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
extAttributes List<AScriptExtAttribute>
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
listenerId Changes to this property will trigger replacement. String
Listener ID of script attribution
position Changes to this property will trigger replacement. String
Script execution location.
scriptContent String
AScript script content.
status String
Script status
ascriptName string
AScript name.
dryRun boolean
Whether to PreCheck only this request
enabled boolean
Whether AScript is enabled.
extAttributeEnabled boolean
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
extAttributes AScriptExtAttribute[]
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
listenerId Changes to this property will trigger replacement. string
Listener ID of script attribution
position Changes to this property will trigger replacement. string
Script execution location.
scriptContent string
AScript script content.
status string
Script status
ascript_name str
AScript name.
dry_run bool
Whether to PreCheck only this request
enabled bool
Whether AScript is enabled.
ext_attribute_enabled bool
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
ext_attributes Sequence[AScriptExtAttributeArgs]
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
listener_id Changes to this property will trigger replacement. str
Listener ID of script attribution
position Changes to this property will trigger replacement. str
Script execution location.
script_content str
AScript script content.
status str
Script status
ascriptName String
AScript name.
dryRun Boolean
Whether to PreCheck only this request
enabled Boolean
Whether AScript is enabled.
extAttributeEnabled Boolean
Whether extension parameters are enabled. When ExtAttributeEnabled is true, ExtAttributes must be set.
extAttributes List<Property Map>
Expand the list of attributes. When ExtAttributeEnabled is true, ExtAttributes must be set. See ext_attributes below.
listenerId Changes to this property will trigger replacement. String
Listener ID of script attribution
position Changes to this property will trigger replacement. String
Script execution location.
scriptContent String
AScript script content.
status String
Script status

Supporting Types

AScriptExtAttribute
, AScriptExtAttributeArgs

AttributeKey string
Key to extend attribute
AttributeValue string
The value of the extended attribute
AttributeKey string
Key to extend attribute
AttributeValue string
The value of the extended attribute
attributeKey String
Key to extend attribute
attributeValue String
The value of the extended attribute
attributeKey string
Key to extend attribute
attributeValue string
The value of the extended attribute
attribute_key str
Key to extend attribute
attribute_value str
The value of the extended attribute
attributeKey String
Key to extend attribute
attributeValue String
The value of the extended attribute

Import

Application Load Balancer (ALB) A Script can be imported using the id, e.g.

$ pulumi import alicloud:alb/aScript:AScript example <id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.