1. Packages
  2. Aquasec
  3. API Docs
  4. RoleMapping
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

aquasec.RoleMapping

Explore with Pulumi AI

aquasec logo
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aquasec from "@pulumiverse/aquasec";
    
    const roleMappingRoleMapping = new aquasec.RoleMapping("roleMappingRoleMapping", {saml: {
        roleMapping: {
            Administrator: "group1",
            Scanner: "group2|group3",
        },
    }});
    export const roleMapping = roleMappingRoleMapping;
    
    import pulumi
    import pulumiverse_aquasec as aquasec
    
    role_mapping_role_mapping = aquasec.RoleMapping("roleMappingRoleMapping", saml=aquasec.RoleMappingSamlArgs(
        role_mapping={
            "Administrator": "group1",
            "Scanner": "group2|group3",
        },
    ))
    pulumi.export("roleMapping", role_mapping_role_mapping)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-aquasec/sdk/go/aquasec"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		roleMappingRoleMapping, err := aquasec.NewRoleMapping(ctx, "roleMappingRoleMapping", &aquasec.RoleMappingArgs{
    			Saml: &aquasec.RoleMappingSamlArgs{
    				RoleMapping: pulumi.StringMap{
    					"Administrator": pulumi.String("group1"),
    					"Scanner":       pulumi.String("group2|group3"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("roleMapping", roleMappingRoleMapping)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aquasec = Pulumiverse.Aquasec;
    
    return await Deployment.RunAsync(() => 
    {
        var roleMappingRoleMapping = new Aquasec.RoleMapping("roleMappingRoleMapping", new()
        {
            Saml = new Aquasec.Inputs.RoleMappingSamlArgs
            {
                RoleMapping = 
                {
                    { "Administrator", "group1" },
                    { "Scanner", "group2|group3" },
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["roleMapping"] = roleMappingRoleMapping,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aquasec.RoleMapping;
    import com.pulumi.aquasec.RoleMappingArgs;
    import com.pulumi.aquasec.inputs.RoleMappingSamlArgs;
    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 roleMappingRoleMapping = new RoleMapping("roleMappingRoleMapping", RoleMappingArgs.builder()
                .saml(RoleMappingSamlArgs.builder()
                    .roleMapping(Map.ofEntries(
                        Map.entry("Administrator", "group1"),
                        Map.entry("Scanner", "group2|group3")
                    ))
                    .build())
                .build());
    
            ctx.export("roleMapping", roleMappingRoleMapping);
        }
    }
    
    resources:
      roleMappingRoleMapping:
        type: aquasec:RoleMapping
        properties:
          saml:
            roleMapping:
              Administrator: group1
              Scanner: group2|group3
    outputs:
      roleMapping: ${roleMappingRoleMapping}
    

    Create RoleMapping Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RoleMapping(name: string, args?: RoleMappingArgs, opts?: CustomResourceOptions);
    @overload
    def RoleMapping(resource_name: str,
                    args: Optional[RoleMappingArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def RoleMapping(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    ldap: Optional[RoleMappingLdapArgs] = None,
                    oauth2: Optional[RoleMappingOauth2Args] = None,
                    openid: Optional[RoleMappingOpenidArgs] = None,
                    saml: Optional[RoleMappingSamlArgs] = None)
    func NewRoleMapping(ctx *Context, name string, args *RoleMappingArgs, opts ...ResourceOption) (*RoleMapping, error)
    public RoleMapping(string name, RoleMappingArgs? args = null, CustomResourceOptions? opts = null)
    public RoleMapping(String name, RoleMappingArgs args)
    public RoleMapping(String name, RoleMappingArgs args, CustomResourceOptions options)
    
    type: aquasec:RoleMapping
    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 RoleMappingArgs
    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 RoleMappingArgs
    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 RoleMappingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleMappingArgs
    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 roleMappingResource = new Aquasec.RoleMapping("roleMappingResource", new()
    {
        Ldap = new Aquasec.Inputs.RoleMappingLdapArgs
        {
            RoleMapping = 
            {
                { "string", "string" },
            },
        },
        Oauth2 = new Aquasec.Inputs.RoleMappingOauth2Args
        {
            RoleMapping = 
            {
                { "string", "string" },
            },
        },
        Openid = new Aquasec.Inputs.RoleMappingOpenidArgs
        {
            RoleMapping = 
            {
                { "string", "string" },
            },
        },
        Saml = new Aquasec.Inputs.RoleMappingSamlArgs
        {
            RoleMapping = 
            {
                { "string", "string" },
            },
        },
    });
    
    example, err := aquasec.NewRoleMapping(ctx, "roleMappingResource", &aquasec.RoleMappingArgs{
    	Ldap: &aquasec.RoleMappingLdapArgs{
    		RoleMapping: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	Oauth2: &aquasec.RoleMappingOauth2Args{
    		RoleMapping: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	Openid: &aquasec.RoleMappingOpenidArgs{
    		RoleMapping: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	Saml: &aquasec.RoleMappingSamlArgs{
    		RoleMapping: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    })
    
    var roleMappingResource = new RoleMapping("roleMappingResource", RoleMappingArgs.builder()
        .ldap(RoleMappingLdapArgs.builder()
            .roleMapping(Map.of("string", "string"))
            .build())
        .oauth2(RoleMappingOauth2Args.builder()
            .roleMapping(Map.of("string", "string"))
            .build())
        .openid(RoleMappingOpenidArgs.builder()
            .roleMapping(Map.of("string", "string"))
            .build())
        .saml(RoleMappingSamlArgs.builder()
            .roleMapping(Map.of("string", "string"))
            .build())
        .build());
    
    role_mapping_resource = aquasec.RoleMapping("roleMappingResource",
        ldap={
            "role_mapping": {
                "string": "string",
            },
        },
        oauth2={
            "role_mapping": {
                "string": "string",
            },
        },
        openid={
            "role_mapping": {
                "string": "string",
            },
        },
        saml={
            "role_mapping": {
                "string": "string",
            },
        })
    
    const roleMappingResource = new aquasec.RoleMapping("roleMappingResource", {
        ldap: {
            roleMapping: {
                string: "string",
            },
        },
        oauth2: {
            roleMapping: {
                string: "string",
            },
        },
        openid: {
            roleMapping: {
                string: "string",
            },
        },
        saml: {
            roleMapping: {
                string: "string",
            },
        },
    });
    
    type: aquasec:RoleMapping
    properties:
        ldap:
            roleMapping:
                string: string
        oauth2:
            roleMapping:
                string: string
        openid:
            roleMapping:
                string: string
        saml:
            roleMapping:
                string: string
    

    RoleMapping 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 RoleMapping resource accepts the following input properties:

    Ldap RoleMappingLdapArgs
    LDAP Authentication
    Oauth2 RoleMappingOauth2Args
    Oauth2 Authentication
    Openid RoleMappingOpenidArgs
    OpenId Authentication
    Saml RoleMappingSamlArgs
    SAML Authentication
    ldap RoleMappingLdap
    LDAP Authentication
    oauth2 RoleMappingOauth2
    Oauth2 Authentication
    openid RoleMappingOpenid
    OpenId Authentication
    saml RoleMappingSaml
    SAML Authentication
    ldap RoleMappingLdap
    LDAP Authentication
    oauth2 RoleMappingOauth2
    Oauth2 Authentication
    openid RoleMappingOpenid
    OpenId Authentication
    saml RoleMappingSaml
    SAML Authentication
    ldap RoleMappingLdapArgs
    LDAP Authentication
    oauth2 RoleMappingOauth2Args
    Oauth2 Authentication
    openid RoleMappingOpenidArgs
    OpenId Authentication
    saml RoleMappingSamlArgs
    SAML Authentication
    ldap Property Map
    LDAP Authentication
    oauth2 Property Map
    Oauth2 Authentication
    openid Property Map
    OpenId Authentication
    saml Property Map
    SAML Authentication

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RoleMapping resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RoleMapping Resource

    Get an existing RoleMapping 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?: RoleMappingState, opts?: CustomResourceOptions): RoleMapping
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ldap: Optional[RoleMappingLdapArgs] = None,
            oauth2: Optional[RoleMappingOauth2Args] = None,
            openid: Optional[RoleMappingOpenidArgs] = None,
            saml: Optional[RoleMappingSamlArgs] = None) -> RoleMapping
    func GetRoleMapping(ctx *Context, name string, id IDInput, state *RoleMappingState, opts ...ResourceOption) (*RoleMapping, error)
    public static RoleMapping Get(string name, Input<string> id, RoleMappingState? state, CustomResourceOptions? opts = null)
    public static RoleMapping get(String name, Output<String> id, RoleMappingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Ldap RoleMappingLdapArgs
    LDAP Authentication
    Oauth2 RoleMappingOauth2Args
    Oauth2 Authentication
    Openid RoleMappingOpenidArgs
    OpenId Authentication
    Saml RoleMappingSamlArgs
    SAML Authentication
    ldap RoleMappingLdap
    LDAP Authentication
    oauth2 RoleMappingOauth2
    Oauth2 Authentication
    openid RoleMappingOpenid
    OpenId Authentication
    saml RoleMappingSaml
    SAML Authentication
    ldap RoleMappingLdap
    LDAP Authentication
    oauth2 RoleMappingOauth2
    Oauth2 Authentication
    openid RoleMappingOpenid
    OpenId Authentication
    saml RoleMappingSaml
    SAML Authentication
    ldap RoleMappingLdapArgs
    LDAP Authentication
    oauth2 RoleMappingOauth2Args
    Oauth2 Authentication
    openid RoleMappingOpenidArgs
    OpenId Authentication
    saml RoleMappingSamlArgs
    SAML Authentication
    ldap Property Map
    LDAP Authentication
    oauth2 Property Map
    Oauth2 Authentication
    openid Property Map
    OpenId Authentication
    saml Property Map
    SAML Authentication

    Supporting Types

    RoleMappingLdap, RoleMappingLdapArgs

    RoleMapping Dictionary<string, string>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    RoleMapping map[string]string
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String,String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping {[key: string]: string}
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    role_mapping Mapping[str, str]
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.

    RoleMappingOauth2, RoleMappingOauth2Args

    RoleMapping Dictionary<string, string>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    RoleMapping map[string]string
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String,String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping {[key: string]: string}
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    role_mapping Mapping[str, str]
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.

    RoleMappingOpenid, RoleMappingOpenidArgs

    RoleMapping Dictionary<string, string>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    RoleMapping map[string]string
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String,String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping {[key: string]: string}
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    role_mapping Mapping[str, str]
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.

    RoleMappingSaml, RoleMappingSamlArgs

    RoleMapping Dictionary<string, string>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    RoleMapping map[string]string
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String,String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping {[key: string]: string}
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    role_mapping Mapping[str, str]
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.
    roleMapping Map<String>
    Role Mapping is used to define the IdP role that the user will assume in Aqua. Use '|' as a separator for multiple roles.

    Package Details

    Repository
    aquasec pulumiverse/pulumi-aquasec
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aquasec Terraform Provider.
    aquasec logo
    Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse