1. Packages
  2. Nexus Provider
  3. API Docs
  4. SecurityContentSelector
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.SecurityContentSelector

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    Use this resource to create a Nexus Content Selector.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const example = new nexus.SecurityContentSelector("example", {
        description: "example content selector",
        expression: "format == \"raw\"",
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    example = nexus.SecurityContentSelector("example",
        description="example content selector",
        expression="format == \"raw\"")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nexus.NewSecurityContentSelector(ctx, "example", &nexus.SecurityContentSelectorArgs{
    			Description: pulumi.String("example content selector"),
    			Expression:  pulumi.String("format == \"raw\""),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Nexus.SecurityContentSelector("example", new()
        {
            Description = "example content selector",
            Expression = "format == \"raw\"",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.SecurityContentSelector;
    import com.pulumi.nexus.SecurityContentSelectorArgs;
    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 example = new SecurityContentSelector("example", SecurityContentSelectorArgs.builder()
                .description("example content selector")
                .expression("format == \"raw\"")
                .build());
    
        }
    }
    
    resources:
      example:
        type: nexus:SecurityContentSelector
        properties:
          description: example content selector
          expression: format == "raw"
    

    Create SecurityContentSelector Resource

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

    Constructor syntax

    new SecurityContentSelector(name: string, args: SecurityContentSelectorArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityContentSelector(resource_name: str,
                                args: SecurityContentSelectorArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityContentSelector(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                expression: Optional[str] = None,
                                description: Optional[str] = None,
                                name: Optional[str] = None)
    func NewSecurityContentSelector(ctx *Context, name string, args SecurityContentSelectorArgs, opts ...ResourceOption) (*SecurityContentSelector, error)
    public SecurityContentSelector(string name, SecurityContentSelectorArgs args, CustomResourceOptions? opts = null)
    public SecurityContentSelector(String name, SecurityContentSelectorArgs args)
    public SecurityContentSelector(String name, SecurityContentSelectorArgs args, CustomResourceOptions options)
    
    type: nexus:SecurityContentSelector
    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 SecurityContentSelectorArgs
    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 SecurityContentSelectorArgs
    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 SecurityContentSelectorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityContentSelectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityContentSelectorArgs
    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 securityContentSelectorResource = new Nexus.SecurityContentSelector("securityContentSelectorResource", new()
    {
        Expression = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := nexus.NewSecurityContentSelector(ctx, "securityContentSelectorResource", &nexus.SecurityContentSelectorArgs{
    	Expression:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var securityContentSelectorResource = new SecurityContentSelector("securityContentSelectorResource", SecurityContentSelectorArgs.builder()
        .expression("string")
        .description("string")
        .name("string")
        .build());
    
    security_content_selector_resource = nexus.SecurityContentSelector("securityContentSelectorResource",
        expression="string",
        description="string",
        name="string")
    
    const securityContentSelectorResource = new nexus.SecurityContentSelector("securityContentSelectorResource", {
        expression: "string",
        description: "string",
        name: "string",
    });
    
    type: nexus:SecurityContentSelector
    properties:
        description: string
        expression: string
        name: string
    

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

    Expression string
    The content selector expression
    Description string
    A description of the content selector
    Name string
    Content selector name
    Expression string
    The content selector expression
    Description string
    A description of the content selector
    Name string
    Content selector name
    expression String
    The content selector expression
    description String
    A description of the content selector
    name String
    Content selector name
    expression string
    The content selector expression
    description string
    A description of the content selector
    name string
    Content selector name
    expression str
    The content selector expression
    description str
    A description of the content selector
    name str
    Content selector name
    expression String
    The content selector expression
    description String
    A description of the content selector
    name String
    Content selector name

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityContentSelector 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 SecurityContentSelector Resource

    Get an existing SecurityContentSelector 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?: SecurityContentSelectorState, opts?: CustomResourceOptions): SecurityContentSelector
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            expression: Optional[str] = None,
            name: Optional[str] = None) -> SecurityContentSelector
    func GetSecurityContentSelector(ctx *Context, name string, id IDInput, state *SecurityContentSelectorState, opts ...ResourceOption) (*SecurityContentSelector, error)
    public static SecurityContentSelector Get(string name, Input<string> id, SecurityContentSelectorState? state, CustomResourceOptions? opts = null)
    public static SecurityContentSelector get(String name, Output<String> id, SecurityContentSelectorState state, CustomResourceOptions options)
    resources:  _:    type: nexus:SecurityContentSelector    get:      id: ${id}
    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:
    Description string
    A description of the content selector
    Expression string
    The content selector expression
    Name string
    Content selector name
    Description string
    A description of the content selector
    Expression string
    The content selector expression
    Name string
    Content selector name
    description String
    A description of the content selector
    expression String
    The content selector expression
    name String
    Content selector name
    description string
    A description of the content selector
    expression string
    The content selector expression
    name string
    Content selector name
    description str
    A description of the content selector
    expression str
    The content selector expression
    name str
    Content selector name
    description String
    A description of the content selector
    expression String
    The content selector expression
    name String
    Content selector name

    Import

    import using the name of the content selector

    $ pulumi import nexus:index/securityContentSelector:SecurityContentSelector example example
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    nexus datadrivers/terraform-provider-nexus
    License
    Notes
    This Pulumi package is based on the nexus Terraform Provider.
    nexus logo
    nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers