checkpoint.ManagementNatRule
Explore with Pulumi AI
This resource allows you to add/update/delete Check Point NAT Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as checkpoint from "@pulumi/checkpoint";
const rule1 = new checkpoint.ManagementNatRule("rule1", {
"package": "Standard",
position: {
top: "top",
},
});
const rule2 = new checkpoint.ManagementNatRule("rule2", {
"package": "Standard",
position: {
below: checkpoint_management_access_rule.rule1.name,
},
});
const rule3 = new checkpoint.ManagementNatRule("rule3", {
"package": "Standard",
position: {
below: checkpoint_management_access_rule.rule2.name,
},
});
import pulumi
import pulumi_checkpoint as checkpoint
rule1 = checkpoint.ManagementNatRule("rule1",
package="Standard",
position={
"top": "top",
})
rule2 = checkpoint.ManagementNatRule("rule2",
package="Standard",
position={
"below": checkpoint_management_access_rule["rule1"]["name"],
})
rule3 = checkpoint.ManagementNatRule("rule3",
package="Standard",
position={
"below": checkpoint_management_access_rule["rule2"]["name"],
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/checkpoint/v2/checkpoint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := checkpoint.NewManagementNatRule(ctx, "rule1", &checkpoint.ManagementNatRuleArgs{
Package: pulumi.String("Standard"),
Position: pulumi.StringMap{
"top": pulumi.String("top"),
},
})
if err != nil {
return err
}
_, err = checkpoint.NewManagementNatRule(ctx, "rule2", &checkpoint.ManagementNatRuleArgs{
Package: pulumi.String("Standard"),
Position: pulumi.StringMap{
"below": pulumi.Any(checkpoint_management_access_rule.Rule1.Name),
},
})
if err != nil {
return err
}
_, err = checkpoint.NewManagementNatRule(ctx, "rule3", &checkpoint.ManagementNatRuleArgs{
Package: pulumi.String("Standard"),
Position: pulumi.StringMap{
"below": pulumi.Any(checkpoint_management_access_rule.Rule2.Name),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Checkpoint = Pulumi.Checkpoint;
return await Deployment.RunAsync(() =>
{
var rule1 = new Checkpoint.ManagementNatRule("rule1", new()
{
Package = "Standard",
Position =
{
{ "top", "top" },
},
});
var rule2 = new Checkpoint.ManagementNatRule("rule2", new()
{
Package = "Standard",
Position =
{
{ "below", checkpoint_management_access_rule.Rule1.Name },
},
});
var rule3 = new Checkpoint.ManagementNatRule("rule3", new()
{
Package = "Standard",
Position =
{
{ "below", checkpoint_management_access_rule.Rule2.Name },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.checkpoint.ManagementNatRule;
import com.pulumi.checkpoint.ManagementNatRuleArgs;
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 rule1 = new ManagementNatRule("rule1", ManagementNatRuleArgs.builder()
.package_("Standard")
.position(Map.of("top", "top"))
.build());
var rule2 = new ManagementNatRule("rule2", ManagementNatRuleArgs.builder()
.package_("Standard")
.position(Map.of("below", checkpoint_management_access_rule.rule1().name()))
.build());
var rule3 = new ManagementNatRule("rule3", ManagementNatRuleArgs.builder()
.package_("Standard")
.position(Map.of("below", checkpoint_management_access_rule.rule2().name()))
.build());
}
}
resources:
rule1:
type: checkpoint:ManagementNatRule
properties:
package: Standard
position:
top: top
rule2:
type: checkpoint:ManagementNatRule
properties:
package: Standard
position:
below: ${checkpoint_management_access_rule.rule1.name}
rule3:
type: checkpoint:ManagementNatRule
properties:
package: Standard
position:
below: ${checkpoint_management_access_rule.rule2.name}
Create ManagementNatRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagementNatRule(name: string, args: ManagementNatRuleArgs, opts?: CustomResourceOptions);
@overload
def ManagementNatRule(resource_name: str,
args: ManagementNatRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagementNatRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
package: Optional[str] = None,
position: Optional[Mapping[str, str]] = None,
install_ons: Optional[Sequence[str]] = None,
original_service: Optional[str] = None,
comments: Optional[str] = None,
management_nat_rule_id: Optional[str] = None,
method: Optional[str] = None,
name: Optional[str] = None,
original_destination: Optional[str] = None,
ignore_warnings: Optional[bool] = None,
original_source: Optional[str] = None,
ignore_errors: Optional[bool] = None,
enabled: Optional[bool] = None,
translated_destination: Optional[str] = None,
translated_service: Optional[str] = None,
translated_source: Optional[str] = None)
func NewManagementNatRule(ctx *Context, name string, args ManagementNatRuleArgs, opts ...ResourceOption) (*ManagementNatRule, error)
public ManagementNatRule(string name, ManagementNatRuleArgs args, CustomResourceOptions? opts = null)
public ManagementNatRule(String name, ManagementNatRuleArgs args)
public ManagementNatRule(String name, ManagementNatRuleArgs args, CustomResourceOptions options)
type: checkpoint:ManagementNatRule
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 ManagementNatRuleArgs
- 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 ManagementNatRuleArgs
- 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 ManagementNatRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagementNatRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagementNatRuleArgs
- 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 managementNatRuleResource = new Checkpoint.ManagementNatRule("managementNatRuleResource", new()
{
Package = "string",
Position =
{
{ "string", "string" },
},
InstallOns = new[]
{
"string",
},
OriginalService = "string",
Comments = "string",
ManagementNatRuleId = "string",
Method = "string",
Name = "string",
OriginalDestination = "string",
IgnoreWarnings = false,
OriginalSource = "string",
IgnoreErrors = false,
Enabled = false,
TranslatedDestination = "string",
TranslatedService = "string",
TranslatedSource = "string",
});
example, err := checkpoint.NewManagementNatRule(ctx, "managementNatRuleResource", &checkpoint.ManagementNatRuleArgs{
Package: pulumi.String("string"),
Position: pulumi.StringMap{
"string": pulumi.String("string"),
},
InstallOns: pulumi.StringArray{
pulumi.String("string"),
},
OriginalService: pulumi.String("string"),
Comments: pulumi.String("string"),
ManagementNatRuleId: pulumi.String("string"),
Method: pulumi.String("string"),
Name: pulumi.String("string"),
OriginalDestination: pulumi.String("string"),
IgnoreWarnings: pulumi.Bool(false),
OriginalSource: pulumi.String("string"),
IgnoreErrors: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
TranslatedDestination: pulumi.String("string"),
TranslatedService: pulumi.String("string"),
TranslatedSource: pulumi.String("string"),
})
var managementNatRuleResource = new ManagementNatRule("managementNatRuleResource", ManagementNatRuleArgs.builder()
.package_("string")
.position(Map.of("string", "string"))
.installOns("string")
.originalService("string")
.comments("string")
.managementNatRuleId("string")
.method("string")
.name("string")
.originalDestination("string")
.ignoreWarnings(false)
.originalSource("string")
.ignoreErrors(false)
.enabled(false)
.translatedDestination("string")
.translatedService("string")
.translatedSource("string")
.build());
management_nat_rule_resource = checkpoint.ManagementNatRule("managementNatRuleResource",
package="string",
position={
"string": "string",
},
install_ons=["string"],
original_service="string",
comments="string",
management_nat_rule_id="string",
method="string",
name="string",
original_destination="string",
ignore_warnings=False,
original_source="string",
ignore_errors=False,
enabled=False,
translated_destination="string",
translated_service="string",
translated_source="string")
const managementNatRuleResource = new checkpoint.ManagementNatRule("managementNatRuleResource", {
"package": "string",
position: {
string: "string",
},
installOns: ["string"],
originalService: "string",
comments: "string",
managementNatRuleId: "string",
method: "string",
name: "string",
originalDestination: "string",
ignoreWarnings: false,
originalSource: "string",
ignoreErrors: false,
enabled: false,
translatedDestination: "string",
translatedService: "string",
translatedSource: "string",
});
type: checkpoint:ManagementNatRule
properties:
comments: string
enabled: false
ignoreErrors: false
ignoreWarnings: false
installOns:
- string
managementNatRuleId: string
method: string
name: string
originalDestination: string
originalService: string
originalSource: string
package: string
position:
string: string
translatedDestination: string
translatedService: string
translatedSource: string
ManagementNatRule 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 ManagementNatRule resource accepts the following input properties:
- Package string
- Name of the package.
- Position Dictionary<string, string>
- Position in the rulebase. Position blocks are documented below.
- Comments string
- Comments string.
- Enabled bool
- Enable/Disable the rule.
- Ignore
Errors bool - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- Ignore
Warnings bool - Apply changes ignoring warnings.
- Install
Ons List<string> - Which Gateways identified by the name or UID to install the policy on.
- Management
Nat stringRule Id - Method string
- Nat method.
- Name string
- Rule name.
- Original
Destination string - Original destination.
- Original
Service string - Original service.
- Original
Source string - Original source.
- Translated
Destination string - Translated destination.
- Translated
Service string - Translated service.
- Translated
Source string - Translated source.
- Package string
- Name of the package.
- Position map[string]string
- Position in the rulebase. Position blocks are documented below.
- Comments string
- Comments string.
- Enabled bool
- Enable/Disable the rule.
- Ignore
Errors bool - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- Ignore
Warnings bool - Apply changes ignoring warnings.
- Install
Ons []string - Which Gateways identified by the name or UID to install the policy on.
- Management
Nat stringRule Id - Method string
- Nat method.
- Name string
- Rule name.
- Original
Destination string - Original destination.
- Original
Service string - Original service.
- Original
Source string - Original source.
- Translated
Destination string - Translated destination.
- Translated
Service string - Translated service.
- Translated
Source string - Translated source.
- package_ String
- Name of the package.
- position Map<String,String>
- Position in the rulebase. Position blocks are documented below.
- comments String
- Comments string.
- enabled Boolean
- Enable/Disable the rule.
- ignore
Errors Boolean - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore
Warnings Boolean - Apply changes ignoring warnings.
- install
Ons List<String> - Which Gateways identified by the name or UID to install the policy on.
- management
Nat StringRule Id - method String
- Nat method.
- name String
- Rule name.
- original
Destination String - Original destination.
- original
Service String - Original service.
- original
Source String - Original source.
- translated
Destination String - Translated destination.
- translated
Service String - Translated service.
- translated
Source String - Translated source.
- package string
- Name of the package.
- position {[key: string]: string}
- Position in the rulebase. Position blocks are documented below.
- comments string
- Comments string.
- enabled boolean
- Enable/Disable the rule.
- ignore
Errors boolean - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore
Warnings boolean - Apply changes ignoring warnings.
- install
Ons string[] - Which Gateways identified by the name or UID to install the policy on.
- management
Nat stringRule Id - method string
- Nat method.
- name string
- Rule name.
- original
Destination string - Original destination.
- original
Service string - Original service.
- original
Source string - Original source.
- translated
Destination string - Translated destination.
- translated
Service string - Translated service.
- translated
Source string - Translated source.
- package str
- Name of the package.
- position Mapping[str, str]
- Position in the rulebase. Position blocks are documented below.
- comments str
- Comments string.
- enabled bool
- Enable/Disable the rule.
- ignore_
errors bool - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore_
warnings bool - Apply changes ignoring warnings.
- install_
ons Sequence[str] - Which Gateways identified by the name or UID to install the policy on.
- management_
nat_ strrule_ id - method str
- Nat method.
- name str
- Rule name.
- original_
destination str - Original destination.
- original_
service str - Original service.
- original_
source str - Original source.
- translated_
destination str - Translated destination.
- translated_
service str - Translated service.
- translated_
source str - Translated source.
- package String
- Name of the package.
- position Map<String>
- Position in the rulebase. Position blocks are documented below.
- comments String
- Comments string.
- enabled Boolean
- Enable/Disable the rule.
- ignore
Errors Boolean - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore
Warnings Boolean - Apply changes ignoring warnings.
- install
Ons List<String> - Which Gateways identified by the name or UID to install the policy on.
- management
Nat StringRule Id - method String
- Nat method.
- name String
- Rule name.
- original
Destination String - Original destination.
- original
Service String - Original service.
- original
Source String - Original source.
- translated
Destination String - Translated destination.
- translated
Service String - Translated service.
- translated
Source String - Translated source.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagementNatRule resource produces the following output properties:
- Auto
Generated bool - Auto generated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Auto
Generated bool - Auto generated.
- Id string
- The provider-assigned unique ID for this managed resource.
- auto
Generated Boolean - Auto generated.
- id String
- The provider-assigned unique ID for this managed resource.
- auto
Generated boolean - Auto generated.
- id string
- The provider-assigned unique ID for this managed resource.
- auto_
generated bool - Auto generated.
- id str
- The provider-assigned unique ID for this managed resource.
- auto
Generated Boolean - Auto generated.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ManagementNatRule Resource
Get an existing ManagementNatRule 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?: ManagementNatRuleState, opts?: CustomResourceOptions): ManagementNatRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_generated: Optional[bool] = None,
comments: Optional[str] = None,
enabled: Optional[bool] = None,
ignore_errors: Optional[bool] = None,
ignore_warnings: Optional[bool] = None,
install_ons: Optional[Sequence[str]] = None,
management_nat_rule_id: Optional[str] = None,
method: Optional[str] = None,
name: Optional[str] = None,
original_destination: Optional[str] = None,
original_service: Optional[str] = None,
original_source: Optional[str] = None,
package: Optional[str] = None,
position: Optional[Mapping[str, str]] = None,
translated_destination: Optional[str] = None,
translated_service: Optional[str] = None,
translated_source: Optional[str] = None) -> ManagementNatRule
func GetManagementNatRule(ctx *Context, name string, id IDInput, state *ManagementNatRuleState, opts ...ResourceOption) (*ManagementNatRule, error)
public static ManagementNatRule Get(string name, Input<string> id, ManagementNatRuleState? state, CustomResourceOptions? opts = null)
public static ManagementNatRule get(String name, Output<String> id, ManagementNatRuleState state, CustomResourceOptions options)
resources: _: type: checkpoint:ManagementNatRule 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.
- Auto
Generated bool - Auto generated.
- Comments string
- Comments string.
- Enabled bool
- Enable/Disable the rule.
- Ignore
Errors bool - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- Ignore
Warnings bool - Apply changes ignoring warnings.
- Install
Ons List<string> - Which Gateways identified by the name or UID to install the policy on.
- Management
Nat stringRule Id - Method string
- Nat method.
- Name string
- Rule name.
- Original
Destination string - Original destination.
- Original
Service string - Original service.
- Original
Source string - Original source.
- Package string
- Name of the package.
- Position Dictionary<string, string>
- Position in the rulebase. Position blocks are documented below.
- Translated
Destination string - Translated destination.
- Translated
Service string - Translated service.
- Translated
Source string - Translated source.
- Auto
Generated bool - Auto generated.
- Comments string
- Comments string.
- Enabled bool
- Enable/Disable the rule.
- Ignore
Errors bool - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- Ignore
Warnings bool - Apply changes ignoring warnings.
- Install
Ons []string - Which Gateways identified by the name or UID to install the policy on.
- Management
Nat stringRule Id - Method string
- Nat method.
- Name string
- Rule name.
- Original
Destination string - Original destination.
- Original
Service string - Original service.
- Original
Source string - Original source.
- Package string
- Name of the package.
- Position map[string]string
- Position in the rulebase. Position blocks are documented below.
- Translated
Destination string - Translated destination.
- Translated
Service string - Translated service.
- Translated
Source string - Translated source.
- auto
Generated Boolean - Auto generated.
- comments String
- Comments string.
- enabled Boolean
- Enable/Disable the rule.
- ignore
Errors Boolean - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore
Warnings Boolean - Apply changes ignoring warnings.
- install
Ons List<String> - Which Gateways identified by the name or UID to install the policy on.
- management
Nat StringRule Id - method String
- Nat method.
- name String
- Rule name.
- original
Destination String - Original destination.
- original
Service String - Original service.
- original
Source String - Original source.
- package_ String
- Name of the package.
- position Map<String,String>
- Position in the rulebase. Position blocks are documented below.
- translated
Destination String - Translated destination.
- translated
Service String - Translated service.
- translated
Source String - Translated source.
- auto
Generated boolean - Auto generated.
- comments string
- Comments string.
- enabled boolean
- Enable/Disable the rule.
- ignore
Errors boolean - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore
Warnings boolean - Apply changes ignoring warnings.
- install
Ons string[] - Which Gateways identified by the name or UID to install the policy on.
- management
Nat stringRule Id - method string
- Nat method.
- name string
- Rule name.
- original
Destination string - Original destination.
- original
Service string - Original service.
- original
Source string - Original source.
- package string
- Name of the package.
- position {[key: string]: string}
- Position in the rulebase. Position blocks are documented below.
- translated
Destination string - Translated destination.
- translated
Service string - Translated service.
- translated
Source string - Translated source.
- auto_
generated bool - Auto generated.
- comments str
- Comments string.
- enabled bool
- Enable/Disable the rule.
- ignore_
errors bool - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore_
warnings bool - Apply changes ignoring warnings.
- install_
ons Sequence[str] - Which Gateways identified by the name or UID to install the policy on.
- management_
nat_ strrule_ id - method str
- Nat method.
- name str
- Rule name.
- original_
destination str - Original destination.
- original_
service str - Original service.
- original_
source str - Original source.
- package str
- Name of the package.
- position Mapping[str, str]
- Position in the rulebase. Position blocks are documented below.
- translated_
destination str - Translated destination.
- translated_
service str - Translated service.
- translated_
source str - Translated source.
- auto
Generated Boolean - Auto generated.
- comments String
- Comments string.
- enabled Boolean
- Enable/Disable the rule.
- ignore
Errors Boolean - Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored.
- ignore
Warnings Boolean - Apply changes ignoring warnings.
- install
Ons List<String> - Which Gateways identified by the name or UID to install the policy on.
- management
Nat StringRule Id - method String
- Nat method.
- name String
- Rule name.
- original
Destination String - Original destination.
- original
Service String - Original service.
- original
Source String - Original source.
- package String
- Name of the package.
- position Map<String>
- Position in the rulebase. Position blocks are documented below.
- translated
Destination String - Translated destination.
- translated
Service String - Translated service.
- translated
Source String - Translated source.
Import
checkpoint_management_nat_rule
can be imported by using the following format: PACKAGE_NAME;RULE_UID
$ pulumi import checkpoint:index/managementNatRule:ManagementNatRule example "Standard;9423d36f-2d66-4754-b9e2-e9f4493751d3"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- checkpoint checkpointsw/terraform-provider-checkpoint
- License
- Notes
- This Pulumi package is based on the
checkpoint
Terraform Provider.