Documentation ¶
Overview ¶
Copyright 2023 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 alpha defines operations in the declarative SDK.
Copyright 2023 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 configcontroller provides functions to manage Config Controller resources.
Copyright 2023 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 2023 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 2023 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 DCLInstanceSchema() *dcl.Schema
- func EncodeInstanceCreateRequest(m map[string]interface{}) map[string]interface{}
- type Client
- func (c *Client) ApplyInstance(ctx context.Context, rawDesired *Instance, opts ...dcl.ApplyOption) (*Instance, error)
- func (c *Client) DeleteAllInstance(ctx context.Context, project, location string, filter func(*Instance) bool) error
- func (c *Client) DeleteInstance(ctx context.Context, r *Instance) error
- func (c *Client) GetInstance(ctx context.Context, r *Instance) (*Instance, error)
- func (c *Client) ListInstance(ctx context.Context, project, location string) (*InstanceList, error)
- func (c *Client) ListInstanceWithMaxResults(ctx context.Context, project, location string, pageSize int32) (*InstanceList, error)
- type Instance
- func (r *Instance) Describe() dcl.ServiceTypeVersion
- func (r *Instance) GetPolicy(basePath string) (string, string, *bytes.Buffer, error)
- func (r *Instance) IAMPolicyVersion() int
- func (r *Instance) ID() (string, error)
- func (r *Instance) SetPolicyURL(userBasePath string) string
- func (r *Instance) SetPolicyVerb() string
- func (r *Instance) String() string
- type InstanceBundlesConfig
- type InstanceBundlesConfigConfigControllerConfig
- type InstanceList
- type InstanceManagementConfig
- type InstanceManagementConfigFullManagementConfig
- type InstanceManagementConfigStandardManagementConfig
- func (r *InstanceManagementConfigStandardManagementConfig) Empty() bool
- func (r *InstanceManagementConfigStandardManagementConfig) HashCode() string
- func (r *InstanceManagementConfigStandardManagementConfig) String() string
- func (r *InstanceManagementConfigStandardManagementConfig) UnmarshalJSON(data []byte) error
- type InstanceStateEnum
Constants ¶
const InstanceMaxPage = -1
Variables ¶
var YAML_instance = []byte("info:\n title: ConfigController/Instance\n description: The ConfigController Instance resource\n x-dcl-struct-name: Instance\n x-dcl-has-iam: false\npaths:\n get:\n description: The function used to get information about a Instance\n parameters:\n - name: instance\n required: true\n description: A full instance of a Instance\n apply:\n description: The function used to apply information about a Instance\n parameters:\n - name: instance\n required: true\n description: A full instance of a Instance\n delete:\n description: The function used to delete a Instance\n parameters:\n - name: instance\n required: true\n description: A full instance of a Instance\n deleteAll:\n description: The function used to delete all Instance\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Instance\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Instance:\n title: Instance\n x-dcl-id: projects/{{project}}/locations/{{location}}/krmApiHosts/{{name}}\n x-dcl-parent-container: project\n x-dcl-labels: labels\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - managementConfig\n - project\n - location\n properties:\n gkeResourceLink:\n type: string\n x-dcl-go-name: GkeResourceLink\n readOnly: true\n description: Output only. KrmApiHost GCP self link used for identifying\n the underlying endpoint (GKE cluster currently).\n x-kubernetes-immutable: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: Labels are used for additional information for a KrmApiHost.\n x-kubernetes-immutable: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n managementConfig:\n type: object\n x-dcl-go-name: ManagementConfig\n x-dcl-go-type: InstanceManagementConfig\n description: Configuration of the cluster management\n x-kubernetes-immutable: true\n properties:\n fullManagementConfig:\n type: object\n x-dcl-go-name: FullManagementConfig\n x-dcl-go-type: InstanceManagementConfigFullManagementConfig\n description: Configuration of the full (Autopilot) cluster management\n x-kubernetes-immutable: true\n x-dcl-conflicts:\n - standardManagementConfig\n x-dcl-server-default: true\n x-dcl-send-empty: true\n properties:\n clusterCidrBlock:\n type: string\n x-dcl-go-name: ClusterCidrBlock\n description: The IP address range for the cluster pod IPs. Set to\n blank to have a range chosen with the default size. Set to /netmask\n (e.g. /14) to have a range chosen with a specific netmask. Set\n to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private\n networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick\n a specific range to use.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n clusterNamedRange:\n type: string\n x-dcl-go-name: ClusterNamedRange\n description: The name of the existing secondary range in the cluster's\n subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block\n can be used to automatically create a GKE-managed one.\n x-kubernetes-immutable: true\n manBlock:\n type: string\n x-dcl-go-name: ManBlock\n description: Master Authorized Network. Allows access to the k8s\n master from this block.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n masterIPv4CidrBlock:\n type: string\n x-dcl-go-name: MasterIPv4CidrBlock\n description: The /28 network that the masters will use.\n x-kubernetes-immutable: true\n network:\n type: string\n x-dcl-go-name: Network\n description: Existing VPC Network to put the GKE cluster and nodes\n in.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n x-dcl-references:\n - resource: Compute/Network\n field: name\n servicesCidrBlock:\n type: string\n x-dcl-go-name: ServicesCidrBlock\n description: The IP address range for the cluster service IPs. Set\n to blank to have a range chosen with the default size. Set to\n /netmask (e.g. /14) to have a range chosen with a specific netmask.\n Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private\n networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick\n a specific range to use.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n servicesNamedRange:\n type: string\n x-dcl-go-name: ServicesNamedRange\n description: The name of the existing secondary range in the cluster's\n subnetwork to use for service ClusterIPs. Alternatively, services_cidr_block\n can be used to automatically create a GKE-managed one.\n x-kubernetes-immutable: true\n standardManagementConfig:\n type: object\n x-dcl-go-name: StandardManagementConfig\n x-dcl-go-type: InstanceManagementConfigStandardManagementConfig\n description: Configuration of the standard (GKE) cluster management\n x-kubernetes-immutable: true\n x-dcl-conflicts:\n - fullManagementConfig\n required:\n - masterIPv4CidrBlock\n properties:\n clusterCidrBlock:\n type: string\n x-dcl-go-name: ClusterCidrBlock\n description: The IP address range for the cluster pod IPs. Set to\n blank to have a range chosen with the default size. Set to /netmask\n (e.g. /14) to have a range chosen with a specific netmask. Set\n to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private\n networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick\n a specific range to use.\n x-kubernetes-immutable: true\n clusterNamedRange:\n type: string\n x-dcl-go-name: ClusterNamedRange\n description: The name of the existing secondary range in the cluster's\n subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block\n can be used to automatically create a GKE-managed one.\n x-kubernetes-immutable: true\n manBlock:\n type: string\n x-dcl-go-name: ManBlock\n description: Master Authorized Network. Allows access to the k8s\n master from this block.\n x-kubernetes-immutable: true\n x-dcl-server-default: true\n masterIPv4CidrBlock:\n type: string\n x-dcl-go-name: MasterIPv4CidrBlock\n description: The /28 network that the masters will use.\n x-kubernetes-immutable: true\n network:\n type: string\n x-dcl-go-name: Network\n description: Existing VPC Network to put the GKE cluster and nodes\n in.\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Compute/Network\n field: name\n servicesCidrBlock:\n type: string\n x-dcl-go-name: ServicesCidrBlock\n description: The IP address range for the cluster service IPs. Set\n to blank to have a range chosen with the default size. Set to\n /netmask (e.g. /14) to have a range chosen with a specific netmask.\n Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private\n networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick\n a specific range to use.\n x-kubernetes-immutable: true\n servicesNamedRange:\n type: string\n x-dcl-go-name: ServicesNamedRange\n description: The name of the existing secondary range in the cluster's\n subnetwork to use for service ClusterIPs. Alternatively, services_cidr_block\n can be used to automatically create a GKE-managed one.\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: 'The name of this KrmApiHost resource in the format: ''projects/{project_id}/locations/{location}/krmApiHosts/{krm_api_host_id}''.'\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: InstanceStateEnum\n readOnly: true\n description: 'Output only. The current state of the internal state machine\n for the KrmApiHost. Possible values: STATE_UNSPECIFIED, CREATING, RUNNING,\n DELETING, SUSPENDED, READ_ONLY'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - CREATING\n - RUNNING\n - DELETING\n - SUSPENDED\n - READ_ONLY\n usePrivateEndpoint:\n type: boolean\n x-dcl-go-name: UsePrivateEndpoint\n description: Only allow access to the master's private endpoint IP.\n x-kubernetes-immutable: true\n")
blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/configcontroller/alpha/instance.yaml
Functions ¶
func DCLInstanceSchema ¶ added in v1.10.3
func EncodeInstanceCreateRequest ¶
EncodeInstanceCreateRequest enables the Config Controller option (adds the `bundlesConfig` field) for all the create requests for a ConfigController Instance.
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) ApplyInstance ¶
func (*Client) DeleteAllInstance ¶
func (c *Client) DeleteAllInstance(ctx context.Context, project, location string, filter func(*Instance) bool) error
DeleteAllInstance deletes all resources that the filter functions returns true on.
func (*Client) DeleteInstance ¶
func (*Client) GetInstance ¶
func (*Client) ListInstance ¶
func (*Client) ListInstanceWithMaxResults ¶
type Instance ¶
type Instance struct { Name *string `json:"name"` Labels map[string]string `json:"labels"` BundlesConfig *InstanceBundlesConfig `json:"bundlesConfig"` UsePrivateEndpoint *bool `json:"usePrivateEndpoint"` GkeResourceLink *string `json:"gkeResourceLink"` State *InstanceStateEnum `json:"state"` ManagementConfig *InstanceManagementConfig `json:"managementConfig"` Project *string `json:"project"` Location *string `json:"location"` }
func (*Instance) Describe ¶
func (r *Instance) Describe() dcl.ServiceTypeVersion
Describe returns a simple description of this resource to ensure that automated tools can identify it.
func (*Instance) IAMPolicyVersion ¶
func (*Instance) SetPolicyURL ¶
func (*Instance) SetPolicyVerb ¶
type InstanceBundlesConfig ¶
type InstanceBundlesConfig struct { ConfigControllerConfig *InstanceBundlesConfigConfigControllerConfig `json:"configControllerConfig"` // contains filtered or unexported fields }
var EmptyInstanceBundlesConfig *InstanceBundlesConfig = &InstanceBundlesConfig{empty: true}
This object is used to assert a desired state where this InstanceBundlesConfig is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*InstanceBundlesConfig) Empty ¶
func (r *InstanceBundlesConfig) Empty() bool
func (*InstanceBundlesConfig) HashCode ¶
func (r *InstanceBundlesConfig) HashCode() string
func (*InstanceBundlesConfig) String ¶
func (r *InstanceBundlesConfig) String() string
func (*InstanceBundlesConfig) UnmarshalJSON ¶
func (r *InstanceBundlesConfig) UnmarshalJSON(data []byte) error
type InstanceBundlesConfigConfigControllerConfig ¶
type InstanceBundlesConfigConfigControllerConfig struct { Enabled *bool `json:"enabled"` // contains filtered or unexported fields }
var EmptyInstanceBundlesConfigConfigControllerConfig *InstanceBundlesConfigConfigControllerConfig = &InstanceBundlesConfigConfigControllerConfig{empty: true}
This object is used to assert a desired state where this InstanceBundlesConfigConfigControllerConfig is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*InstanceBundlesConfigConfigControllerConfig) Empty ¶
func (r *InstanceBundlesConfigConfigControllerConfig) Empty() bool
func (*InstanceBundlesConfigConfigControllerConfig) HashCode ¶
func (r *InstanceBundlesConfigConfigControllerConfig) HashCode() string
func (*InstanceBundlesConfigConfigControllerConfig) String ¶
func (r *InstanceBundlesConfigConfigControllerConfig) String() string
func (*InstanceBundlesConfigConfigControllerConfig) UnmarshalJSON ¶
func (r *InstanceBundlesConfigConfigControllerConfig) UnmarshalJSON(data []byte) error
type InstanceList ¶
type InstanceList struct { Items []*Instance // contains filtered or unexported fields }
func (*InstanceList) HasNext ¶
func (l *InstanceList) HasNext() bool
type InstanceManagementConfig ¶
type InstanceManagementConfig struct { StandardManagementConfig *InstanceManagementConfigStandardManagementConfig `json:"standardManagementConfig"` FullManagementConfig *InstanceManagementConfigFullManagementConfig `json:"fullManagementConfig"` // contains filtered or unexported fields }
var EmptyInstanceManagementConfig *InstanceManagementConfig = &InstanceManagementConfig{empty: true}
This object is used to assert a desired state where this InstanceManagementConfig is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*InstanceManagementConfig) Empty ¶
func (r *InstanceManagementConfig) Empty() bool
func (*InstanceManagementConfig) HashCode ¶
func (r *InstanceManagementConfig) HashCode() string
func (*InstanceManagementConfig) String ¶
func (r *InstanceManagementConfig) String() string
func (*InstanceManagementConfig) UnmarshalJSON ¶
func (r *InstanceManagementConfig) UnmarshalJSON(data []byte) error
type InstanceManagementConfigFullManagementConfig ¶ added in v1.26.2
type InstanceManagementConfigFullManagementConfig struct { Network *string `json:"network"` MasterIPv4CidrBlock *string `json:"masterIPv4CidrBlock"` ManBlock *string `json:"manBlock"` ClusterCidrBlock *string `json:"clusterCidrBlock"` ServicesCidrBlock *string `json:"servicesCidrBlock"` ClusterNamedRange *string `json:"clusterNamedRange"` ServicesNamedRange *string `json:"servicesNamedRange"` // contains filtered or unexported fields }
var EmptyInstanceManagementConfigFullManagementConfig *InstanceManagementConfigFullManagementConfig = &InstanceManagementConfigFullManagementConfig{empty: true}
This object is used to assert a desired state where this InstanceManagementConfigFullManagementConfig is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*InstanceManagementConfigFullManagementConfig) Empty ¶ added in v1.26.2
func (r *InstanceManagementConfigFullManagementConfig) Empty() bool
func (*InstanceManagementConfigFullManagementConfig) HashCode ¶ added in v1.26.2
func (r *InstanceManagementConfigFullManagementConfig) HashCode() string
func (*InstanceManagementConfigFullManagementConfig) String ¶ added in v1.26.2
func (r *InstanceManagementConfigFullManagementConfig) String() string
func (*InstanceManagementConfigFullManagementConfig) UnmarshalJSON ¶ added in v1.26.2
func (r *InstanceManagementConfigFullManagementConfig) UnmarshalJSON(data []byte) error
type InstanceManagementConfigStandardManagementConfig ¶
type InstanceManagementConfigStandardManagementConfig struct { Network *string `json:"network"` MasterIPv4CidrBlock *string `json:"masterIPv4CidrBlock"` ManBlock *string `json:"manBlock"` ClusterCidrBlock *string `json:"clusterCidrBlock"` ServicesCidrBlock *string `json:"servicesCidrBlock"` ClusterNamedRange *string `json:"clusterNamedRange"` ServicesNamedRange *string `json:"servicesNamedRange"` // contains filtered or unexported fields }
var EmptyInstanceManagementConfigStandardManagementConfig *InstanceManagementConfigStandardManagementConfig = &InstanceManagementConfigStandardManagementConfig{empty: true}
This object is used to assert a desired state where this InstanceManagementConfigStandardManagementConfig is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*InstanceManagementConfigStandardManagementConfig) Empty ¶
func (r *InstanceManagementConfigStandardManagementConfig) Empty() bool
func (*InstanceManagementConfigStandardManagementConfig) HashCode ¶
func (r *InstanceManagementConfigStandardManagementConfig) HashCode() string
func (*InstanceManagementConfigStandardManagementConfig) String ¶
func (r *InstanceManagementConfigStandardManagementConfig) String() string
func (*InstanceManagementConfigStandardManagementConfig) UnmarshalJSON ¶
func (r *InstanceManagementConfigStandardManagementConfig) UnmarshalJSON(data []byte) error
type InstanceStateEnum ¶
type InstanceStateEnum string
The enum InstanceStateEnum.
func InstanceStateEnumRef ¶
func InstanceStateEnumRef(s string) *InstanceStateEnum
InstanceStateEnumRef returns a *InstanceStateEnum with the value of string s If the empty string is provided, nil is returned.
func (InstanceStateEnum) Validate ¶
func (v InstanceStateEnum) Validate() error