Module waf
This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-alicloudrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-alicloudrepo.
Resources
Functions
Others
Resources
Resource Domain
class Domain extends CustomResourceProvides a WAF Domain resource to create domain in the Web Application Firewall.
For information about WAF and how to use it, see What is Alibaba Cloud WAF.
NOTE: Available in 1.82.0+ .
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const domain = new alicloud.waf.Domain("domain", {
clusterType: "PhysicalCluster",
domain: "www.aliyun.com",
http2Ports: "443",
httpPorts: "80",
httpToUserIp: "Off",
httpsPorts: "443",
httpsRedirect: "Off",
instanceId: "waf-123455",
isAccessProduct: "On",
loadBalancing: "IpHash",
logHeaders: [{
key: "foo",
value: "http",
}],
sourceIps: ["1.1.1.1"],
});constructor
new Domain(name: string, args: DomainArgs, opts?: pulumi.CustomResourceOptions)Create a Domain resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainState, opts?: pulumi.CustomResourceOptions): DomainGet an existing Domain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DomainReturns true if the given object is an instance of Domain. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property clusterType
public clusterType: pulumi.Output<string | undefined>;The type of the WAF cluster. Valid values: “PhysicalCluster” and “VirtualCluster”. Default to “PhysicalCluster”.
property cname
public cname: pulumi.Output<string>;The CNAME record assigned by the WAF instance to the specified domain.
property connectionTime
public connectionTime: pulumi.Output<number | undefined>;The connection timeout for WAF exclusive clusters. Unit: seconds.
property domain
public domain: pulumi.Output<string>;The domain that you want to add to WAF.
property http2Ports
public http2Ports: pulumi.Output<string[] | undefined>;List of the HTTP 2.0 ports.
property httpPorts
public httpPorts: pulumi.Output<string[] | undefined>;List of the HTTP ports
property httpToUserIp
public httpToUserIp: pulumi.Output<string | undefined>;Specifies whether to enable the HTTP back-to-origin feature. After this feature is enabled, the WAF instance can use HTTP to forward HTTPS requests to the origin server. By default, port 80 is used to forward the requests to the origin server. Valid values: “On” and “Off”. Default to “Off”.
property httpsPorts
public httpsPorts: pulumi.Output<string[] | undefined>;List of the HTTPS ports
property httpsRedirect
public httpsRedirect: pulumi.Output<string | undefined>;Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instanceId
public instanceId: pulumi.Output<string>;The ID of the WAF instance.
property isAccessProduct
public isAccessProduct: pulumi.Output<string>;Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: “On” and “Off”. Default to “Off”.
property loadBalancing
public loadBalancing: pulumi.Output<string | undefined>;The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
property logHeaders
public logHeaders: pulumi.Output<DomainLogHeader[] | undefined>;The key-value pair that is used to mark the traffic that flows through WAF to the domain. Each item contains two field: * key: The key of label * value: The value of label
property readTime
public readTime: pulumi.Output<number | undefined>;The read timeout of a WAF exclusive cluster. Unit: seconds.
property resourceGroupId
public resourceGroupId: pulumi.Output<string>;The ID of the resource group to which the queried domain belongs in Resource Management. By default, no value is specified, indicating that the domain belongs to the default resource group.
property sourceIps
public sourceIps: pulumi.Output<string[]>;List of the IP address or domain of the origin server to which the specified domain points.
property status
public status: pulumi.Output<number>;property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property writeTime
public writeTime: pulumi.Output<number | undefined>;The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
Resource Instance
class Instance extends CustomResourceProvides a WAF Instance resource to create instance in the Web Application Firewall.
For information about WAF and how to use it, see What is Alibaba Cloud WAF.
NOTE: Available in 1.83.0+ .
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultInstance = new alicloud.waf.Instance("default", {
bigScreen: "0",
exclusiveIpPackage: "1",
extBandwidth: "50",
extDomainPackage: "1",
logStorage: "3",
logTime: "180",
packageCode: "version3",
period: 1,
prefessionalService: "false",
resourceGroupId: "rs-abc12345",
subscriptionType: "Subscription",
wafLog: "false",
});constructor
new Instance(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions)Create a Instance resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState, opts?: pulumi.CustomResourceOptions): InstanceGet an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is InstanceReturns true if the given object is an instance of Instance. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property bigScreen
public bigScreen: pulumi.Output<string>;Specify whether big screen is supported. Valid values: [“0”, “1”]. “0” for false and “1” for true.
property exclusiveIpPackage
public exclusiveIpPackage: pulumi.Output<string>;Specify the number of exclusive WAF IP addresses.
property extBandwidth
public extBandwidth: pulumi.Output<string>;The extra bandwidth. Unit: Mbit/s.
property extDomainPackage
public extDomainPackage: pulumi.Output<string>;The number of extra domains.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property logStorage
public logStorage: pulumi.Output<string>;Log storage size. Unit: T. Valid values: [3, 5, 10, 20, 50].
property logTime
public logTime: pulumi.Output<string>;Log storage period. Unit: day. Valid values: [180, 360].
property modifyType
public modifyType: pulumi.Output<string | undefined>;Type of configuration change. Valid value: Upgrade.
property packageCode
public packageCode: pulumi.Output<string>;Subscription plan: * China site customers can purchase the following versions of China Mainland region, valid values: [“version3”, “version4”, “version5”]. * China site customers can purchase the following versions of International region, valid values: [“versionProAsia”, “versionBusinessAsia”, “versionEnterpriseAsia”] * International site customers can purchase the following versions of China Mainland region: [“versionProChina”, “versionBusinessChina”, “versionEnterpriseChina”] * International site customers can purchase the following versions of International region: [“versionPro”, “versionBusiness”, “versionEnterprise”].
property period
public period: pulumi.Output<number | undefined>;Service time of Web Application Firewall.
property prefessionalService
public prefessionalService: pulumi.Output<string>;Specify whether professional service is supported. Valid values: [“true”, “false”]
property renewPeriod
public renewPeriod: pulumi.Output<number | undefined>;Renewal period of WAF service. Unit: month
property renewalStatus
public renewalStatus: pulumi.Output<string | undefined>;Renewal status of WAF service. Valid values: * AutoRenewal: The service time of WAF is renewed automatically. * ManualRenewal (default): The service time of WAF is renewed manually.Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: “On” and “Off”. Default to “Off”.
property resourceGroupId
public resourceGroupId: pulumi.Output<string | undefined>;The resource group ID.
property status
public status: pulumi.Output<number>;The status of the instance.
property subscriptionType
public subscriptionType: pulumi.Output<string>;Subscription of WAF service. Valid values: [“Subscription”, “PayAsYouGo”].
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property wafLog
public wafLog: pulumi.Output<string>;Specify whether Log service is supported. Valid values: [“true”, “false”]
Functions
Function getDomains
getDomains(args: GetDomainsArgs, opts?: pulumi.InvokeOptions): Promise<GetDomainsResult>Provides a WAF datasource to retrieve domains.
For information about WAF and how to use it, see What is Alibaba Cloud WAF.
NOTE: Available in 1.86.0+ .
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultDomains = pulumi.output(alicloud.waf.getDomains({
instanceId: "waf-cf-xxxxx",
}, { async: true }));Others
interface DomainArgs
interface DomainArgsThe set of arguments for constructing a Domain resource.
property clusterType
clusterType?: pulumi.Input<string>;The type of the WAF cluster. Valid values: “PhysicalCluster” and “VirtualCluster”. Default to “PhysicalCluster”.
property connectionTime
connectionTime?: pulumi.Input<number>;The connection timeout for WAF exclusive clusters. Unit: seconds.
property domain
domain: pulumi.Input<string>;The domain that you want to add to WAF.
property http2Ports
http2Ports?: pulumi.Input<pulumi.Input<string>[]>;List of the HTTP 2.0 ports.
property httpPorts
httpPorts?: pulumi.Input<pulumi.Input<string>[]>;List of the HTTP ports
property httpToUserIp
httpToUserIp?: pulumi.Input<string>;Specifies whether to enable the HTTP back-to-origin feature. After this feature is enabled, the WAF instance can use HTTP to forward HTTPS requests to the origin server. By default, port 80 is used to forward the requests to the origin server. Valid values: “On” and “Off”. Default to “Off”.
property httpsPorts
httpsPorts?: pulumi.Input<pulumi.Input<string>[]>;List of the HTTPS ports
property httpsRedirect
httpsRedirect?: pulumi.Input<string>;Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
property instanceId
instanceId: pulumi.Input<string>;The ID of the WAF instance.
property isAccessProduct
isAccessProduct: pulumi.Input<string>;Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: “On” and “Off”. Default to “Off”.
property loadBalancing
loadBalancing?: pulumi.Input<string>;The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
property logHeaders
logHeaders?: pulumi.Input<pulumi.Input<DomainLogHeader>[]>;The key-value pair that is used to mark the traffic that flows through WAF to the domain. Each item contains two field: * key: The key of label * value: The value of label
property readTime
readTime?: pulumi.Input<number>;The read timeout of a WAF exclusive cluster. Unit: seconds.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The ID of the resource group to which the queried domain belongs in Resource Management. By default, no value is specified, indicating that the domain belongs to the default resource group.
property sourceIps
sourceIps: pulumi.Input<pulumi.Input<string>[]>;List of the IP address or domain of the origin server to which the specified domain points.
property writeTime
writeTime?: pulumi.Input<number>;The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
interface DomainState
interface DomainStateInput properties used for looking up and filtering Domain resources.
property clusterType
clusterType?: pulumi.Input<string>;The type of the WAF cluster. Valid values: “PhysicalCluster” and “VirtualCluster”. Default to “PhysicalCluster”.
property cname
cname?: pulumi.Input<string>;The CNAME record assigned by the WAF instance to the specified domain.
property connectionTime
connectionTime?: pulumi.Input<number>;The connection timeout for WAF exclusive clusters. Unit: seconds.
property domain
domain?: pulumi.Input<string>;The domain that you want to add to WAF.
property http2Ports
http2Ports?: pulumi.Input<pulumi.Input<string>[]>;List of the HTTP 2.0 ports.
property httpPorts
httpPorts?: pulumi.Input<pulumi.Input<string>[]>;List of the HTTP ports
property httpToUserIp
httpToUserIp?: pulumi.Input<string>;Specifies whether to enable the HTTP back-to-origin feature. After this feature is enabled, the WAF instance can use HTTP to forward HTTPS requests to the origin server. By default, port 80 is used to forward the requests to the origin server. Valid values: “On” and “Off”. Default to “Off”.
property httpsPorts
httpsPorts?: pulumi.Input<pulumi.Input<string>[]>;List of the HTTPS ports
property httpsRedirect
httpsRedirect?: pulumi.Input<string>;Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
property instanceId
instanceId?: pulumi.Input<string>;The ID of the WAF instance.
property isAccessProduct
isAccessProduct?: pulumi.Input<string>;Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: “On” and “Off”. Default to “Off”.
property loadBalancing
loadBalancing?: pulumi.Input<string>;The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
property logHeaders
logHeaders?: pulumi.Input<pulumi.Input<DomainLogHeader>[]>;The key-value pair that is used to mark the traffic that flows through WAF to the domain. Each item contains two field: * key: The key of label * value: The value of label
property readTime
readTime?: pulumi.Input<number>;The read timeout of a WAF exclusive cluster. Unit: seconds.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The ID of the resource group to which the queried domain belongs in Resource Management. By default, no value is specified, indicating that the domain belongs to the default resource group.
property sourceIps
sourceIps?: pulumi.Input<pulumi.Input<string>[]>;List of the IP address or domain of the origin server to which the specified domain points.
property status
status?: pulumi.Input<number>;property writeTime
writeTime?: pulumi.Input<number>;The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
interface GetDomainsArgs
interface GetDomainsArgsA collection of arguments for invoking getDomains.
property ids
ids?: string[];A list of WAF domain names. Each item is domain name.
property instanceId
instanceId: string;The Id of waf instance to which waf domain belongs.
property outputFile
outputFile?: undefined | string;interface GetDomainsResult
interface GetDomainsResultA collection of values returned by getDomains.
property domains
domains: GetDomainsDomain[];A list of Domains. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];(Optional) A list of WAF domain names. Each item is domain name.
property instanceId
instanceId: string;property outputFile
outputFile?: undefined | string;interface InstanceArgs
interface InstanceArgsThe set of arguments for constructing a Instance resource.
property bigScreen
bigScreen: pulumi.Input<string>;Specify whether big screen is supported. Valid values: [“0”, “1”]. “0” for false and “1” for true.
property exclusiveIpPackage
exclusiveIpPackage: pulumi.Input<string>;Specify the number of exclusive WAF IP addresses.
property extBandwidth
extBandwidth: pulumi.Input<string>;The extra bandwidth. Unit: Mbit/s.
property extDomainPackage
extDomainPackage: pulumi.Input<string>;The number of extra domains.
property logStorage
logStorage: pulumi.Input<string>;Log storage size. Unit: T. Valid values: [3, 5, 10, 20, 50].
property logTime
logTime: pulumi.Input<string>;Log storage period. Unit: day. Valid values: [180, 360].
property modifyType
modifyType?: pulumi.Input<string>;Type of configuration change. Valid value: Upgrade.
property packageCode
packageCode: pulumi.Input<string>;Subscription plan: * China site customers can purchase the following versions of China Mainland region, valid values: [“version3”, “version4”, “version5”]. * China site customers can purchase the following versions of International region, valid values: [“versionProAsia”, “versionBusinessAsia”, “versionEnterpriseAsia”] * International site customers can purchase the following versions of China Mainland region: [“versionProChina”, “versionBusinessChina”, “versionEnterpriseChina”] * International site customers can purchase the following versions of International region: [“versionPro”, “versionBusiness”, “versionEnterprise”].
property period
period?: pulumi.Input<number>;Service time of Web Application Firewall.
property prefessionalService
prefessionalService: pulumi.Input<string>;Specify whether professional service is supported. Valid values: [“true”, “false”]
property renewPeriod
renewPeriod?: pulumi.Input<number>;Renewal period of WAF service. Unit: month
property renewalStatus
renewalStatus?: pulumi.Input<string>;Renewal status of WAF service. Valid values: * AutoRenewal: The service time of WAF is renewed automatically. * ManualRenewal (default): The service time of WAF is renewed manually.Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: “On” and “Off”. Default to “Off”.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The resource group ID.
property subscriptionType
subscriptionType: pulumi.Input<string>;Subscription of WAF service. Valid values: [“Subscription”, “PayAsYouGo”].
property wafLog
wafLog: pulumi.Input<string>;Specify whether Log service is supported. Valid values: [“true”, “false”]
interface InstanceState
interface InstanceStateInput properties used for looking up and filtering Instance resources.
property bigScreen
bigScreen?: pulumi.Input<string>;Specify whether big screen is supported. Valid values: [“0”, “1”]. “0” for false and “1” for true.
property exclusiveIpPackage
exclusiveIpPackage?: pulumi.Input<string>;Specify the number of exclusive WAF IP addresses.
property extBandwidth
extBandwidth?: pulumi.Input<string>;The extra bandwidth. Unit: Mbit/s.
property extDomainPackage
extDomainPackage?: pulumi.Input<string>;The number of extra domains.
property logStorage
logStorage?: pulumi.Input<string>;Log storage size. Unit: T. Valid values: [3, 5, 10, 20, 50].
property logTime
logTime?: pulumi.Input<string>;Log storage period. Unit: day. Valid values: [180, 360].
property modifyType
modifyType?: pulumi.Input<string>;Type of configuration change. Valid value: Upgrade.
property packageCode
packageCode?: pulumi.Input<string>;Subscription plan: * China site customers can purchase the following versions of China Mainland region, valid values: [“version3”, “version4”, “version5”]. * China site customers can purchase the following versions of International region, valid values: [“versionProAsia”, “versionBusinessAsia”, “versionEnterpriseAsia”] * International site customers can purchase the following versions of China Mainland region: [“versionProChina”, “versionBusinessChina”, “versionEnterpriseChina”] * International site customers can purchase the following versions of International region: [“versionPro”, “versionBusiness”, “versionEnterprise”].
property period
period?: pulumi.Input<number>;Service time of Web Application Firewall.
property prefessionalService
prefessionalService?: pulumi.Input<string>;Specify whether professional service is supported. Valid values: [“true”, “false”]
property renewPeriod
renewPeriod?: pulumi.Input<number>;Renewal period of WAF service. Unit: month
property renewalStatus
renewalStatus?: pulumi.Input<string>;Renewal status of WAF service. Valid values: * AutoRenewal: The service time of WAF is renewed automatically. * ManualRenewal (default): The service time of WAF is renewed manually.Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: “On” and “Off”. Default to “Off”.
property resourceGroupId
resourceGroupId?: pulumi.Input<string>;The resource group ID.
property status
status?: pulumi.Input<number>;The status of the instance.
property subscriptionType
subscriptionType?: pulumi.Input<string>;Subscription of WAF service. Valid values: [“Subscription”, “PayAsYouGo”].
property wafLog
wafLog?: pulumi.Input<string>;Specify whether Log service is supported. Valid values: [“true”, “false”]