1. Packages
  2. Athenz Provider
  3. API Docs
  4. GroupMembers
athenz 1.0.45 published on Tuesday, Apr 15, 2025 by athenz

athenz.GroupMembers

Explore with Pulumi AI


athenz.GroupMembers provides support for managing members of an existing athenz group

Example Usage

IMPORTANT NOTE: please do NOT use json syntax but only hcl syntax

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

const newgrp = new athenz.GroupMembers("newgrp", {
    auditRef: "create group",
    domain: "some_domain",
    members: [
        {
            name: "user.<user-id>",
        },
        {
            expiration: "2022-12-29 23:59:59",
            name: "<domain>.<service-name>",
        },
    ],
});
Copy
import pulumi
import pulumi_athenz as athenz

newgrp = athenz.GroupMembers("newgrp",
    audit_ref="create group",
    domain="some_domain",
    members=[
        {
            "name": "user.<user-id>",
        },
        {
            "expiration": "2022-12-29 23:59:59",
            "name": "<domain>.<service-name>",
        },
    ])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := athenz.NewGroupMembers(ctx, "newgrp", &athenz.GroupMembersArgs{
			AuditRef: pulumi.String("create group"),
			Domain:   pulumi.String("some_domain"),
			Members: athenz.GroupMembersMemberArray{
				&athenz.GroupMembersMemberArgs{
					Name: pulumi.String("user.<user-id>"),
				},
				&athenz.GroupMembersMemberArgs{
					Expiration: pulumi.String("2022-12-29 23:59:59"),
					Name:       pulumi.String("<domain>.<service-name>"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Athenz = Pulumi.Athenz;

return await Deployment.RunAsync(() => 
{
    var newgrp = new Athenz.GroupMembers("newgrp", new()
    {
        AuditRef = "create group",
        Domain = "some_domain",
        Members = new[]
        {
            new Athenz.Inputs.GroupMembersMemberArgs
            {
                Name = "user.<user-id>",
            },
            new Athenz.Inputs.GroupMembersMemberArgs
            {
                Expiration = "2022-12-29 23:59:59",
                Name = "<domain>.<service-name>",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.athenz.GroupMembers;
import com.pulumi.athenz.GroupMembersArgs;
import com.pulumi.athenz.inputs.GroupMembersMemberArgs;
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 newgrp = new GroupMembers("newgrp", GroupMembersArgs.builder()
            .auditRef("create group")
            .domain("some_domain")
            .members(            
                GroupMembersMemberArgs.builder()
                    .name("user.<user-id>")
                    .build(),
                GroupMembersMemberArgs.builder()
                    .expiration("2022-12-29 23:59:59")
                    .name("<domain>.<service-name>")
                    .build())
            .build());

    }
}
Copy
resources:
  newgrp:
    type: athenz:GroupMembers
    properties:
      auditRef: create group
      domain: some_domain
      members:
        - name: user.<user-id>
        - expiration: 2022-12-29 23:59:59
          name: <domain>.<service-name>
Copy

Create GroupMembers Resource

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

Constructor syntax

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

@overload
def GroupMembers(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 domain: Optional[str] = None,
                 audit_ref: Optional[str] = None,
                 group_members_id: Optional[str] = None,
                 members: Optional[Sequence[GroupMembersMemberArgs]] = None,
                 name: Optional[str] = None)
func NewGroupMembers(ctx *Context, name string, args GroupMembersArgs, opts ...ResourceOption) (*GroupMembers, error)
public GroupMembers(string name, GroupMembersArgs args, CustomResourceOptions? opts = null)
public GroupMembers(String name, GroupMembersArgs args)
public GroupMembers(String name, GroupMembersArgs args, CustomResourceOptions options)
type: athenz:GroupMembers
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. GroupMembersArgs
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. GroupMembersArgs
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. GroupMembersArgs
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. GroupMembersArgs
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. GroupMembersArgs
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 groupMembersResource = new Athenz.GroupMembers("groupMembersResource", new()
{
    Domain = "string",
    AuditRef = "string",
    GroupMembersId = "string",
    Members = new[]
    {
        new Athenz.Inputs.GroupMembersMemberArgs
        {
            Name = "string",
            Expiration = "string",
        },
    },
    Name = "string",
});
Copy
example, err := athenz.NewGroupMembers(ctx, "groupMembersResource", &athenz.GroupMembersArgs{
Domain: pulumi.String("string"),
AuditRef: pulumi.String("string"),
GroupMembersId: pulumi.String("string"),
Members: .GroupMembersMemberArray{
&.GroupMembersMemberArgs{
Name: pulumi.String("string"),
Expiration: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
})
Copy
var groupMembersResource = new GroupMembers("groupMembersResource", GroupMembersArgs.builder()
    .domain("string")
    .auditRef("string")
    .groupMembersId("string")
    .members(GroupMembersMemberArgs.builder()
        .name("string")
        .expiration("string")
        .build())
    .name("string")
    .build());
Copy
group_members_resource = athenz.GroupMembers("groupMembersResource",
    domain="string",
    audit_ref="string",
    group_members_id="string",
    members=[{
        "name": "string",
        "expiration": "string",
    }],
    name="string")
Copy
const groupMembersResource = new athenz.GroupMembers("groupMembersResource", {
    domain: "string",
    auditRef: "string",
    groupMembersId: "string",
    members: [{
        name: "string",
        expiration: "string",
    }],
    name: "string",
});
Copy
type: athenz:GroupMembers
properties:
    auditRef: string
    domain: string
    groupMembersId: string
    members:
        - expiration: string
          name: string
    name: string
Copy

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

Domain This property is required. string
Name of the domain that group belongs to
AuditRef string
GroupMembersId string
Members List<GroupMembersMember>
Users or services to be added as members with attribute
Name string
Name of the standard group role
Domain This property is required. string
Name of the domain that group belongs to
AuditRef string
GroupMembersId string
Members []GroupMembersMemberArgs
Users or services to be added as members with attribute
Name string
Name of the standard group role
domain This property is required. String
Name of the domain that group belongs to
auditRef String
groupMembersId String
members List<GroupMembersMember>
Users or services to be added as members with attribute
name String
Name of the standard group role
domain This property is required. string
Name of the domain that group belongs to
auditRef string
groupMembersId string
members GroupMembersMember[]
Users or services to be added as members with attribute
name string
Name of the standard group role
domain This property is required. str
Name of the domain that group belongs to
audit_ref str
group_members_id str
members Sequence[GroupMembersMemberArgs]
Users or services to be added as members with attribute
name str
Name of the standard group role
domain This property is required. String
Name of the domain that group belongs to
auditRef String
groupMembersId String
members List<Property Map>
Users or services to be added as members with attribute
name String
Name of the standard group role

Outputs

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

Get an existing GroupMembers 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?: GroupMembersState, opts?: CustomResourceOptions): GroupMembers
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        audit_ref: Optional[str] = None,
        domain: Optional[str] = None,
        group_members_id: Optional[str] = None,
        members: Optional[Sequence[GroupMembersMemberArgs]] = None,
        name: Optional[str] = None) -> GroupMembers
func GetGroupMembers(ctx *Context, name string, id IDInput, state *GroupMembersState, opts ...ResourceOption) (*GroupMembers, error)
public static GroupMembers Get(string name, Input<string> id, GroupMembersState? state, CustomResourceOptions? opts = null)
public static GroupMembers get(String name, Output<String> id, GroupMembersState state, CustomResourceOptions options)
resources:  _:    type: athenz:GroupMembers    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:
AuditRef string
Domain string
Name of the domain that group belongs to
GroupMembersId string
Members List<GroupMembersMember>
Users or services to be added as members with attribute
Name string
Name of the standard group role
AuditRef string
Domain string
Name of the domain that group belongs to
GroupMembersId string
Members []GroupMembersMemberArgs
Users or services to be added as members with attribute
Name string
Name of the standard group role
auditRef String
domain String
Name of the domain that group belongs to
groupMembersId String
members List<GroupMembersMember>
Users or services to be added as members with attribute
name String
Name of the standard group role
auditRef string
domain string
Name of the domain that group belongs to
groupMembersId string
members GroupMembersMember[]
Users or services to be added as members with attribute
name string
Name of the standard group role
audit_ref str
domain str
Name of the domain that group belongs to
group_members_id str
members Sequence[GroupMembersMemberArgs]
Users or services to be added as members with attribute
name str
Name of the standard group role
auditRef String
domain String
Name of the domain that group belongs to
groupMembersId String
members List<Property Map>
Users or services to be added as members with attribute
name String
Name of the standard group role

Supporting Types

GroupMembersMember
, GroupMembersMemberArgs

Name This property is required. string
Expiration string
The expiration of the Athenz principal member. must be in this format: <yyyy>-<mm>-<dd> <hh>:<MM>:<ss>
Name This property is required. string
Expiration string
The expiration of the Athenz principal member. must be in this format: <yyyy>-<mm>-<dd> <hh>:<MM>:<ss>
name This property is required. String
expiration String
The expiration of the Athenz principal member. must be in this format: <yyyy>-<mm>-<dd> <hh>:<MM>:<ss>
name This property is required. string
expiration string
The expiration of the Athenz principal member. must be in this format: <yyyy>-<mm>-<dd> <hh>:<MM>:<ss>
name This property is required. str
expiration str
The expiration of the Athenz principal member. must be in this format: <yyyy>-<mm>-<dd> <hh>:<MM>:<ss>
name This property is required. String
expiration String
The expiration of the Athenz principal member. must be in this format: <yyyy>-<mm>-<dd> <hh>:<MM>:<ss>

Package Details

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