beta

package
v1.84.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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 beta 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.

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

View Source
const FunctionMaxPage = -1

Variables

View Source
var YAML_function []byte

Functions

func CanonicalizeFunctionSourceRepoURL

func CanonicalizeFunctionSourceRepoURL(m any, n any) bool

CanonicalizeFunctionSourceRepoURL compares source repo url because /paths/ can be omitted but will be added by the API.

func DCLFunctionSchema added in v1.10.3

func DCLFunctionSchema() *dcl.Schema

func ExpandFunctionEventTriggerFailurePolicy

func ExpandFunctionEventTriggerFailurePolicy(_ *Client, _ *bool, res *Function) (any, error)

ExpandFunctionEventTriggerFailurePolicy inverts the flattenFunctionEventTriggerFailurePolicy transformation.

func ExpandFunctionEventTriggerResource

func ExpandFunctionEventTriggerResource(_ *Client, _ *string, res *Function) (*string, error)

ExpandFunctionEventTriggerResource handles the special case for StorageBucket and makes sure resource field has format projects/{{project}}/buckets/{{name}}. http://b/210923505

Types

type Client

type Client struct {
	Config *dcl.Config
}

The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.

func NewClient

func NewClient(c *dcl.Config) *Client

NewClient creates a client that retries all operations a few times each.

func (*Client) ApplyFunction

func (c *Client) ApplyFunction(ctx context.Context, rawDesired *Function, opts ...dcl.ApplyOption) (*Function, error)

func (*Client) DeleteAllFunction

func (c *Client) DeleteAllFunction(ctx context.Context, project, region string, filter func(*Function) bool) error

DeleteAllFunction deletes all resources that the filter functions returns true on.

func (*Client) DeleteFunction

func (c *Client) DeleteFunction(ctx context.Context, r *Function) error

func (*Client) GetFunction

func (c *Client) GetFunction(ctx context.Context, r *Function) (*Function, error)

func (*Client) ListFunction

func (c *Client) ListFunction(ctx context.Context, project, region string) (*FunctionList, error)

func (*Client) ListFunctionWithMaxResults

func (c *Client) ListFunctionWithMaxResults(ctx context.Context, project, region string, pageSize int32) (*FunctionList, error)

type Function

type Function struct {
	Name                       *string                                 `json:"name"`
	Description                *string                                 `json:"description"`
	SourceArchiveUrl           *string                                 `json:"sourceArchiveUrl"`
	SourceRepository           *FunctionSourceRepository               `json:"sourceRepository"`
	HttpsTrigger               *FunctionHttpsTrigger                   `json:"httpsTrigger"`
	EventTrigger               *FunctionEventTrigger                   `json:"eventTrigger"`
	Status                     *FunctionStatusEnum                     `json:"status"`
	EntryPoint                 *string                                 `json:"entryPoint"`
	Runtime                    *string                                 `json:"runtime"`
	Timeout                    *string                                 `json:"timeout"`
	AvailableMemoryMb          *int64                                  `json:"availableMemoryMb"`
	ServiceAccountEmail        *string                                 `json:"serviceAccountEmail"`
	UpdateTime                 *string                                 `json:"updateTime"`
	VersionId                  *int64                                  `json:"versionId"`
	Labels                     map[string]string                       `json:"labels"`
	EnvironmentVariables       map[string]string                       `json:"environmentVariables"`
	MaxInstances               *int64                                  `json:"maxInstances"`
	VPCConnector               *string                                 `json:"vpcConnector"`
	VPCConnectorEgressSettings *FunctionVPCConnectorEgressSettingsEnum `json:"vpcConnectorEgressSettings"`
	IngressSettings            *FunctionIngressSettingsEnum            `json:"ingressSettings"`
	Region                     *string                                 `json:"region"`
	Project                    *string                                 `json:"project"`
}

func (*Function) Describe

func (r *Function) Describe() dcl.ServiceTypeVersion

Describe returns a simple description of this resource to ensure that automated tools can identify it.

func (*Function) GetPolicy

func (r *Function) GetPolicy(basePath string) (string, string, *bytes.Buffer, error)

func (*Function) IAMPolicyVersion

func (r *Function) IAMPolicyVersion() int

func (*Function) ID

func (r *Function) ID() (string, error)

func (*Function) SetPolicyURL

func (r *Function) SetPolicyURL(userBasePath string) string

func (*Function) SetPolicyVerb

func (r *Function) SetPolicyVerb() string

func (*Function) String

func (r *Function) String() string

type FunctionEventTrigger

type FunctionEventTrigger struct {
	EventType     *string `json:"eventType"`
	Resource      *string `json:"resource"`
	Service       *string `json:"service"`
	FailurePolicy *bool   `json:"failurePolicy"`
	// contains filtered or unexported fields
}
var EmptyFunctionEventTrigger *FunctionEventTrigger = &FunctionEventTrigger{empty: true}

This object is used to assert a desired state where this FunctionEventTrigger is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*FunctionEventTrigger) Empty

func (r *FunctionEventTrigger) Empty() bool

func (*FunctionEventTrigger) HashCode

func (r *FunctionEventTrigger) HashCode() string

func (*FunctionEventTrigger) String

func (r *FunctionEventTrigger) String() string

func (*FunctionEventTrigger) UnmarshalJSON

func (r *FunctionEventTrigger) UnmarshalJSON(data []byte) error

type FunctionHttpsTrigger

type FunctionHttpsTrigger struct {
	Url           *string                                `json:"url"`
	SecurityLevel *FunctionHttpsTriggerSecurityLevelEnum `json:"securityLevel"`
	// contains filtered or unexported fields
}
var EmptyFunctionHttpsTrigger *FunctionHttpsTrigger = &FunctionHttpsTrigger{empty: true}

This object is used to assert a desired state where this FunctionHttpsTrigger is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*FunctionHttpsTrigger) Empty

func (r *FunctionHttpsTrigger) Empty() bool

func (*FunctionHttpsTrigger) HashCode

func (r *FunctionHttpsTrigger) HashCode() string

func (*FunctionHttpsTrigger) String

func (r *FunctionHttpsTrigger) String() string

func (*FunctionHttpsTrigger) UnmarshalJSON

func (r *FunctionHttpsTrigger) UnmarshalJSON(data []byte) error

type FunctionHttpsTriggerSecurityLevelEnum

type FunctionHttpsTriggerSecurityLevelEnum string

The enum FunctionHttpsTriggerSecurityLevelEnum.

func FunctionHttpsTriggerSecurityLevelEnumRef

func FunctionHttpsTriggerSecurityLevelEnumRef(s string) *FunctionHttpsTriggerSecurityLevelEnum

FunctionHttpsTriggerSecurityLevelEnumRef returns a *FunctionHttpsTriggerSecurityLevelEnum with the value of string s If the empty string is provided, nil is returned.

func (FunctionHttpsTriggerSecurityLevelEnum) Validate

type FunctionIngressSettingsEnum

type FunctionIngressSettingsEnum string

The enum FunctionIngressSettingsEnum.

func FunctionIngressSettingsEnumRef

func FunctionIngressSettingsEnumRef(s string) *FunctionIngressSettingsEnum

FunctionIngressSettingsEnumRef returns a *FunctionIngressSettingsEnum with the value of string s If the empty string is provided, nil is returned.

func (FunctionIngressSettingsEnum) Validate

func (v FunctionIngressSettingsEnum) Validate() error

type FunctionList

type FunctionList struct {
	Items []*Function
	// contains filtered or unexported fields
}

func (*FunctionList) HasNext

func (l *FunctionList) HasNext() bool

func (*FunctionList) Next

func (l *FunctionList) Next(ctx context.Context, c *Client) error

type FunctionSourceRepository

type FunctionSourceRepository struct {
	Url         *string `json:"url"`
	DeployedUrl *string `json:"deployedUrl"`
	// contains filtered or unexported fields
}
var EmptyFunctionSourceRepository *FunctionSourceRepository = &FunctionSourceRepository{empty: true}

This object is used to assert a desired state where this FunctionSourceRepository is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*FunctionSourceRepository) Empty

func (r *FunctionSourceRepository) Empty() bool

func (*FunctionSourceRepository) HashCode

func (r *FunctionSourceRepository) HashCode() string

func (*FunctionSourceRepository) String

func (r *FunctionSourceRepository) String() string

func (*FunctionSourceRepository) UnmarshalJSON

func (r *FunctionSourceRepository) UnmarshalJSON(data []byte) error

type FunctionStatusEnum

type FunctionStatusEnum string

The enum FunctionStatusEnum.

func FunctionStatusEnumRef

func FunctionStatusEnumRef(s string) *FunctionStatusEnum

FunctionStatusEnumRef returns a *FunctionStatusEnum with the value of string s If the empty string is provided, nil is returned.

func (FunctionStatusEnum) Validate

func (v FunctionStatusEnum) Validate() error

type FunctionVPCConnectorEgressSettingsEnum

type FunctionVPCConnectorEgressSettingsEnum string

The enum FunctionVPCConnectorEgressSettingsEnum.

func FunctionVPCConnectorEgressSettingsEnumRef

func FunctionVPCConnectorEgressSettingsEnumRef(s string) *FunctionVPCConnectorEgressSettingsEnum

FunctionVPCConnectorEgressSettingsEnumRef returns a *FunctionVPCConnectorEgressSettingsEnum with the value of string s If the empty string is provided, nil is returned.

func (FunctionVPCConnectorEgressSettingsEnum) Validate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL