1. Packages
  2. GitHub
  3. API Docs
  4. OrganizationSecurityManager
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

github.OrganizationSecurityManager

Explore with Pulumi AI

github logo
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const someTeam = new github.Team("some_team", {
        name: "SomeTeam",
        description: "Some cool team",
    });
    const someTeamOrganizationSecurityManager = new github.OrganizationSecurityManager("some_team", {teamSlug: someTeam.slug});
    
    import pulumi
    import pulumi_github as github
    
    some_team = github.Team("some_team",
        name="SomeTeam",
        description="Some cool team")
    some_team_organization_security_manager = github.OrganizationSecurityManager("some_team", team_slug=some_team.slug)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		someTeam, err := github.NewTeam(ctx, "some_team", &github.TeamArgs{
    			Name:        pulumi.String("SomeTeam"),
    			Description: pulumi.String("Some cool team"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewOrganizationSecurityManager(ctx, "some_team", &github.OrganizationSecurityManagerArgs{
    			TeamSlug: someTeam.Slug,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var someTeam = new Github.Team("some_team", new()
        {
            Name = "SomeTeam",
            Description = "Some cool team",
        });
    
        var someTeamOrganizationSecurityManager = new Github.OrganizationSecurityManager("some_team", new()
        {
            TeamSlug = someTeam.Slug,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.Team;
    import com.pulumi.github.TeamArgs;
    import com.pulumi.github.OrganizationSecurityManager;
    import com.pulumi.github.OrganizationSecurityManagerArgs;
    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 someTeam = new Team("someTeam", TeamArgs.builder()
                .name("SomeTeam")
                .description("Some cool team")
                .build());
    
            var someTeamOrganizationSecurityManager = new OrganizationSecurityManager("someTeamOrganizationSecurityManager", OrganizationSecurityManagerArgs.builder()
                .teamSlug(someTeam.slug())
                .build());
    
        }
    }
    
    resources:
      someTeam:
        type: github:Team
        name: some_team
        properties:
          name: SomeTeam
          description: Some cool team
      someTeamOrganizationSecurityManager:
        type: github:OrganizationSecurityManager
        name: some_team
        properties:
          teamSlug: ${someTeam.slug}
    

    Create OrganizationSecurityManager Resource

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

    Constructor syntax

    new OrganizationSecurityManager(name: string, args: OrganizationSecurityManagerArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationSecurityManager(resource_name: str,
                                    args: OrganizationSecurityManagerArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationSecurityManager(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    team_slug: Optional[str] = None)
    func NewOrganizationSecurityManager(ctx *Context, name string, args OrganizationSecurityManagerArgs, opts ...ResourceOption) (*OrganizationSecurityManager, error)
    public OrganizationSecurityManager(string name, OrganizationSecurityManagerArgs args, CustomResourceOptions? opts = null)
    public OrganizationSecurityManager(String name, OrganizationSecurityManagerArgs args)
    public OrganizationSecurityManager(String name, OrganizationSecurityManagerArgs args, CustomResourceOptions options)
    
    type: github:OrganizationSecurityManager
    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 OrganizationSecurityManagerArgs
    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 OrganizationSecurityManagerArgs
    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 OrganizationSecurityManagerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationSecurityManagerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationSecurityManagerArgs
    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 organizationSecurityManagerResource = new Github.OrganizationSecurityManager("organizationSecurityManagerResource", new()
    {
        TeamSlug = "string",
    });
    
    example, err := github.NewOrganizationSecurityManager(ctx, "organizationSecurityManagerResource", &github.OrganizationSecurityManagerArgs{
    	TeamSlug: pulumi.String("string"),
    })
    
    var organizationSecurityManagerResource = new OrganizationSecurityManager("organizationSecurityManagerResource", OrganizationSecurityManagerArgs.builder()
        .teamSlug("string")
        .build());
    
    organization_security_manager_resource = github.OrganizationSecurityManager("organizationSecurityManagerResource", team_slug="string")
    
    const organizationSecurityManagerResource = new github.OrganizationSecurityManager("organizationSecurityManagerResource", {teamSlug: "string"});
    
    type: github:OrganizationSecurityManager
    properties:
        teamSlug: string
    

    OrganizationSecurityManager Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The OrganizationSecurityManager resource accepts the following input properties:

    TeamSlug string
    The slug of the team to manage.
    TeamSlug string
    The slug of the team to manage.
    teamSlug String
    The slug of the team to manage.
    teamSlug string
    The slug of the team to manage.
    team_slug str
    The slug of the team to manage.
    teamSlug String
    The slug of the team to manage.

    Outputs

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

    Get an existing OrganizationSecurityManager 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?: OrganizationSecurityManagerState, opts?: CustomResourceOptions): OrganizationSecurityManager
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            team_slug: Optional[str] = None) -> OrganizationSecurityManager
    func GetOrganizationSecurityManager(ctx *Context, name string, id IDInput, state *OrganizationSecurityManagerState, opts ...ResourceOption) (*OrganizationSecurityManager, error)
    public static OrganizationSecurityManager Get(string name, Input<string> id, OrganizationSecurityManagerState? state, CustomResourceOptions? opts = null)
    public static OrganizationSecurityManager get(String name, Output<String> id, OrganizationSecurityManagerState 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:
    TeamSlug string
    The slug of the team to manage.
    TeamSlug string
    The slug of the team to manage.
    teamSlug String
    The slug of the team to manage.
    teamSlug string
    The slug of the team to manage.
    team_slug str
    The slug of the team to manage.
    teamSlug String
    The slug of the team to manage.

    Import

    GitHub Security Manager Teams can be imported using the GitHub team ID e.g.

    $ pulumi import github:index/organizationSecurityManager:OrganizationSecurityManager core 1234567
    

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

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi