-
Notifications
You must be signed in to change notification settings - Fork 8
/
groupV3.go
140 lines (127 loc) · 4.25 KB
/
groupV3.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package identity
import (
"reflect"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Manages a V3 group resource within OpenStack Keystone.
//
// Note: You _must_ have admin privileges in your OpenStack cloud to use
// this resource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-openstack/sdk/v2/go/openstack/identity"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := identity.NewGroupV3(ctx, "group1", &identity.GroupV3Args{
// Description: pulumi.String("group 1"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type GroupV3 struct {
pulumi.CustomResourceState
// A description of the group.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The domain the group belongs to.
DomainId pulumi.StringOutput `pulumi:"domainId"`
// The name of the group.
Name pulumi.StringOutput `pulumi:"name"`
// The region in which to obtain the V3 Keystone client.
// If omitted, the `region` argument of the provider is used. Changing this
// creates a new group.
Region pulumi.StringOutput `pulumi:"region"`
}
// NewGroupV3 registers a new resource with the given unique name, arguments, and options.
func NewGroupV3(ctx *pulumi.Context,
name string, args *GroupV3Args, opts ...pulumi.ResourceOption) (*GroupV3, error) {
if args == nil {
args = &GroupV3Args{}
}
var resource GroupV3
err := ctx.RegisterResource("openstack:identity/groupV3:GroupV3", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupV3 gets an existing GroupV3 resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupV3(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupV3State, opts ...pulumi.ResourceOption) (*GroupV3, error) {
var resource GroupV3
err := ctx.ReadResource("openstack:identity/groupV3:GroupV3", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupV3 resources.
type groupV3State struct {
// A description of the group.
Description *string `pulumi:"description"`
// The domain the group belongs to.
DomainId *string `pulumi:"domainId"`
// The name of the group.
Name *string `pulumi:"name"`
// The region in which to obtain the V3 Keystone client.
// If omitted, the `region` argument of the provider is used. Changing this
// creates a new group.
Region *string `pulumi:"region"`
}
type GroupV3State struct {
// A description of the group.
Description pulumi.StringPtrInput
// The domain the group belongs to.
DomainId pulumi.StringPtrInput
// The name of the group.
Name pulumi.StringPtrInput
// The region in which to obtain the V3 Keystone client.
// If omitted, the `region` argument of the provider is used. Changing this
// creates a new group.
Region pulumi.StringPtrInput
}
func (GroupV3State) ElementType() reflect.Type {
return reflect.TypeOf((*groupV3State)(nil)).Elem()
}
type groupV3Args struct {
// A description of the group.
Description *string `pulumi:"description"`
// The domain the group belongs to.
DomainId *string `pulumi:"domainId"`
// The name of the group.
Name *string `pulumi:"name"`
// The region in which to obtain the V3 Keystone client.
// If omitted, the `region` argument of the provider is used. Changing this
// creates a new group.
Region *string `pulumi:"region"`
}
// The set of arguments for constructing a GroupV3 resource.
type GroupV3Args struct {
// A description of the group.
Description pulumi.StringPtrInput
// The domain the group belongs to.
DomainId pulumi.StringPtrInput
// The name of the group.
Name pulumi.StringPtrInput
// The region in which to obtain the V3 Keystone client.
// If omitted, the `region` argument of the provider is used. Changing this
// creates a new group.
Region pulumi.StringPtrInput
}
func (GroupV3Args) ElementType() reflect.Type {
return reflect.TypeOf((*groupV3Args)(nil)).Elem()
}