incapsula.TxtRecord
Explore with Pulumi AI
Provides a TXT Record(s) association resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const example_site = new incapsula.Site("example-site", {domain: "www.example.com"});
const test = new incapsula.TxtRecord("test", {
siteId: example_site.siteId,
txtRecordValueOne: "test1",
txtRecordValueTwo: "test2",
});
import pulumi
import pulumi_incapsula as incapsula
example_site = incapsula.Site("example-site", domain="www.example.com")
test = incapsula.TxtRecord("test",
site_id=example_site.site_id,
txt_record_value_one="test1",
txt_record_value_two="test2")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example_site, err := incapsula.NewSite(ctx, "example-site", &incapsula.SiteArgs{
Domain: pulumi.String("www.example.com"),
})
if err != nil {
return err
}
_, err = incapsula.NewTxtRecord(ctx, "test", &incapsula.TxtRecordArgs{
SiteId: example_site.SiteId,
TxtRecordValueOne: pulumi.String("test1"),
TxtRecordValueTwo: pulumi.String("test2"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var example_site = new Incapsula.Site("example-site", new()
{
Domain = "www.example.com",
});
var test = new Incapsula.TxtRecord("test", new()
{
SiteId = example_site.SiteId,
TxtRecordValueOne = "test1",
TxtRecordValueTwo = "test2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.Site;
import com.pulumi.incapsula.SiteArgs;
import com.pulumi.incapsula.TxtRecord;
import com.pulumi.incapsula.TxtRecordArgs;
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_site = new Site("example-site", SiteArgs.builder()
.domain("www.example.com")
.build());
var test = new TxtRecord("test", TxtRecordArgs.builder()
.siteId(example_site.siteId())
.txtRecordValueOne("test1")
.txtRecordValueTwo("test2")
.build());
}
}
resources:
example-site:
type: incapsula:Site
properties:
domain: www.example.com
test:
type: incapsula:TxtRecord
properties:
siteId: ${["example-site"].siteId}
txtRecordValueOne: test1
txtRecordValueTwo: test2
Create TxtRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TxtRecord(name: string, args: TxtRecordArgs, opts?: CustomResourceOptions);
@overload
def TxtRecord(resource_name: str,
args: TxtRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TxtRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
site_id: Optional[float] = None,
txt_record_id: Optional[str] = None,
txt_record_value_five: Optional[str] = None,
txt_record_value_four: Optional[str] = None,
txt_record_value_one: Optional[str] = None,
txt_record_value_three: Optional[str] = None,
txt_record_value_two: Optional[str] = None)
func NewTxtRecord(ctx *Context, name string, args TxtRecordArgs, opts ...ResourceOption) (*TxtRecord, error)
public TxtRecord(string name, TxtRecordArgs args, CustomResourceOptions? opts = null)
public TxtRecord(String name, TxtRecordArgs args)
public TxtRecord(String name, TxtRecordArgs args, CustomResourceOptions options)
type: incapsula:TxtRecord
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 TxtRecordArgs
- 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 TxtRecordArgs
- 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 TxtRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TxtRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TxtRecordArgs
- 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 txtRecordResource = new Incapsula.TxtRecord("txtRecordResource", new()
{
SiteId = 0,
TxtRecordId = "string",
TxtRecordValueFive = "string",
TxtRecordValueFour = "string",
TxtRecordValueOne = "string",
TxtRecordValueThree = "string",
TxtRecordValueTwo = "string",
});
example, err := incapsula.NewTxtRecord(ctx, "txtRecordResource", &incapsula.TxtRecordArgs{
SiteId: pulumi.Float64(0),
TxtRecordId: pulumi.String("string"),
TxtRecordValueFive: pulumi.String("string"),
TxtRecordValueFour: pulumi.String("string"),
TxtRecordValueOne: pulumi.String("string"),
TxtRecordValueThree: pulumi.String("string"),
TxtRecordValueTwo: pulumi.String("string"),
})
var txtRecordResource = new TxtRecord("txtRecordResource", TxtRecordArgs.builder()
.siteId(0)
.txtRecordId("string")
.txtRecordValueFive("string")
.txtRecordValueFour("string")
.txtRecordValueOne("string")
.txtRecordValueThree("string")
.txtRecordValueTwo("string")
.build());
txt_record_resource = incapsula.TxtRecord("txtRecordResource",
site_id=0,
txt_record_id="string",
txt_record_value_five="string",
txt_record_value_four="string",
txt_record_value_one="string",
txt_record_value_three="string",
txt_record_value_two="string")
const txtRecordResource = new incapsula.TxtRecord("txtRecordResource", {
siteId: 0,
txtRecordId: "string",
txtRecordValueFive: "string",
txtRecordValueFour: "string",
txtRecordValueOne: "string",
txtRecordValueThree: "string",
txtRecordValueTwo: "string",
});
type: incapsula:TxtRecord
properties:
siteId: 0
txtRecordId: string
txtRecordValueFive: string
txtRecordValueFour: string
txtRecordValueOne: string
txtRecordValueThree: string
txtRecordValueTwo: string
TxtRecord 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 TxtRecord resource accepts the following input properties:
- Site
Id double - Numeric identifier of the site.
- Txt
Record stringId - Unique identifier for the TXT Records association.
- Txt
Record stringValue Five - New value for txt record number five.
- Txt
Record stringValue Four - New value for txt record number four.
- Txt
Record stringValue One - New value for txt record number one.
- Txt
Record stringValue Three - New value for txt record number three.
- Txt
Record stringValue Two - New value for txt record number two.
- Site
Id float64 - Numeric identifier of the site.
- Txt
Record stringId - Unique identifier for the TXT Records association.
- Txt
Record stringValue Five - New value for txt record number five.
- Txt
Record stringValue Four - New value for txt record number four.
- Txt
Record stringValue One - New value for txt record number one.
- Txt
Record stringValue Three - New value for txt record number three.
- Txt
Record stringValue Two - New value for txt record number two.
- site
Id Double - Numeric identifier of the site.
- txt
Record StringId - Unique identifier for the TXT Records association.
- txt
Record StringValue Five - New value for txt record number five.
- txt
Record StringValue Four - New value for txt record number four.
- txt
Record StringValue One - New value for txt record number one.
- txt
Record StringValue Three - New value for txt record number three.
- txt
Record StringValue Two - New value for txt record number two.
- site
Id number - Numeric identifier of the site.
- txt
Record stringId - Unique identifier for the TXT Records association.
- txt
Record stringValue Five - New value for txt record number five.
- txt
Record stringValue Four - New value for txt record number four.
- txt
Record stringValue One - New value for txt record number one.
- txt
Record stringValue Three - New value for txt record number three.
- txt
Record stringValue Two - New value for txt record number two.
- site_
id float - Numeric identifier of the site.
- txt_
record_ strid - Unique identifier for the TXT Records association.
- txt_
record_ strvalue_ five - New value for txt record number five.
- txt_
record_ strvalue_ four - New value for txt record number four.
- txt_
record_ strvalue_ one - New value for txt record number one.
- txt_
record_ strvalue_ three - New value for txt record number three.
- txt_
record_ strvalue_ two - New value for txt record number two.
- site
Id Number - Numeric identifier of the site.
- txt
Record StringId - Unique identifier for the TXT Records association.
- txt
Record StringValue Five - New value for txt record number five.
- txt
Record StringValue Four - New value for txt record number four.
- txt
Record StringValue One - New value for txt record number one.
- txt
Record StringValue Three - New value for txt record number three.
- txt
Record StringValue Two - New value for txt record number two.
Outputs
All input properties are implicitly available as output properties. Additionally, the TxtRecord resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TxtRecord Resource
Get an existing TxtRecord 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?: TxtRecordState, opts?: CustomResourceOptions): TxtRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
site_id: Optional[float] = None,
txt_record_id: Optional[str] = None,
txt_record_value_five: Optional[str] = None,
txt_record_value_four: Optional[str] = None,
txt_record_value_one: Optional[str] = None,
txt_record_value_three: Optional[str] = None,
txt_record_value_two: Optional[str] = None) -> TxtRecord
func GetTxtRecord(ctx *Context, name string, id IDInput, state *TxtRecordState, opts ...ResourceOption) (*TxtRecord, error)
public static TxtRecord Get(string name, Input<string> id, TxtRecordState? state, CustomResourceOptions? opts = null)
public static TxtRecord get(String name, Output<String> id, TxtRecordState state, CustomResourceOptions options)
resources: _: type: incapsula:TxtRecord 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.
- Site
Id double - Numeric identifier of the site.
- Txt
Record stringId - Unique identifier for the TXT Records association.
- Txt
Record stringValue Five - New value for txt record number five.
- Txt
Record stringValue Four - New value for txt record number four.
- Txt
Record stringValue One - New value for txt record number one.
- Txt
Record stringValue Three - New value for txt record number three.
- Txt
Record stringValue Two - New value for txt record number two.
- Site
Id float64 - Numeric identifier of the site.
- Txt
Record stringId - Unique identifier for the TXT Records association.
- Txt
Record stringValue Five - New value for txt record number five.
- Txt
Record stringValue Four - New value for txt record number four.
- Txt
Record stringValue One - New value for txt record number one.
- Txt
Record stringValue Three - New value for txt record number three.
- Txt
Record stringValue Two - New value for txt record number two.
- site
Id Double - Numeric identifier of the site.
- txt
Record StringId - Unique identifier for the TXT Records association.
- txt
Record StringValue Five - New value for txt record number five.
- txt
Record StringValue Four - New value for txt record number four.
- txt
Record StringValue One - New value for txt record number one.
- txt
Record StringValue Three - New value for txt record number three.
- txt
Record StringValue Two - New value for txt record number two.
- site
Id number - Numeric identifier of the site.
- txt
Record stringId - Unique identifier for the TXT Records association.
- txt
Record stringValue Five - New value for txt record number five.
- txt
Record stringValue Four - New value for txt record number four.
- txt
Record stringValue One - New value for txt record number one.
- txt
Record stringValue Three - New value for txt record number three.
- txt
Record stringValue Two - New value for txt record number two.
- site_
id float - Numeric identifier of the site.
- txt_
record_ strid - Unique identifier for the TXT Records association.
- txt_
record_ strvalue_ five - New value for txt record number five.
- txt_
record_ strvalue_ four - New value for txt record number four.
- txt_
record_ strvalue_ one - New value for txt record number one.
- txt_
record_ strvalue_ three - New value for txt record number three.
- txt_
record_ strvalue_ two - New value for txt record number two.
- site
Id Number - Numeric identifier of the site.
- txt
Record StringId - Unique identifier for the TXT Records association.
- txt
Record StringValue Five - New value for txt record number five.
- txt
Record StringValue Four - New value for txt record number four.
- txt
Record StringValue One - New value for txt record number one.
- txt
Record StringValue Three - New value for txt record number three.
- txt
Record StringValue Two - New value for txt record number two.
Import
TXT Records can be imported using the site_id
, e.g.:
$ pulumi import incapsula:index/txtRecord:TxtRecord demo 1234
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- incapsula imperva/terraform-provider-incapsula
- License
- Notes
- This Pulumi package is based on the
incapsula
Terraform Provider.