Class RbacPolicyV2
The RBAC policy resource contains functionality for working with Neutron RBAC Policies. Role-Based Access Control (RBAC) policy framework enables both operators and users to grant access to resources for specific projects.
Sharing an object with a specific project is accomplished by creating a
policy entry that permits the target project the access_as_shared action
on that object.
To make a network available as an external network for specific projects
rather than all projects, use the access_as_external action.
If a network is marked as external during creation, it now implicitly creates
a wildcard RBAC policy granting everyone access to preserve previous behavior
before this feature was added.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
{
AdminStateUp = "true",
});
var rbacPolicy1 = new OpenStack.Networking.RbacPolicyV2("rbacPolicy1", new OpenStack.Networking.RbacPolicyV2Args
{
Action = "access_as_shared",
ObjectId = network1.Id,
ObjectType = "network",
TargetTenant = "20415a973c9e45d3917f078950644697",
});
}
}
Inherited Members
Namespace: Pulumi.OpenStack.Networking
Assembly: Pulumi.OpenStack.dll
Syntax
public class RbacPolicyV2 : CustomResource
Constructors
View SourceRbacPolicyV2(String, RbacPolicyV2Args, CustomResourceOptions)
Create a RbacPolicyV2 resource with the given unique name, arguments, and options.
Declaration
public RbacPolicyV2(string name, RbacPolicyV2Args args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RbacPolicyV2Args | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAction
Action for the RBAC policy. Can either be
access_as_external or access_as_shared.
Declaration
public Output<string> Action { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ObjectId
The ID of the object_type resource. An
object_type of network returns a network ID and an object_type of
qos_policy returns a QoS ID.
Declaration
public Output<string> ObjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ObjectType
The type of the object that the RBAC policy
affects. Can either be qos-policy or network.
Declaration
public Output<string> ObjectType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectId
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The region in which to obtain the V2 networking client.
A networking client is needed to configure a routing entry on a subnet. If omitted, the
region argument of the provider is used. Changing this creates a new
routing entry.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TargetTenant
The ID of the tenant to which the RBAC policy will be enforced.
Declaration
public Output<string> TargetTenant { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RbacPolicyV2State, CustomResourceOptions)
Get an existing RbacPolicyV2 resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static RbacPolicyV2 Get(string name, Input<string> id, RbacPolicyV2State 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. |
| RbacPolicyV2State | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| RbacPolicyV2 |