Class RbacPolicyV2


  • public class RbacPolicyV2
    extends com.pulumi.resources.CustomResource
    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 ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.networking.Network; import com.pulumi.openstack.networking.NetworkArgs; import com.pulumi.openstack.networking.RbacPolicyV2; import com.pulumi.openstack.networking.RbacPolicyV2Args; 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 network1 = new Network("network1", NetworkArgs.builder() .adminStateUp("true") .build()); var rbacPolicy1 = new RbacPolicyV2("rbacPolicy1", RbacPolicyV2Args.builder() .action("access_as_shared") .objectId(network1.id()) .objectType("network") .targetTenant("20415a973c9e45d3917f078950644697") .build()); } } ``` ## Import RBAC policies can be imported using the `id`, e.g. ```sh $ pulumi import openstack:networking/rbacPolicyV2:RbacPolicyV2 rbac_policy_1 eae26a3e-1c33-4cc1-9c31-0cd729c438a1 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> action()  
      static RbacPolicyV2 get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RbacPolicyV2State state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> objectId()  
      com.pulumi.core.Output<java.lang.String> objectType()  
      com.pulumi.core.Output<java.lang.String> projectId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> targetTenant()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RbacPolicyV2

        public RbacPolicyV2​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • RbacPolicyV2

        public RbacPolicyV2​(java.lang.String name,
                            RbacPolicyV2Args args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • RbacPolicyV2

        public RbacPolicyV2​(java.lang.String name,
                            RbacPolicyV2Args args,
                            @Nullable
                            com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • action

        public com.pulumi.core.Output<java.lang.String> action()
        Returns:
        Action for the RBAC policy. Can either be `access_as_external` or `access_as_shared`.
      • objectId

        public com.pulumi.core.Output<java.lang.String> objectId()
        Returns:
        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.
      • objectType

        public com.pulumi.core.Output<java.lang.String> objectType()
        Returns:
        The type of the object that the RBAC policy affects. Can be one of the following: `address_scope`, `address_group`, `network`, `qos_policy`, `security_group` or `subnetpool`.
      • projectId

        public com.pulumi.core.Output<java.lang.String> projectId()
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        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.
      • targetTenant

        public com.pulumi.core.Output<java.lang.String> targetTenant()
        Returns:
        The ID of the tenant to which the RBAC policy will be enforced.
      • get

        public static RbacPolicyV2 get​(java.lang.String name,
                                       com.pulumi.core.Output<java.lang.String> id,
                                       @Nullable
                                       RbacPolicyV2State state,
                                       @Nullable
                                       com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.