1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. FeedPermission
Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi

azuredevops.FeedPermission

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi

    Manages creation of the Feed Permission within Azure DevOps organization.

    Example Usage

    Create Feed Permission

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = new azuredevops.Project("example", {name: "Example Project"});
    const exampleGroup = new azuredevops.Group("example", {
        scope: example.id,
        displayName: "Example group",
        description: "Example description",
    });
    const exampleFeed = new azuredevops.Feed("example", {name: "releases"});
    const permission = new azuredevops.FeedPermission("permission", {
        feedId: exampleFeed.id,
        role: "reader",
        identityDescriptor: exampleGroup.descriptor,
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example", name="Example Project")
    example_group = azuredevops.Group("example",
        scope=example.id,
        display_name="Example group",
        description="Example description")
    example_feed = azuredevops.Feed("example", name="releases")
    permission = azuredevops.FeedPermission("permission",
        feed_id=example_feed.id,
        role="reader",
        identity_descriptor=example_group.descriptor)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name: pulumi.String("Example Project"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleGroup, err := azuredevops.NewGroup(ctx, "example", &azuredevops.GroupArgs{
    			Scope:       example.ID(),
    			DisplayName: pulumi.String("Example group"),
    			Description: pulumi.String("Example description"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFeed, err := azuredevops.NewFeed(ctx, "example", &azuredevops.FeedArgs{
    			Name: pulumi.String("releases"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewFeedPermission(ctx, "permission", &azuredevops.FeedPermissionArgs{
    			FeedId:             exampleFeed.ID(),
    			Role:               pulumi.String("reader"),
    			IdentityDescriptor: exampleGroup.Descriptor,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
        });
    
        var exampleGroup = new AzureDevOps.Group("example", new()
        {
            Scope = example.Id,
            DisplayName = "Example group",
            Description = "Example description",
        });
    
        var exampleFeed = new AzureDevOps.Feed("example", new()
        {
            Name = "releases",
        });
    
        var permission = new AzureDevOps.FeedPermission("permission", new()
        {
            FeedId = exampleFeed.Id,
            Role = "reader",
            IdentityDescriptor = exampleGroup.Descriptor,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.Group;
    import com.pulumi.azuredevops.GroupArgs;
    import com.pulumi.azuredevops.Feed;
    import com.pulumi.azuredevops.FeedArgs;
    import com.pulumi.azuredevops.FeedPermission;
    import com.pulumi.azuredevops.FeedPermissionArgs;
    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 Project("example", ProjectArgs.builder()
                .name("Example Project")
                .build());
    
            var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
                .scope(example.id())
                .displayName("Example group")
                .description("Example description")
                .build());
    
            var exampleFeed = new Feed("exampleFeed", FeedArgs.builder()
                .name("releases")
                .build());
    
            var permission = new FeedPermission("permission", FeedPermissionArgs.builder()
                .feedId(exampleFeed.id())
                .role("reader")
                .identityDescriptor(exampleGroup.descriptor())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
      exampleGroup:
        type: azuredevops:Group
        name: example
        properties:
          scope: ${example.id}
          displayName: Example group
          description: Example description
      exampleFeed:
        type: azuredevops:Feed
        name: example
        properties:
          name: releases
      permission:
        type: azuredevops:FeedPermission
        properties:
          feedId: ${exampleFeed.id}
          role: reader
          identityDescriptor: ${exampleGroup.descriptor}
    

    Create FeedPermission Resource

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

    Constructor syntax

    new FeedPermission(name: string, args: FeedPermissionArgs, opts?: CustomResourceOptions);
    @overload
    def FeedPermission(resource_name: str,
                       args: FeedPermissionArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def FeedPermission(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       feed_id: Optional[str] = None,
                       identity_descriptor: Optional[str] = None,
                       role: Optional[str] = None,
                       display_name: Optional[str] = None,
                       project_id: Optional[str] = None)
    func NewFeedPermission(ctx *Context, name string, args FeedPermissionArgs, opts ...ResourceOption) (*FeedPermission, error)
    public FeedPermission(string name, FeedPermissionArgs args, CustomResourceOptions? opts = null)
    public FeedPermission(String name, FeedPermissionArgs args)
    public FeedPermission(String name, FeedPermissionArgs args, CustomResourceOptions options)
    
    type: azuredevops:FeedPermission
    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 FeedPermissionArgs
    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 FeedPermissionArgs
    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 FeedPermissionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FeedPermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FeedPermissionArgs
    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 feedPermissionResource = new AzureDevOps.FeedPermission("feedPermissionResource", new()
    {
        FeedId = "string",
        IdentityDescriptor = "string",
        Role = "string",
        DisplayName = "string",
        ProjectId = "string",
    });
    
    example, err := azuredevops.NewFeedPermission(ctx, "feedPermissionResource", &azuredevops.FeedPermissionArgs{
    	FeedId:             pulumi.String("string"),
    	IdentityDescriptor: pulumi.String("string"),
    	Role:               pulumi.String("string"),
    	DisplayName:        pulumi.String("string"),
    	ProjectId:          pulumi.String("string"),
    })
    
    var feedPermissionResource = new FeedPermission("feedPermissionResource", FeedPermissionArgs.builder()
        .feedId("string")
        .identityDescriptor("string")
        .role("string")
        .displayName("string")
        .projectId("string")
        .build());
    
    feed_permission_resource = azuredevops.FeedPermission("feedPermissionResource",
        feed_id="string",
        identity_descriptor="string",
        role="string",
        display_name="string",
        project_id="string")
    
    const feedPermissionResource = new azuredevops.FeedPermission("feedPermissionResource", {
        feedId: "string",
        identityDescriptor: "string",
        role: "string",
        displayName: "string",
        projectId: "string",
    });
    
    type: azuredevops:FeedPermission
    properties:
        displayName: string
        feedId: string
        identityDescriptor: string
        projectId: string
        role: string
    

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

    FeedId string
    The ID of the Feed.
    IdentityDescriptor string
    The Descriptor of identity you want to assign a role.
    Role string
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    DisplayName string
    The display name of the assignment
    ProjectId string
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    FeedId string
    The ID of the Feed.
    IdentityDescriptor string
    The Descriptor of identity you want to assign a role.
    Role string
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    DisplayName string
    The display name of the assignment
    ProjectId string
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    feedId String
    The ID of the Feed.
    identityDescriptor String
    The Descriptor of identity you want to assign a role.
    role String
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    displayName String
    The display name of the assignment
    projectId String
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    feedId string
    The ID of the Feed.
    identityDescriptor string
    The Descriptor of identity you want to assign a role.
    role string
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    displayName string
    The display name of the assignment
    projectId string
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    feed_id str
    The ID of the Feed.
    identity_descriptor str
    The Descriptor of identity you want to assign a role.
    role str
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    display_name str
    The display name of the assignment
    project_id str
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    feedId String
    The ID of the Feed.
    identityDescriptor String
    The Descriptor of identity you want to assign a role.
    role String
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    displayName String
    The display name of the assignment
    projectId String
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityId string
    The ID of the identity.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityId string
    The ID of the identity.
    id String
    The provider-assigned unique ID for this managed resource.
    identityId String
    The ID of the identity.
    id string
    The provider-assigned unique ID for this managed resource.
    identityId string
    The ID of the identity.
    id str
    The provider-assigned unique ID for this managed resource.
    identity_id str
    The ID of the identity.
    id String
    The provider-assigned unique ID for this managed resource.
    identityId String
    The ID of the identity.

    Look up Existing FeedPermission Resource

    Get an existing FeedPermission 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?: FeedPermissionState, opts?: CustomResourceOptions): FeedPermission
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            feed_id: Optional[str] = None,
            identity_descriptor: Optional[str] = None,
            identity_id: Optional[str] = None,
            project_id: Optional[str] = None,
            role: Optional[str] = None) -> FeedPermission
    func GetFeedPermission(ctx *Context, name string, id IDInput, state *FeedPermissionState, opts ...ResourceOption) (*FeedPermission, error)
    public static FeedPermission Get(string name, Input<string> id, FeedPermissionState? state, CustomResourceOptions? opts = null)
    public static FeedPermission get(String name, Output<String> id, FeedPermissionState 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:
    DisplayName string
    The display name of the assignment
    FeedId string
    The ID of the Feed.
    IdentityDescriptor string
    The Descriptor of identity you want to assign a role.
    IdentityId string
    The ID of the identity.
    ProjectId string
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    Role string
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    DisplayName string
    The display name of the assignment
    FeedId string
    The ID of the Feed.
    IdentityDescriptor string
    The Descriptor of identity you want to assign a role.
    IdentityId string
    The ID of the identity.
    ProjectId string
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    Role string
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    displayName String
    The display name of the assignment
    feedId String
    The ID of the Feed.
    identityDescriptor String
    The Descriptor of identity you want to assign a role.
    identityId String
    The ID of the identity.
    projectId String
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    role String
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    displayName string
    The display name of the assignment
    feedId string
    The ID of the Feed.
    identityDescriptor string
    The Descriptor of identity you want to assign a role.
    identityId string
    The ID of the identity.
    projectId string
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    role string
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    display_name str
    The display name of the assignment
    feed_id str
    The ID of the Feed.
    identity_descriptor str
    The Descriptor of identity you want to assign a role.
    identity_id str
    The ID of the identity.
    project_id str
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    role str
    The role to be assigned, possible values : reader, contributor, collaborator, administrator
    displayName String
    The display name of the assignment
    feedId String
    The ID of the Feed.
    identityDescriptor String
    The Descriptor of identity you want to assign a role.
    identityId String
    The ID of the identity.
    projectId String
    The ID of the Project Feed is created in. If not specified, feed will be created at the organization level.
    role String
    The role to be assigned, possible values : reader, contributor, collaborator, administrator

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi