1. Packages
  2. Zenduty Provider
  3. API Docs
  4. Member
zenduty 1.0.4 published on Wednesday, Apr 2, 2025 by zenduty

zenduty.Member

Explore with Pulumi AI

zenduty.Member is a resource to manage Zenduty members.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as zenduty from "@pulumi/zenduty";

const exampleteam = new zenduty.Teams("exampleteam", {});
const user1 = zenduty.getUser({
    email: "demouser@gmail.com",
});
Copy
import pulumi
import pulumi_zenduty as zenduty

exampleteam = zenduty.Teams("exampleteam")
user1 = zenduty.get_user(email="demouser@gmail.com")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/zenduty"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zenduty.NewTeams(ctx, "exampleteam", nil)
		if err != nil {
			return err
		}
		_, err = zenduty.LookupUser(ctx, &zenduty.LookupUserArgs{
			Email: "demouser@gmail.com",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zenduty = Pulumi.Zenduty;

return await Deployment.RunAsync(() => 
{
    var exampleteam = new Zenduty.Teams("exampleteam");

    var user1 = Zenduty.GetUser.Invoke(new()
    {
        Email = "demouser@gmail.com",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zenduty.Teams;
import com.pulumi.zenduty.ZendutyFunctions;
import com.pulumi.zenduty.inputs.GetUserArgs;
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 exampleteam = new Teams("exampleteam");

        final var user1 = ZendutyFunctions.getUser(GetUserArgs.builder()
            .email("demouser@gmail.com")
            .build());

    }
}
Copy
resources:
  exampleteam:
    type: zenduty:Teams
variables:
  user1:
    fn::invoke:
      function: zenduty:getUser
      arguments:
        email: demouser@gmail.com
Copy
import * as pulumi from "@pulumi/pulumi";
import * as zenduty from "@pulumi/zenduty";

const exampleUser = new zenduty.Member("exampleUser", {
    team: zenduty_teams.exampleteam.id,
    user: data.zenduty_user.user1.users[0].username,
});
Copy
import pulumi
import pulumi_zenduty as zenduty

example_user = zenduty.Member("exampleUser",
    team=zenduty_teams["exampleteam"]["id"],
    user=data["zenduty_user"]["user1"]["users"][0]["username"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/zenduty"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zenduty.NewMember(ctx, "exampleUser", &zenduty.MemberArgs{
			Team: pulumi.Any(zenduty_teams.Exampleteam.Id),
			User: pulumi.Any(data.Zenduty_user.User1.Users[0].Username),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zenduty = Pulumi.Zenduty;

return await Deployment.RunAsync(() => 
{
    var exampleUser = new Zenduty.Member("exampleUser", new()
    {
        Team = zenduty_teams.Exampleteam.Id,
        User = data.Zenduty_user.User1.Users[0].Username,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zenduty.Member;
import com.pulumi.zenduty.MemberArgs;
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 exampleUser = new Member("exampleUser", MemberArgs.builder()
            .team(zenduty_teams.exampleteam().id())
            .user(data.zenduty_user().user1().users()[0].username())
            .build());

    }
}
Copy
resources:
  exampleUser:
    type: zenduty:Member
    properties:
      team: ${zenduty_teams.exampleteam.id}
      user: ${data.zenduty_user.user1.users[0].username}
Copy

DataTypes

Required

  • team (String)
  • user (String)

Optional

  • role (Number) - The role of the user in the team > manager(role = 1),user(role = 2)

Create Member Resource

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

Constructor syntax

new Member(name: string, args: MemberArgs, opts?: CustomResourceOptions);
@overload
def Member(resource_name: str,
           args: MemberArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Member(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           team: Optional[str] = None,
           user: Optional[str] = None,
           member_id: Optional[str] = None,
           role: Optional[float] = None)
func NewMember(ctx *Context, name string, args MemberArgs, opts ...ResourceOption) (*Member, error)
public Member(string name, MemberArgs args, CustomResourceOptions? opts = null)
public Member(String name, MemberArgs args)
public Member(String name, MemberArgs args, CustomResourceOptions options)
type: zenduty:Member
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MemberArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MemberArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MemberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MemberArgs
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 memberResource = new Zenduty.Member("memberResource", new()
{
    Team = "string",
    User = "string",
    MemberId = "string",
    Role = 0,
});
Copy
example, err := zenduty.NewMember(ctx, "memberResource", &zenduty.MemberArgs{
Team: pulumi.String("string"),
User: pulumi.String("string"),
MemberId: pulumi.String("string"),
Role: pulumi.Float64(0),
})
Copy
var memberResource = new Member("memberResource", MemberArgs.builder()
    .team("string")
    .user("string")
    .memberId("string")
    .role(0)
    .build());
Copy
member_resource = zenduty.Member("memberResource",
    team="string",
    user="string",
    member_id="string",
    role=0)
Copy
const memberResource = new zenduty.Member("memberResource", {
    team: "string",
    user: "string",
    memberId: "string",
    role: 0,
});
Copy
type: zenduty:Member
properties:
    memberId: string
    role: 0
    team: string
    user: string
Copy

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

Team This property is required. string
The Unique ID of the team to add the member to it.
User This property is required. string
The username of the user to add to the team.
MemberId string
Role double
The role of the user in the team > manager(role = 1),user(role = 2) .
Team This property is required. string
The Unique ID of the team to add the member to it.
User This property is required. string
The username of the user to add to the team.
MemberId string
Role float64
The role of the user in the team > manager(role = 1),user(role = 2) .
team This property is required. String
The Unique ID of the team to add the member to it.
user This property is required. String
The username of the user to add to the team.
memberId String
role Double
The role of the user in the team > manager(role = 1),user(role = 2) .
team This property is required. string
The Unique ID of the team to add the member to it.
user This property is required. string
The username of the user to add to the team.
memberId string
role number
The role of the user in the team > manager(role = 1),user(role = 2) .
team This property is required. str
The Unique ID of the team to add the member to it.
user This property is required. str
The username of the user to add to the team.
member_id str
role float
The role of the user in the team > manager(role = 1),user(role = 2) .
team This property is required. String
The Unique ID of the team to add the member to it.
user This property is required. String
The username of the user to add to the team.
memberId String
role Number
The role of the user in the team > manager(role = 1),user(role = 2) .

Outputs

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

Get an existing Member 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?: MemberState, opts?: CustomResourceOptions): Member
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        member_id: Optional[str] = None,
        role: Optional[float] = None,
        team: Optional[str] = None,
        user: Optional[str] = None) -> Member
func GetMember(ctx *Context, name string, id IDInput, state *MemberState, opts ...ResourceOption) (*Member, error)
public static Member Get(string name, Input<string> id, MemberState? state, CustomResourceOptions? opts = null)
public static Member get(String name, Output<String> id, MemberState state, CustomResourceOptions options)
resources:  _:    type: zenduty:Member    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
MemberId string
Role double
The role of the user in the team > manager(role = 1),user(role = 2) .
Team string
The Unique ID of the team to add the member to it.
User string
The username of the user to add to the team.
MemberId string
Role float64
The role of the user in the team > manager(role = 1),user(role = 2) .
Team string
The Unique ID of the team to add the member to it.
User string
The username of the user to add to the team.
memberId String
role Double
The role of the user in the team > manager(role = 1),user(role = 2) .
team String
The Unique ID of the team to add the member to it.
user String
The username of the user to add to the team.
memberId string
role number
The role of the user in the team > manager(role = 1),user(role = 2) .
team string
The Unique ID of the team to add the member to it.
user string
The username of the user to add to the team.
member_id str
role float
The role of the user in the team > manager(role = 1),user(role = 2) .
team str
The Unique ID of the team to add the member to it.
user str
The username of the user to add to the team.
memberId String
role Number
The role of the user in the team > manager(role = 1),user(role = 2) .
team String
The Unique ID of the team to add the member to it.
user String
The username of the user to add to the team.

Package Details

Repository
zenduty zenduty/terraform-provider-zenduty
License
Notes
This Pulumi package is based on the zenduty Terraform Provider.