github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/rbac/v1/clusterRoleBindingPatch.go (about) 1 // Code generated by pulumigen DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package v1 5 6 import ( 7 "context" 8 "reflect" 9 10 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Patch resources are used to modify existing Kubernetes resources by using 15 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 16 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 17 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 18 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 19 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 20 // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. 21 type ClusterRoleBindingPatch struct { 22 pulumi.CustomResourceState 23 24 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 25 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 26 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 27 Kind pulumi.StringPtrOutput `pulumi:"kind"` 28 // Standard object's metadata. 29 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 30 // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. 31 RoleRef RoleRefPatchPtrOutput `pulumi:"roleRef"` 32 // Subjects holds references to the objects the role applies to. 33 Subjects SubjectPatchArrayOutput `pulumi:"subjects"` 34 } 35 36 // NewClusterRoleBindingPatch registers a new resource with the given unique name, arguments, and options. 37 func NewClusterRoleBindingPatch(ctx *pulumi.Context, 38 name string, args *ClusterRoleBindingPatchArgs, opts ...pulumi.ResourceOption) (*ClusterRoleBindingPatch, error) { 39 if args == nil { 40 args = &ClusterRoleBindingPatchArgs{} 41 } 42 43 args.ApiVersion = pulumi.StringPtr("rbac.authorization.k8s.io/v1") 44 args.Kind = pulumi.StringPtr("ClusterRoleBinding") 45 aliases := pulumi.Aliases([]pulumi.Alias{ 46 { 47 Type: pulumi.String("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBindingPatch"), 48 }, 49 { 50 Type: pulumi.String("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBindingPatch"), 51 }, 52 }) 53 opts = append(opts, aliases) 54 var resource ClusterRoleBindingPatch 55 err := ctx.RegisterResource("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBindingPatch", name, args, &resource, opts...) 56 if err != nil { 57 return nil, err 58 } 59 return &resource, nil 60 } 61 62 // GetClusterRoleBindingPatch gets an existing ClusterRoleBindingPatch resource's state with the given name, ID, and optional 63 // state properties that are used to uniquely qualify the lookup (nil if not required). 64 func GetClusterRoleBindingPatch(ctx *pulumi.Context, 65 name string, id pulumi.IDInput, state *ClusterRoleBindingPatchState, opts ...pulumi.ResourceOption) (*ClusterRoleBindingPatch, error) { 66 var resource ClusterRoleBindingPatch 67 err := ctx.ReadResource("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBindingPatch", name, id, state, &resource, opts...) 68 if err != nil { 69 return nil, err 70 } 71 return &resource, nil 72 } 73 74 // Input properties used for looking up and filtering ClusterRoleBindingPatch resources. 75 type clusterRoleBindingPatchState struct { 76 } 77 78 type ClusterRoleBindingPatchState struct { 79 } 80 81 func (ClusterRoleBindingPatchState) ElementType() reflect.Type { 82 return reflect.TypeOf((*clusterRoleBindingPatchState)(nil)).Elem() 83 } 84 85 type clusterRoleBindingPatchArgs struct { 86 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 87 ApiVersion *string `pulumi:"apiVersion"` 88 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 89 Kind *string `pulumi:"kind"` 90 // Standard object's metadata. 91 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 92 // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. 93 RoleRef *RoleRefPatch `pulumi:"roleRef"` 94 // Subjects holds references to the objects the role applies to. 95 Subjects []SubjectPatch `pulumi:"subjects"` 96 } 97 98 // The set of arguments for constructing a ClusterRoleBindingPatch resource. 99 type ClusterRoleBindingPatchArgs struct { 100 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 101 ApiVersion pulumi.StringPtrInput 102 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 103 Kind pulumi.StringPtrInput 104 // Standard object's metadata. 105 Metadata metav1.ObjectMetaPatchPtrInput 106 // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. 107 RoleRef RoleRefPatchPtrInput 108 // Subjects holds references to the objects the role applies to. 109 Subjects SubjectPatchArrayInput 110 } 111 112 func (ClusterRoleBindingPatchArgs) ElementType() reflect.Type { 113 return reflect.TypeOf((*clusterRoleBindingPatchArgs)(nil)).Elem() 114 } 115 116 type ClusterRoleBindingPatchInput interface { 117 pulumi.Input 118 119 ToClusterRoleBindingPatchOutput() ClusterRoleBindingPatchOutput 120 ToClusterRoleBindingPatchOutputWithContext(ctx context.Context) ClusterRoleBindingPatchOutput 121 } 122 123 func (*ClusterRoleBindingPatch) ElementType() reflect.Type { 124 return reflect.TypeOf((**ClusterRoleBindingPatch)(nil)).Elem() 125 } 126 127 func (i *ClusterRoleBindingPatch) ToClusterRoleBindingPatchOutput() ClusterRoleBindingPatchOutput { 128 return i.ToClusterRoleBindingPatchOutputWithContext(context.Background()) 129 } 130 131 func (i *ClusterRoleBindingPatch) ToClusterRoleBindingPatchOutputWithContext(ctx context.Context) ClusterRoleBindingPatchOutput { 132 return pulumi.ToOutputWithContext(ctx, i).(ClusterRoleBindingPatchOutput) 133 } 134 135 // ClusterRoleBindingPatchArrayInput is an input type that accepts ClusterRoleBindingPatchArray and ClusterRoleBindingPatchArrayOutput values. 136 // You can construct a concrete instance of `ClusterRoleBindingPatchArrayInput` via: 137 // 138 // ClusterRoleBindingPatchArray{ ClusterRoleBindingPatchArgs{...} } 139 type ClusterRoleBindingPatchArrayInput interface { 140 pulumi.Input 141 142 ToClusterRoleBindingPatchArrayOutput() ClusterRoleBindingPatchArrayOutput 143 ToClusterRoleBindingPatchArrayOutputWithContext(context.Context) ClusterRoleBindingPatchArrayOutput 144 } 145 146 type ClusterRoleBindingPatchArray []ClusterRoleBindingPatchInput 147 148 func (ClusterRoleBindingPatchArray) ElementType() reflect.Type { 149 return reflect.TypeOf((*[]*ClusterRoleBindingPatch)(nil)).Elem() 150 } 151 152 func (i ClusterRoleBindingPatchArray) ToClusterRoleBindingPatchArrayOutput() ClusterRoleBindingPatchArrayOutput { 153 return i.ToClusterRoleBindingPatchArrayOutputWithContext(context.Background()) 154 } 155 156 func (i ClusterRoleBindingPatchArray) ToClusterRoleBindingPatchArrayOutputWithContext(ctx context.Context) ClusterRoleBindingPatchArrayOutput { 157 return pulumi.ToOutputWithContext(ctx, i).(ClusterRoleBindingPatchArrayOutput) 158 } 159 160 // ClusterRoleBindingPatchMapInput is an input type that accepts ClusterRoleBindingPatchMap and ClusterRoleBindingPatchMapOutput values. 161 // You can construct a concrete instance of `ClusterRoleBindingPatchMapInput` via: 162 // 163 // ClusterRoleBindingPatchMap{ "key": ClusterRoleBindingPatchArgs{...} } 164 type ClusterRoleBindingPatchMapInput interface { 165 pulumi.Input 166 167 ToClusterRoleBindingPatchMapOutput() ClusterRoleBindingPatchMapOutput 168 ToClusterRoleBindingPatchMapOutputWithContext(context.Context) ClusterRoleBindingPatchMapOutput 169 } 170 171 type ClusterRoleBindingPatchMap map[string]ClusterRoleBindingPatchInput 172 173 func (ClusterRoleBindingPatchMap) ElementType() reflect.Type { 174 return reflect.TypeOf((*map[string]*ClusterRoleBindingPatch)(nil)).Elem() 175 } 176 177 func (i ClusterRoleBindingPatchMap) ToClusterRoleBindingPatchMapOutput() ClusterRoleBindingPatchMapOutput { 178 return i.ToClusterRoleBindingPatchMapOutputWithContext(context.Background()) 179 } 180 181 func (i ClusterRoleBindingPatchMap) ToClusterRoleBindingPatchMapOutputWithContext(ctx context.Context) ClusterRoleBindingPatchMapOutput { 182 return pulumi.ToOutputWithContext(ctx, i).(ClusterRoleBindingPatchMapOutput) 183 } 184 185 type ClusterRoleBindingPatchOutput struct{ *pulumi.OutputState } 186 187 func (ClusterRoleBindingPatchOutput) ElementType() reflect.Type { 188 return reflect.TypeOf((**ClusterRoleBindingPatch)(nil)).Elem() 189 } 190 191 func (o ClusterRoleBindingPatchOutput) ToClusterRoleBindingPatchOutput() ClusterRoleBindingPatchOutput { 192 return o 193 } 194 195 func (o ClusterRoleBindingPatchOutput) ToClusterRoleBindingPatchOutputWithContext(ctx context.Context) ClusterRoleBindingPatchOutput { 196 return o 197 } 198 199 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 200 func (o ClusterRoleBindingPatchOutput) ApiVersion() pulumi.StringPtrOutput { 201 return o.ApplyT(func(v *ClusterRoleBindingPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 202 } 203 204 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 205 func (o ClusterRoleBindingPatchOutput) Kind() pulumi.StringPtrOutput { 206 return o.ApplyT(func(v *ClusterRoleBindingPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 207 } 208 209 // Standard object's metadata. 210 func (o ClusterRoleBindingPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 211 return o.ApplyT(func(v *ClusterRoleBindingPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 212 } 213 214 // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. 215 func (o ClusterRoleBindingPatchOutput) RoleRef() RoleRefPatchPtrOutput { 216 return o.ApplyT(func(v *ClusterRoleBindingPatch) RoleRefPatchPtrOutput { return v.RoleRef }).(RoleRefPatchPtrOutput) 217 } 218 219 // Subjects holds references to the objects the role applies to. 220 func (o ClusterRoleBindingPatchOutput) Subjects() SubjectPatchArrayOutput { 221 return o.ApplyT(func(v *ClusterRoleBindingPatch) SubjectPatchArrayOutput { return v.Subjects }).(SubjectPatchArrayOutput) 222 } 223 224 type ClusterRoleBindingPatchArrayOutput struct{ *pulumi.OutputState } 225 226 func (ClusterRoleBindingPatchArrayOutput) ElementType() reflect.Type { 227 return reflect.TypeOf((*[]*ClusterRoleBindingPatch)(nil)).Elem() 228 } 229 230 func (o ClusterRoleBindingPatchArrayOutput) ToClusterRoleBindingPatchArrayOutput() ClusterRoleBindingPatchArrayOutput { 231 return o 232 } 233 234 func (o ClusterRoleBindingPatchArrayOutput) ToClusterRoleBindingPatchArrayOutputWithContext(ctx context.Context) ClusterRoleBindingPatchArrayOutput { 235 return o 236 } 237 238 func (o ClusterRoleBindingPatchArrayOutput) Index(i pulumi.IntInput) ClusterRoleBindingPatchOutput { 239 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterRoleBindingPatch { 240 return vs[0].([]*ClusterRoleBindingPatch)[vs[1].(int)] 241 }).(ClusterRoleBindingPatchOutput) 242 } 243 244 type ClusterRoleBindingPatchMapOutput struct{ *pulumi.OutputState } 245 246 func (ClusterRoleBindingPatchMapOutput) ElementType() reflect.Type { 247 return reflect.TypeOf((*map[string]*ClusterRoleBindingPatch)(nil)).Elem() 248 } 249 250 func (o ClusterRoleBindingPatchMapOutput) ToClusterRoleBindingPatchMapOutput() ClusterRoleBindingPatchMapOutput { 251 return o 252 } 253 254 func (o ClusterRoleBindingPatchMapOutput) ToClusterRoleBindingPatchMapOutputWithContext(ctx context.Context) ClusterRoleBindingPatchMapOutput { 255 return o 256 } 257 258 func (o ClusterRoleBindingPatchMapOutput) MapIndex(k pulumi.StringInput) ClusterRoleBindingPatchOutput { 259 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterRoleBindingPatch { 260 return vs[0].(map[string]*ClusterRoleBindingPatch)[vs[1].(string)] 261 }).(ClusterRoleBindingPatchOutput) 262 } 263 264 func init() { 265 pulumi.RegisterInputType(reflect.TypeOf((*ClusterRoleBindingPatchInput)(nil)).Elem(), &ClusterRoleBindingPatch{}) 266 pulumi.RegisterInputType(reflect.TypeOf((*ClusterRoleBindingPatchArrayInput)(nil)).Elem(), ClusterRoleBindingPatchArray{}) 267 pulumi.RegisterInputType(reflect.TypeOf((*ClusterRoleBindingPatchMapInput)(nil)).Elem(), ClusterRoleBindingPatchMap{}) 268 pulumi.RegisterOutputType(ClusterRoleBindingPatchOutput{}) 269 pulumi.RegisterOutputType(ClusterRoleBindingPatchArrayOutput{}) 270 pulumi.RegisterOutputType(ClusterRoleBindingPatchMapOutput{}) 271 }