Class Policy
Manages a v1 firewall policy resource within OpenStack.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var rule1 = new OpenStack.Firewall.Rule("rule1", new OpenStack.Firewall.RuleArgs
{
Action = "deny",
Description = "drop TELNET traffic",
DestinationPort = "23",
Enabled = "true",
Protocol = "tcp",
});
var rule2 = new OpenStack.Firewall.Rule("rule2", new OpenStack.Firewall.RuleArgs
{
Action = "deny",
Description = "drop NTP traffic",
DestinationPort = "123",
Enabled = "false",
Protocol = "udp",
});
var policy1 = new OpenStack.Firewall.Policy("policy1", new OpenStack.Firewall.PolicyArgs
{
Rules =
{
rule1.Id,
rule2.Id,
},
});
}
}
Inherited Members
Namespace: Pulumi.OpenStack.Firewall
Assembly: Pulumi.OpenStack.dll
Syntax
public class Policy : CustomResource
Constructors
View SourcePolicy(String, PolicyArgs, CustomResourceOptions)
Create a Policy resource with the given unique name, arguments, and options.
Declaration
public Policy(string name, PolicyArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAudited
Audit status of the firewall policy
(must be "true" or "false" if provided - defaults to "false").
This status is set to "false" whenever the firewall policy or any of its
rules are changed. Changing this updates the audited status of an existing
firewall policy.
Declaration
public Output<bool?> Audited { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Description
A description for the firewall policy. Changing
this updates the description of an existing firewall policy.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
A name for the firewall policy. Changing this
updates the name of an existing firewall policy.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The region in which to obtain the v1 networking client.
A networking client is needed to create a firewall policy. If omitted, the
region argument of the provider is used. Changing this creates a new
firewall policy.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Rules
An array of one or more firewall rules that comprise the policy. Changing this results in adding/removing rules from the existing firewall policy.
Declaration
public Output<ImmutableArray<string>> Rules { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Shared
Sharing status of the firewall policy (must be "true"
or "false" if provided). If this is "true" the policy is visible to, and
can be used in, firewalls in other tenants. Changing this updates the
shared status of an existing firewall policy. Only administrative users
can specify if the policy should be shared.
Declaration
public Output<bool?> Shared { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
TenantId
Declaration
public Output<string> TenantId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ValueSpecs
Map of additional options.
Declaration
public Output<ImmutableDictionary<string, object>> ValueSpecs { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, PolicyState, CustomResourceOptions)
Get an existing Policy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Policy Get(string name, Input<string> id, PolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| PolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Policy |