Documentation
¶
Overview ¶
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package apikeys provides types and methods for managing apikeys GCP resources.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package apikeys defines operations in the declarative SDK.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func DCLKeySchema() *dcl.Schema
- type Client
- func (c *Client) ApplyKey(ctx context.Context, rawDesired *Key, opts ...dcl.ApplyOption) (*Key, error)
- func (c *Client) DeleteAllKey(ctx context.Context, project string, filter func(*Key) bool) error
- func (c *Client) DeleteKey(ctx context.Context, r *Key) error
- func (c *Client) GetKey(ctx context.Context, r *Key) (*Key, error)
- func (c *Client) ListKey(ctx context.Context, project string) (*KeyList, error)
- func (c *Client) ListKeyWithMaxResults(ctx context.Context, project string, pageSize int32) (*KeyList, error)
- type Key
- type KeyList
- type KeyRestrictions
- type KeyRestrictionsAndroidKeyRestrictions
- type KeyRestrictionsAndroidKeyRestrictionsAllowedApplications
- func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) Empty() bool
- func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) HashCode() string
- func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) String() string
- func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) UnmarshalJSON(data []byte) error
- type KeyRestrictionsApiTargets
- type KeyRestrictionsBrowserKeyRestrictions
- type KeyRestrictionsIosKeyRestrictions
- type KeyRestrictionsServerKeyRestrictions
Constants ¶
const KeyMaxPage = -1
Variables ¶
var YAML_key []byte
Functions ¶
func DCLKeySchema ¶ added in v1.10.3
Types ¶
type Client ¶
The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.
func (*Client) DeleteAllKey ¶
DeleteAllKey deletes all resources that the filter functions returns true on.
type Key ¶
type Key struct {
Name *string `json:"name"`
DisplayName *string `json:"displayName"`
KeyString *string `json:"keyString"`
Uid *string `json:"uid"`
ServiceAccountEmail *string `json:"serviceAccountEmail"`
Restrictions *KeyRestrictions `json:"restrictions"`
Project *string `json:"project"`
}
func (*Key) Describe ¶
func (r *Key) Describe() dcl.ServiceTypeVersion
Describe returns a simple description of this resource to ensure that automated tools can identify it.
type KeyRestrictions ¶
type KeyRestrictions struct {
BrowserKeyRestrictions *KeyRestrictionsBrowserKeyRestrictions `json:"browserKeyRestrictions"`
ServerKeyRestrictions *KeyRestrictionsServerKeyRestrictions `json:"serverKeyRestrictions"`
AndroidKeyRestrictions *KeyRestrictionsAndroidKeyRestrictions `json:"androidKeyRestrictions"`
IosKeyRestrictions *KeyRestrictionsIosKeyRestrictions `json:"iosKeyRestrictions"`
ApiTargets []KeyRestrictionsApiTargets `json:"apiTargets"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictions *KeyRestrictions = &KeyRestrictions{empty: true}
This object is used to assert a desired state where this KeyRestrictions is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictions) Empty ¶
func (r *KeyRestrictions) Empty() bool
func (*KeyRestrictions) HashCode ¶
func (r *KeyRestrictions) HashCode() string
func (*KeyRestrictions) String ¶
func (r *KeyRestrictions) String() string
func (*KeyRestrictions) UnmarshalJSON ¶
func (r *KeyRestrictions) UnmarshalJSON(data []byte) error
type KeyRestrictionsAndroidKeyRestrictions ¶
type KeyRestrictionsAndroidKeyRestrictions struct {
AllowedApplications []KeyRestrictionsAndroidKeyRestrictionsAllowedApplications `json:"allowedApplications"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictionsAndroidKeyRestrictions *KeyRestrictionsAndroidKeyRestrictions = &KeyRestrictionsAndroidKeyRestrictions{empty: true}
This object is used to assert a desired state where this KeyRestrictionsAndroidKeyRestrictions is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictionsAndroidKeyRestrictions) Empty ¶
func (r *KeyRestrictionsAndroidKeyRestrictions) Empty() bool
func (*KeyRestrictionsAndroidKeyRestrictions) HashCode ¶
func (r *KeyRestrictionsAndroidKeyRestrictions) HashCode() string
func (*KeyRestrictionsAndroidKeyRestrictions) String ¶
func (r *KeyRestrictionsAndroidKeyRestrictions) String() string
func (*KeyRestrictionsAndroidKeyRestrictions) UnmarshalJSON ¶
func (r *KeyRestrictionsAndroidKeyRestrictions) UnmarshalJSON(data []byte) error
type KeyRestrictionsAndroidKeyRestrictionsAllowedApplications ¶
type KeyRestrictionsAndroidKeyRestrictionsAllowedApplications struct {
Sha1Fingerprint *string `json:"sha1Fingerprint"`
PackageName *string `json:"packageName"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictionsAndroidKeyRestrictionsAllowedApplications *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications = &KeyRestrictionsAndroidKeyRestrictionsAllowedApplications{empty: true}
This object is used to assert a desired state where this KeyRestrictionsAndroidKeyRestrictionsAllowedApplications is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) Empty ¶
func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) Empty() bool
func (*KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) HashCode ¶
func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) HashCode() string
func (*KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) String ¶
func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) String() string
func (*KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) UnmarshalJSON ¶
func (r *KeyRestrictionsAndroidKeyRestrictionsAllowedApplications) UnmarshalJSON(data []byte) error
type KeyRestrictionsApiTargets ¶
type KeyRestrictionsApiTargets struct {
Service *string `json:"service"`
Methods []string `json:"methods"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictionsApiTargets *KeyRestrictionsApiTargets = &KeyRestrictionsApiTargets{empty: true}
This object is used to assert a desired state where this KeyRestrictionsApiTargets is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictionsApiTargets) Empty ¶
func (r *KeyRestrictionsApiTargets) Empty() bool
func (*KeyRestrictionsApiTargets) HashCode ¶
func (r *KeyRestrictionsApiTargets) HashCode() string
func (*KeyRestrictionsApiTargets) String ¶
func (r *KeyRestrictionsApiTargets) String() string
func (*KeyRestrictionsApiTargets) UnmarshalJSON ¶
func (r *KeyRestrictionsApiTargets) UnmarshalJSON(data []byte) error
type KeyRestrictionsBrowserKeyRestrictions ¶
type KeyRestrictionsBrowserKeyRestrictions struct {
AllowedReferrers []string `json:"allowedReferrers"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictionsBrowserKeyRestrictions *KeyRestrictionsBrowserKeyRestrictions = &KeyRestrictionsBrowserKeyRestrictions{empty: true}
This object is used to assert a desired state where this KeyRestrictionsBrowserKeyRestrictions is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictionsBrowserKeyRestrictions) Empty ¶
func (r *KeyRestrictionsBrowserKeyRestrictions) Empty() bool
func (*KeyRestrictionsBrowserKeyRestrictions) HashCode ¶
func (r *KeyRestrictionsBrowserKeyRestrictions) HashCode() string
func (*KeyRestrictionsBrowserKeyRestrictions) String ¶
func (r *KeyRestrictionsBrowserKeyRestrictions) String() string
func (*KeyRestrictionsBrowserKeyRestrictions) UnmarshalJSON ¶
func (r *KeyRestrictionsBrowserKeyRestrictions) UnmarshalJSON(data []byte) error
type KeyRestrictionsIosKeyRestrictions ¶
type KeyRestrictionsIosKeyRestrictions struct {
AllowedBundleIds []string `json:"allowedBundleIds"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictionsIosKeyRestrictions *KeyRestrictionsIosKeyRestrictions = &KeyRestrictionsIosKeyRestrictions{empty: true}
This object is used to assert a desired state where this KeyRestrictionsIosKeyRestrictions is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictionsIosKeyRestrictions) Empty ¶
func (r *KeyRestrictionsIosKeyRestrictions) Empty() bool
func (*KeyRestrictionsIosKeyRestrictions) HashCode ¶
func (r *KeyRestrictionsIosKeyRestrictions) HashCode() string
func (*KeyRestrictionsIosKeyRestrictions) String ¶
func (r *KeyRestrictionsIosKeyRestrictions) String() string
func (*KeyRestrictionsIosKeyRestrictions) UnmarshalJSON ¶
func (r *KeyRestrictionsIosKeyRestrictions) UnmarshalJSON(data []byte) error
type KeyRestrictionsServerKeyRestrictions ¶
type KeyRestrictionsServerKeyRestrictions struct {
AllowedIps []string `json:"allowedIps"`
// contains filtered or unexported fields
}
var EmptyKeyRestrictionsServerKeyRestrictions *KeyRestrictionsServerKeyRestrictions = &KeyRestrictionsServerKeyRestrictions{empty: true}
This object is used to assert a desired state where this KeyRestrictionsServerKeyRestrictions is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*KeyRestrictionsServerKeyRestrictions) Empty ¶
func (r *KeyRestrictionsServerKeyRestrictions) Empty() bool
func (*KeyRestrictionsServerKeyRestrictions) HashCode ¶
func (r *KeyRestrictionsServerKeyRestrictions) HashCode() string
func (*KeyRestrictionsServerKeyRestrictions) String ¶
func (r *KeyRestrictionsServerKeyRestrictions) String() string
func (*KeyRestrictionsServerKeyRestrictions) UnmarshalJSON ¶
func (r *KeyRestrictionsServerKeyRestrictions) UnmarshalJSON(data []byte) error