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",
});
import pulumi
import pulumi_zenduty as zenduty
exampleteam = zenduty.Teams("exampleteam")
user1 = zenduty.get_user(email="demouser@gmail.com")
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
})
}
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",
});
});
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());
}
}
resources:
exampleteam:
type: zenduty:Teams
variables:
user1:
fn::invoke:
function: zenduty:getUser
arguments:
email: demouser@gmail.com
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,
});
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"])
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
})
}
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,
});
});
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());
}
}
resources:
exampleUser:
type: zenduty:Member
properties:
team: ${zenduty_teams.exampleteam.id}
user: ${data.zenduty_user.user1.users[0].username}
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 string
- The unique name of the resource.
- args MemberArgs
- 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 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 string
- The unique name of the resource.
- args MemberArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
example, err := zenduty.NewMember(ctx, "memberResource", &zenduty.MemberArgs{
Team: pulumi.String("string"),
User: pulumi.String("string"),
MemberId: pulumi.String("string"),
Role: pulumi.Float64(0),
})
var memberResource = new Member("memberResource", MemberArgs.builder()
.team("string")
.user("string")
.memberId("string")
.role(0)
.build());
member_resource = zenduty.Member("memberResource",
team="string",
user="string",
member_id="string",
role=0)
const memberResource = new zenduty.Member("memberResource", {
team: "string",
user: "string",
memberId: "string",
role: 0,
});
type: zenduty:Member
properties:
memberId: string
role: 0
team: string
user: string
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:
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
- 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.
Package Details
- Repository
- zenduty zenduty/terraform-provider-zenduty
- License
- Notes
- This Pulumi package is based on the
zenduty
Terraform Provider.