opentelekomcloud.CfwEipProtectionV1
Explore with Pulumi AI
Up-to-date reference of API arguments for CFW EIP protection you can get at documentation portal
Enable or Disable EIP protection using CFW firewall within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const firewallId = config.requireObject("firewallId");
const objectId = config.requireObject("objectId");
const eipId = config.requireObject("eipId");
const ipAddress = config.requireObject("ipAddress");
const protect1 = new opentelekomcloud.CfwEipProtectionV1("protect1", {
firewallId: firewallId,
objectId: objectId,
status: 0,
eipId: eipId,
publicIp: ipAddress,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
firewall_id = config.require_object("firewallId")
object_id = config.require_object("objectId")
eip_id = config.require_object("eipId")
ip_address = config.require_object("ipAddress")
protect1 = opentelekomcloud.CfwEipProtectionV1("protect1",
firewall_id=firewall_id,
object_id=object_id,
status=0,
eip_id=eip_id,
public_ip=ip_address)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
firewallId := cfg.RequireObject("firewallId")
objectId := cfg.RequireObject("objectId")
eipId := cfg.RequireObject("eipId")
ipAddress := cfg.RequireObject("ipAddress")
_, err := opentelekomcloud.NewCfwEipProtectionV1(ctx, "protect1", &opentelekomcloud.CfwEipProtectionV1Args{
FirewallId: pulumi.Any(firewallId),
ObjectId: pulumi.Any(objectId),
Status: pulumi.Float64(0),
EipId: pulumi.Any(eipId),
PublicIp: pulumi.Any(ipAddress),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var firewallId = config.RequireObject<dynamic>("firewallId");
var objectId = config.RequireObject<dynamic>("objectId");
var eipId = config.RequireObject<dynamic>("eipId");
var ipAddress = config.RequireObject<dynamic>("ipAddress");
var protect1 = new Opentelekomcloud.CfwEipProtectionV1("protect1", new()
{
FirewallId = firewallId,
ObjectId = objectId,
Status = 0,
EipId = eipId,
PublicIp = ipAddress,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.CfwEipProtectionV1;
import com.pulumi.opentelekomcloud.CfwEipProtectionV1Args;
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) {
final var config = ctx.config();
final var firewallId = config.get("firewallId");
final var objectId = config.get("objectId");
final var eipId = config.get("eipId");
final var ipAddress = config.get("ipAddress");
var protect1 = new CfwEipProtectionV1("protect1", CfwEipProtectionV1Args.builder()
.firewallId(firewallId)
.objectId(objectId)
.status(0)
.eipId(eipId)
.publicIp(ipAddress)
.build());
}
}
configuration:
firewallId:
type: dynamic
objectId:
type: dynamic
eipId:
type: dynamic
ipAddress:
type: dynamic
resources:
protect1:
type: opentelekomcloud:CfwEipProtectionV1
properties:
firewallId: ${firewallId}
objectId: ${objectId}
status: 0
eipId: ${eipId}
publicIp: ${ipAddress}
Create CfwEipProtectionV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CfwEipProtectionV1(name: string, args: CfwEipProtectionV1Args, opts?: CustomResourceOptions);
@overload
def CfwEipProtectionV1(resource_name: str,
args: CfwEipProtectionV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def CfwEipProtectionV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
eip_id: Optional[str] = None,
firewall_id: Optional[str] = None,
object_id: Optional[str] = None,
status: Optional[float] = None,
cfw_eip_protection_v1_id: Optional[str] = None,
public_ip: Optional[str] = None,
public_ipv6: Optional[str] = None,
timeouts: Optional[CfwEipProtectionV1TimeoutsArgs] = None)
func NewCfwEipProtectionV1(ctx *Context, name string, args CfwEipProtectionV1Args, opts ...ResourceOption) (*CfwEipProtectionV1, error)
public CfwEipProtectionV1(string name, CfwEipProtectionV1Args args, CustomResourceOptions? opts = null)
public CfwEipProtectionV1(String name, CfwEipProtectionV1Args args)
public CfwEipProtectionV1(String name, CfwEipProtectionV1Args args, CustomResourceOptions options)
type: opentelekomcloud:CfwEipProtectionV1
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 CfwEipProtectionV1Args
- 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 CfwEipProtectionV1Args
- 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 CfwEipProtectionV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CfwEipProtectionV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CfwEipProtectionV1Args
- 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 cfwEipProtectionV1Resource = new Opentelekomcloud.CfwEipProtectionV1("cfwEipProtectionV1Resource", new()
{
EipId = "string",
FirewallId = "string",
ObjectId = "string",
Status = 0,
CfwEipProtectionV1Id = "string",
PublicIp = "string",
PublicIpv6 = "string",
Timeouts = new Opentelekomcloud.Inputs.CfwEipProtectionV1TimeoutsArgs
{
Create = "string",
},
});
example, err := opentelekomcloud.NewCfwEipProtectionV1(ctx, "cfwEipProtectionV1Resource", &opentelekomcloud.CfwEipProtectionV1Args{
EipId: pulumi.String("string"),
FirewallId: pulumi.String("string"),
ObjectId: pulumi.String("string"),
Status: pulumi.Float64(0),
CfwEipProtectionV1Id: pulumi.String("string"),
PublicIp: pulumi.String("string"),
PublicIpv6: pulumi.String("string"),
Timeouts: &opentelekomcloud.CfwEipProtectionV1TimeoutsArgs{
Create: pulumi.String("string"),
},
})
var cfwEipProtectionV1Resource = new CfwEipProtectionV1("cfwEipProtectionV1Resource", CfwEipProtectionV1Args.builder()
.eipId("string")
.firewallId("string")
.objectId("string")
.status(0.0)
.cfwEipProtectionV1Id("string")
.publicIp("string")
.publicIpv6("string")
.timeouts(CfwEipProtectionV1TimeoutsArgs.builder()
.create("string")
.build())
.build());
cfw_eip_protection_v1_resource = opentelekomcloud.CfwEipProtectionV1("cfwEipProtectionV1Resource",
eip_id="string",
firewall_id="string",
object_id="string",
status=0,
cfw_eip_protection_v1_id="string",
public_ip="string",
public_ipv6="string",
timeouts={
"create": "string",
})
const cfwEipProtectionV1Resource = new opentelekomcloud.CfwEipProtectionV1("cfwEipProtectionV1Resource", {
eipId: "string",
firewallId: "string",
objectId: "string",
status: 0,
cfwEipProtectionV1Id: "string",
publicIp: "string",
publicIpv6: "string",
timeouts: {
create: "string",
},
});
type: opentelekomcloud:CfwEipProtectionV1
properties:
cfwEipProtectionV1Id: string
eipId: string
firewallId: string
objectId: string
publicIp: string
publicIpv6: string
status: 0
timeouts:
create: string
CfwEipProtectionV1 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 CfwEipProtectionV1 resource accepts the following input properties:
- Eip
Id string - Specifies the EIP ID.
- Firewall
Id string - Specifies the Firewall ID.
- Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Status double
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - Cfw
Eip stringProtection V1Id - Public
Ip string - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - Public
Ipv6 string - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - Timeouts
Cfw
Eip Protection V1Timeouts
- Eip
Id string - Specifies the EIP ID.
- Firewall
Id string - Specifies the Firewall ID.
- Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Status float64
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - Cfw
Eip stringProtection V1Id - Public
Ip string - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - Public
Ipv6 string - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - Timeouts
Cfw
Eip Protection V1Timeouts Args
- eip
Id String - Specifies the EIP ID.
- firewall
Id String - Specifies the Firewall ID.
- object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- status Double
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - cfw
Eip StringProtection V1Id - public
Ip String - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public
Ipv6 String - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - timeouts
Cfw
Eip Protection V1Timeouts
- eip
Id string - Specifies the EIP ID.
- firewall
Id string - Specifies the Firewall ID.
- object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- status number
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - cfw
Eip stringProtection V1Id - public
Ip string - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public
Ipv6 string - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - timeouts
Cfw
Eip Protection V1Timeouts
- eip_
id str - Specifies the EIP ID.
- firewall_
id str - Specifies the Firewall ID.
- object_
id str - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- status float
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - cfw_
eip_ strprotection_ v1_ id - public_
ip str - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public_
ipv6 str - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - timeouts
Cfw
Eip Protection V1Timeouts Args
- eip
Id String - Specifies the EIP ID.
- firewall
Id String - Specifies the Firewall ID.
- object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- status Number
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - cfw
Eip StringProtection V1Id - public
Ip String - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public
Ipv6 String - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the CfwEipProtectionV1 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 CfwEipProtectionV1 Resource
Get an existing CfwEipProtectionV1 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?: CfwEipProtectionV1State, opts?: CustomResourceOptions): CfwEipProtectionV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cfw_eip_protection_v1_id: Optional[str] = None,
eip_id: Optional[str] = None,
firewall_id: Optional[str] = None,
object_id: Optional[str] = None,
public_ip: Optional[str] = None,
public_ipv6: Optional[str] = None,
status: Optional[float] = None,
timeouts: Optional[CfwEipProtectionV1TimeoutsArgs] = None) -> CfwEipProtectionV1
func GetCfwEipProtectionV1(ctx *Context, name string, id IDInput, state *CfwEipProtectionV1State, opts ...ResourceOption) (*CfwEipProtectionV1, error)
public static CfwEipProtectionV1 Get(string name, Input<string> id, CfwEipProtectionV1State? state, CustomResourceOptions? opts = null)
public static CfwEipProtectionV1 get(String name, Output<String> id, CfwEipProtectionV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:CfwEipProtectionV1 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.
- Cfw
Eip stringProtection V1Id - Eip
Id string - Specifies the EIP ID.
- Firewall
Id string - Specifies the Firewall ID.
- Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Public
Ip string - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - Public
Ipv6 string - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - Status double
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - Timeouts
Cfw
Eip Protection V1Timeouts
- Cfw
Eip stringProtection V1Id - Eip
Id string - Specifies the EIP ID.
- Firewall
Id string - Specifies the Firewall ID.
- Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Public
Ip string - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - Public
Ipv6 string - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - Status float64
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - Timeouts
Cfw
Eip Protection V1Timeouts Args
- cfw
Eip StringProtection V1Id - eip
Id String - Specifies the EIP ID.
- firewall
Id String - Specifies the Firewall ID.
- object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- public
Ip String - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public
Ipv6 String - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - status Double
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - timeouts
Cfw
Eip Protection V1Timeouts
- cfw
Eip stringProtection V1Id - eip
Id string - Specifies the EIP ID.
- firewall
Id string - Specifies the Firewall ID.
- object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- public
Ip string - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public
Ipv6 string - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - status number
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - timeouts
Cfw
Eip Protection V1Timeouts
- cfw_
eip_ strprotection_ v1_ id - eip_
id str - Specifies the EIP ID.
- firewall_
id str - Specifies the Firewall ID.
- object_
id str - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- public_
ip str - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public_
ipv6 str - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - status float
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - timeouts
Cfw
Eip Protection V1Timeouts Args
- cfw
Eip StringProtection V1Id - eip
Id String - Specifies the EIP ID.
- firewall
Id String - Specifies the Firewall ID.
- object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- public
Ip String - Specifies the EIP IPV4 address. Required if
public_ipv6
is not set. - public
Ipv6 String - Specifies the EIP IPV6 address. Required if
public_ip
is not set. - status Number
- Specifies the desired EIP protection status:
0
(protected),1
(unprotected). - timeouts Property Map
Supporting Types
CfwEipProtectionV1Timeouts, CfwEipProtectionV1TimeoutsArgs
- Create string
- Create string
- create String
- create string
- create str
- create String
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.