1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. WafCcSession
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.WafCcSession

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a waf cc_session

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.WafCcSession("example", {
        category: "match",
        domain: "www.demo.com",
        edition: "sparta-waf",
        endMat: "&",
        endOffset: "-1",
        keyOrStartMat: "key_a=123",
        sessionName: "terraformDemo",
        source: "get",
        startOffset: "-1",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.WafCcSession("example",
        category="match",
        domain="www.demo.com",
        edition="sparta-waf",
        end_mat="&",
        end_offset="-1",
        key_or_start_mat="key_a=123",
        session_name="terraformDemo",
        source="get",
        start_offset="-1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewWafCcSession(ctx, "example", &tencentcloud.WafCcSessionArgs{
    			Category:      pulumi.String("match"),
    			Domain:        pulumi.String("www.demo.com"),
    			Edition:       pulumi.String("sparta-waf"),
    			EndMat:        pulumi.String("&"),
    			EndOffset:     pulumi.String("-1"),
    			KeyOrStartMat: pulumi.String("key_a=123"),
    			SessionName:   pulumi.String("terraformDemo"),
    			Source:        pulumi.String("get"),
    			StartOffset:   pulumi.String("-1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.WafCcSession("example", new()
        {
            Category = "match",
            Domain = "www.demo.com",
            Edition = "sparta-waf",
            EndMat = "&",
            EndOffset = "-1",
            KeyOrStartMat = "key_a=123",
            SessionName = "terraformDemo",
            Source = "get",
            StartOffset = "-1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.WafCcSession;
    import com.pulumi.tencentcloud.WafCcSessionArgs;
    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 example = new WafCcSession("example", WafCcSessionArgs.builder()
                .category("match")
                .domain("www.demo.com")
                .edition("sparta-waf")
                .endMat("&")
                .endOffset("-1")
                .keyOrStartMat("key_a=123")
                .sessionName("terraformDemo")
                .source("get")
                .startOffset("-1")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:WafCcSession
        properties:
          category: match
          domain: www.demo.com
          edition: sparta-waf
          endMat: '&'
          endOffset: '-1'
          keyOrStartMat: key_a=123
          sessionName: terraformDemo
          source: get
          startOffset: '-1'
    

    Create WafCcSession Resource

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

    Constructor syntax

    new WafCcSession(name: string, args: WafCcSessionArgs, opts?: CustomResourceOptions);
    @overload
    def WafCcSession(resource_name: str,
                     args: WafCcSessionArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafCcSession(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     category: Optional[str] = None,
                     domain: Optional[str] = None,
                     edition: Optional[str] = None,
                     end_mat: Optional[str] = None,
                     end_offset: Optional[str] = None,
                     key_or_start_mat: Optional[str] = None,
                     session_name: Optional[str] = None,
                     source: Optional[str] = None,
                     start_offset: Optional[str] = None,
                     waf_cc_session_id: Optional[str] = None)
    func NewWafCcSession(ctx *Context, name string, args WafCcSessionArgs, opts ...ResourceOption) (*WafCcSession, error)
    public WafCcSession(string name, WafCcSessionArgs args, CustomResourceOptions? opts = null)
    public WafCcSession(String name, WafCcSessionArgs args)
    public WafCcSession(String name, WafCcSessionArgs args, CustomResourceOptions options)
    
    type: tencentcloud:WafCcSession
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WafCcSessionArgs
    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 WafCcSessionArgs
    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 WafCcSessionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafCcSessionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafCcSessionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    WafCcSession 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 WafCcSession resource accepts the following input properties:

    Category string
    Session match pattern, Optional patterns are match, location.
    Domain string
    Domain.
    Edition string
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    EndMat string
    Session end identifier, when Category is match.
    EndOffset string
    End offset position, when Category is location.
    KeyOrStartMat string
    Session identifier.
    SessionName string
    Session Name.
    Source string
    Session matching position, Optional locations are get, post, header, cookie.
    StartOffset string
    Starting offset position, when Category is location.
    WafCcSessionId string
    ID of the resource.
    Category string
    Session match pattern, Optional patterns are match, location.
    Domain string
    Domain.
    Edition string
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    EndMat string
    Session end identifier, when Category is match.
    EndOffset string
    End offset position, when Category is location.
    KeyOrStartMat string
    Session identifier.
    SessionName string
    Session Name.
    Source string
    Session matching position, Optional locations are get, post, header, cookie.
    StartOffset string
    Starting offset position, when Category is location.
    WafCcSessionId string
    ID of the resource.
    category String
    Session match pattern, Optional patterns are match, location.
    domain String
    Domain.
    edition String
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    endMat String
    Session end identifier, when Category is match.
    endOffset String
    End offset position, when Category is location.
    keyOrStartMat String
    Session identifier.
    sessionName String
    Session Name.
    source String
    Session matching position, Optional locations are get, post, header, cookie.
    startOffset String
    Starting offset position, when Category is location.
    wafCcSessionId String
    ID of the resource.
    category string
    Session match pattern, Optional patterns are match, location.
    domain string
    Domain.
    edition string
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    endMat string
    Session end identifier, when Category is match.
    endOffset string
    End offset position, when Category is location.
    keyOrStartMat string
    Session identifier.
    sessionName string
    Session Name.
    source string
    Session matching position, Optional locations are get, post, header, cookie.
    startOffset string
    Starting offset position, when Category is location.
    wafCcSessionId string
    ID of the resource.
    category str
    Session match pattern, Optional patterns are match, location.
    domain str
    Domain.
    edition str
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    end_mat str
    Session end identifier, when Category is match.
    end_offset str
    End offset position, when Category is location.
    key_or_start_mat str
    Session identifier.
    session_name str
    Session Name.
    source str
    Session matching position, Optional locations are get, post, header, cookie.
    start_offset str
    Starting offset position, when Category is location.
    waf_cc_session_id str
    ID of the resource.
    category String
    Session match pattern, Optional patterns are match, location.
    domain String
    Domain.
    edition String
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    endMat String
    Session end identifier, when Category is match.
    endOffset String
    End offset position, when Category is location.
    keyOrStartMat String
    Session identifier.
    sessionName String
    Session Name.
    source String
    Session matching position, Optional locations are get, post, header, cookie.
    startOffset String
    Starting offset position, when Category is location.
    wafCcSessionId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WafCcSession resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    SessionId double
    Session ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    SessionId float64
    Session ID.
    id String
    The provider-assigned unique ID for this managed resource.
    sessionId Double
    Session ID.
    id string
    The provider-assigned unique ID for this managed resource.
    sessionId number
    Session ID.
    id str
    The provider-assigned unique ID for this managed resource.
    session_id float
    Session ID.
    id String
    The provider-assigned unique ID for this managed resource.
    sessionId Number
    Session ID.

    Look up Existing WafCcSession Resource

    Get an existing WafCcSession 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?: WafCcSessionState, opts?: CustomResourceOptions): WafCcSession
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            domain: Optional[str] = None,
            edition: Optional[str] = None,
            end_mat: Optional[str] = None,
            end_offset: Optional[str] = None,
            key_or_start_mat: Optional[str] = None,
            session_id: Optional[float] = None,
            session_name: Optional[str] = None,
            source: Optional[str] = None,
            start_offset: Optional[str] = None,
            waf_cc_session_id: Optional[str] = None) -> WafCcSession
    func GetWafCcSession(ctx *Context, name string, id IDInput, state *WafCcSessionState, opts ...ResourceOption) (*WafCcSession, error)
    public static WafCcSession Get(string name, Input<string> id, WafCcSessionState? state, CustomResourceOptions? opts = null)
    public static WafCcSession get(String name, Output<String> id, WafCcSessionState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:WafCcSession    get:      id: ${id}
    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.
    The following state arguments are supported:
    Category string
    Session match pattern, Optional patterns are match, location.
    Domain string
    Domain.
    Edition string
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    EndMat string
    Session end identifier, when Category is match.
    EndOffset string
    End offset position, when Category is location.
    KeyOrStartMat string
    Session identifier.
    SessionId double
    Session ID.
    SessionName string
    Session Name.
    Source string
    Session matching position, Optional locations are get, post, header, cookie.
    StartOffset string
    Starting offset position, when Category is location.
    WafCcSessionId string
    ID of the resource.
    Category string
    Session match pattern, Optional patterns are match, location.
    Domain string
    Domain.
    Edition string
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    EndMat string
    Session end identifier, when Category is match.
    EndOffset string
    End offset position, when Category is location.
    KeyOrStartMat string
    Session identifier.
    SessionId float64
    Session ID.
    SessionName string
    Session Name.
    Source string
    Session matching position, Optional locations are get, post, header, cookie.
    StartOffset string
    Starting offset position, when Category is location.
    WafCcSessionId string
    ID of the resource.
    category String
    Session match pattern, Optional patterns are match, location.
    domain String
    Domain.
    edition String
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    endMat String
    Session end identifier, when Category is match.
    endOffset String
    End offset position, when Category is location.
    keyOrStartMat String
    Session identifier.
    sessionId Double
    Session ID.
    sessionName String
    Session Name.
    source String
    Session matching position, Optional locations are get, post, header, cookie.
    startOffset String
    Starting offset position, when Category is location.
    wafCcSessionId String
    ID of the resource.
    category string
    Session match pattern, Optional patterns are match, location.
    domain string
    Domain.
    edition string
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    endMat string
    Session end identifier, when Category is match.
    endOffset string
    End offset position, when Category is location.
    keyOrStartMat string
    Session identifier.
    sessionId number
    Session ID.
    sessionName string
    Session Name.
    source string
    Session matching position, Optional locations are get, post, header, cookie.
    startOffset string
    Starting offset position, when Category is location.
    wafCcSessionId string
    ID of the resource.
    category str
    Session match pattern, Optional patterns are match, location.
    domain str
    Domain.
    edition str
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    end_mat str
    Session end identifier, when Category is match.
    end_offset str
    End offset position, when Category is location.
    key_or_start_mat str
    Session identifier.
    session_id float
    Session ID.
    session_name str
    Session Name.
    source str
    Session matching position, Optional locations are get, post, header, cookie.
    start_offset str
    Starting offset position, when Category is location.
    waf_cc_session_id str
    ID of the resource.
    category String
    Session match pattern, Optional patterns are match, location.
    domain String
    Domain.
    edition String
    Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
    endMat String
    Session end identifier, when Category is match.
    endOffset String
    End offset position, when Category is location.
    keyOrStartMat String
    Session identifier.
    sessionId Number
    Session ID.
    sessionName String
    Session Name.
    source String
    Session matching position, Optional locations are get, post, header, cookie.
    startOffset String
    Starting offset position, when Category is location.
    wafCcSessionId String
    ID of the resource.

    Import

    waf cc_session can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/wafCcSession:WafCcSession example www.demo.com#sparta-waf#2000000253
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack