Show / Hide Table of Contents

Class Rule

Manages a v1 firewall rule 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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Rule
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.Firewall
Assembly: Pulumi.OpenStack.dll
Syntax
public class Rule : CustomResource

Constructors

View Source

Rule(String, RuleArgs, CustomResourceOptions)

Create a Rule resource with the given unique name, arguments, and options.

Declaration
public Rule(string name, RuleArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RuleArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Action

Action to be taken ( must be "allow" or "deny") when the firewall rule matches. Changing this updates the action of an existing firewall rule.

Declaration
public Output<string> Action { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

A description for the firewall rule. Changing this updates the description of an existing firewall rule.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DestinationIpAddress

The destination IP address on which the firewall rule operates. Changing this updates the destination_ip_address of an existing firewall rule.

Declaration
public Output<string> DestinationIpAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

DestinationPort

The destination port on which the firewall rule operates. Changing this updates the destination_port of an existing firewall rule.

Declaration
public Output<string> DestinationPort { get; }
Property Value
Type Description
Output<System.String>
View Source

Enabled

Enabled status for the firewall rule (must be "true" or "false" if provided - defaults to "true"). Changing this updates the enabled status of an existing firewall rule.

Declaration
public Output<bool?> Enabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

IpVersion

IP version, either 4 (default) or 6. Changing this updates the ip_version of an existing firewall rule.

Declaration
public Output<int?> IpVersion { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Name

A unique name for the firewall rule. Changing this updates the name of an existing firewall rule.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Protocol

The protocol type on which the firewall rule operates. Valid values are: tcp, udp, icmp, and any. Changing this updates the protocol of an existing firewall rule.

Declaration
public Output<string> Protocol { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region in which to obtain the v1 Compute client. A Compute client is needed to create a firewall rule. If omitted, the region argument of the provider is used. Changing this creates a new firewall rule.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

SourceIpAddress

The source IP address on which the firewall rule operates. Changing this updates the source_ip_address of an existing firewall rule.

Declaration
public Output<string> SourceIpAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

SourcePort

The source port on which the firewall rule operates. Changing this updates the source_port of an existing firewall rule.

Declaration
public Output<string> SourcePort { get; }
Property Value
Type Description
Output<System.String>
View Source

TenantId

The owner of the firewall rule. Required if admin wants to create a firewall rule for another tenant. Changing this creates a new firewall rule.

Declaration
public Output<string> TenantId { get; }
Property Value
Type Description
Output<System.String>
View Source

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 Source

Get(String, Input<String>, RuleState, CustomResourceOptions)

Get an existing Rule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Rule Get(string name, Input<string> id, RuleState 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.

RuleState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Rule
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.