Documentation
¶
Overview ¶
Package parametermanager is an auto-generated package for the Parameter Manager API.
(Public Preview) Parameter Manager is a single source of truth to store, access and manage the lifecycle of your workload parameters. Parameter Manager aims to make management of sensitive application parameters effortless for customers without diminishing focus on security.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
// go get cloud.google.com/go/parametermanager/apiv1@latest ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client, mentioned above.
req := ¶metermanagerpb.CreateParameterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#CreateParameterRequest. } resp, err := c.CreateParameter(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context ¶
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Index ¶
- func DefaultAuthScopes() []string
- type CallOptions
- type Client
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateParameter(ctx context.Context, req *parametermanagerpb.CreateParameterRequest, ...) (*parametermanagerpb.Parameter, error)
- func (c *Client) CreateParameterVersion(ctx context.Context, req *parametermanagerpb.CreateParameterVersionRequest, ...) (*parametermanagerpb.ParameterVersion, error)
- func (c *Client) DeleteParameter(ctx context.Context, req *parametermanagerpb.DeleteParameterRequest, ...) error
- func (c *Client) DeleteParameterVersion(ctx context.Context, req *parametermanagerpb.DeleteParameterVersionRequest, ...) error
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetParameter(ctx context.Context, req *parametermanagerpb.GetParameterRequest, ...) (*parametermanagerpb.Parameter, error)
- func (c *Client) GetParameterVersion(ctx context.Context, req *parametermanagerpb.GetParameterVersionRequest, ...) (*parametermanagerpb.ParameterVersion, error)
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListParameterVersions(ctx context.Context, req *parametermanagerpb.ListParameterVersionsRequest, ...) *ParameterVersionIterator
- func (c *Client) ListParameters(ctx context.Context, req *parametermanagerpb.ListParametersRequest, ...) *ParameterIterator
- func (c *Client) RenderParameterVersion(ctx context.Context, req *parametermanagerpb.RenderParameterVersionRequest, ...) (*parametermanagerpb.RenderParameterVersionResponse, error)
- func (c *Client) UpdateParameter(ctx context.Context, req *parametermanagerpb.UpdateParameterRequest, ...) (*parametermanagerpb.Parameter, error)
- func (c *Client) UpdateParameterVersion(ctx context.Context, req *parametermanagerpb.UpdateParameterVersionRequest, ...) (*parametermanagerpb.ParameterVersion, error)
- type LocationIterator
- type ParameterIterator
- type ParameterVersionIterator
Examples ¶
- Client.CreateParameter
- Client.CreateParameterVersion
- Client.DeleteParameter
- Client.DeleteParameterVersion
- Client.GetLocation
- Client.GetParameter
- Client.GetParameterVersion
- Client.ListLocations
- Client.ListLocations (All)
- Client.ListParameterVersions
- Client.ListParameterVersions (All)
- Client.ListParameters
- Client.ListParameters (All)
- Client.RenderParameterVersion
- Client.UpdateParameter
- Client.UpdateParameterVersion
- NewClient
- NewRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type CallOptions ¶
type CallOptions struct { ListParameters []gax.CallOption GetParameter []gax.CallOption CreateParameter []gax.CallOption UpdateParameter []gax.CallOption DeleteParameter []gax.CallOption ListParameterVersions []gax.CallOption GetParameterVersion []gax.CallOption RenderParameterVersion []gax.CallOption CreateParameterVersion []gax.CallOption UpdateParameterVersion []gax.CallOption DeleteParameterVersion []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption }
CallOptions contains the retry settings for each method of Client.
type Client ¶
type Client struct { // The call options for this service. CallOptions *CallOptions // contains filtered or unexported fields }
Client is a client for interacting with Parameter Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources
func NewClient ¶
NewClient creates a new parameter manager client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewRESTClient ¶
NewRESTClient creates a new parameter manager rest client.
Service describing handlers for resources
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection
deprecated
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateParameter ¶
func (c *Client) CreateParameter(ctx context.Context, req *parametermanagerpb.CreateParameterRequest, opts ...gax.CallOption) (*parametermanagerpb.Parameter, error)
CreateParameter creates a new Parameter in a given project and location.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.CreateParameterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#CreateParameterRequest. } resp, err := c.CreateParameter(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) CreateParameterVersion ¶
func (c *Client) CreateParameterVersion(ctx context.Context, req *parametermanagerpb.CreateParameterVersionRequest, opts ...gax.CallOption) (*parametermanagerpb.ParameterVersion, error)
CreateParameterVersion creates a new ParameterVersion in a given project, location, and parameter.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.CreateParameterVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#CreateParameterVersionRequest. } resp, err := c.CreateParameterVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) DeleteParameter ¶
func (c *Client) DeleteParameter(ctx context.Context, req *parametermanagerpb.DeleteParameterRequest, opts ...gax.CallOption) error
DeleteParameter deletes a single Parameter.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.DeleteParameterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#DeleteParameterRequest. } err = c.DeleteParameter(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) DeleteParameterVersion ¶
func (c *Client) DeleteParameterVersion(ctx context.Context, req *parametermanagerpb.DeleteParameterVersionRequest, opts ...gax.CallOption) error
DeleteParameterVersion deletes a single ParameterVersion.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.DeleteParameterVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#DeleteParameterVersionRequest. } err = c.DeleteParameterVersion(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*Client) GetLocation ¶
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. } resp, err := c.GetLocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetParameter ¶
func (c *Client) GetParameter(ctx context.Context, req *parametermanagerpb.GetParameterRequest, opts ...gax.CallOption) (*parametermanagerpb.Parameter, error)
GetParameter gets details of a single Parameter.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.GetParameterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#GetParameterRequest. } resp, err := c.GetParameter(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) GetParameterVersion ¶
func (c *Client) GetParameterVersion(ctx context.Context, req *parametermanagerpb.GetParameterVersionRequest, opts ...gax.CallOption) (*parametermanagerpb.ParameterVersion, error)
GetParameterVersion gets details of a single ParameterVersion.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.GetParameterVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#GetParameterVersionRequest. } resp, err := c.GetParameterVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) ListLocations ¶
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } it := c.ListLocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*locationpb.ListLocationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListParameterVersions ¶
func (c *Client) ListParameterVersions(ctx context.Context, req *parametermanagerpb.ListParameterVersionsRequest, opts ...gax.CallOption) *ParameterVersionIterator
ListParameterVersions lists ParameterVersions in a given project, location, and parameter.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.ListParameterVersionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#ListParameterVersionsRequest. } it := c.ListParameterVersions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*parametermanagerpb.ListParameterVersionsResponse) } }
Output:
Example (All) ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.ListParameterVersionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#ListParameterVersionsRequest. } for resp, err := range c.ListParameterVersions(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) ListParameters ¶
func (c *Client) ListParameters(ctx context.Context, req *parametermanagerpb.ListParametersRequest, opts ...gax.CallOption) *ParameterIterator
ListParameters lists Parameters in a given project and location.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.ListParametersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#ListParametersRequest. } it := c.ListParameters(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*parametermanagerpb.ListParametersResponse) } }
Output:
Example (All) ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.ListParametersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#ListParametersRequest. } for resp, err := range c.ListParameters(ctx, req).All() { if err != nil { // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp } }
Output:
func (*Client) RenderParameterVersion ¶
func (c *Client) RenderParameterVersion(ctx context.Context, req *parametermanagerpb.RenderParameterVersionRequest, opts ...gax.CallOption) (*parametermanagerpb.RenderParameterVersionResponse, error)
RenderParameterVersion gets rendered version of a ParameterVersion.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.RenderParameterVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#RenderParameterVersionRequest. } resp, err := c.RenderParameterVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateParameter ¶
func (c *Client) UpdateParameter(ctx context.Context, req *parametermanagerpb.UpdateParameterRequest, opts ...gax.CallOption) (*parametermanagerpb.Parameter, error)
UpdateParameter updates a single Parameter.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.UpdateParameterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#UpdateParameterRequest. } resp, err := c.UpdateParameter(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*Client) UpdateParameterVersion ¶
func (c *Client) UpdateParameterVersion(ctx context.Context, req *parametermanagerpb.UpdateParameterVersionRequest, opts ...gax.CallOption) (*parametermanagerpb.ParameterVersion, error)
UpdateParameterVersion updates a single ParameterVersion.
Example ¶
package main import ( "context" parametermanager "cloud.google.com/go/parametermanager/apiv1" parametermanagerpb "cloud.google.com/go/parametermanager/apiv1/parametermanagerpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := parametermanager.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := ¶metermanagerpb.UpdateParameterVersionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/parametermanager/apiv1/parametermanagerpb#UpdateParameterVersionRequest. } resp, err := c.UpdateParameterVersion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type LocationIterator ¶
type LocationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) // contains filtered or unexported fields }
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All ¶
func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*LocationIterator) Next ¶
func (it *LocationIterator) Next() (*locationpb.Location, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo ¶
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ParameterIterator ¶
type ParameterIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*parametermanagerpb.Parameter, nextPageToken string, err error) // contains filtered or unexported fields }
ParameterIterator manages a stream of *parametermanagerpb.Parameter.
func (*ParameterIterator) All ¶
func (it *ParameterIterator) All() iter.Seq2[*parametermanagerpb.Parameter, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ParameterIterator) Next ¶
func (it *ParameterIterator) Next() (*parametermanagerpb.Parameter, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ParameterIterator) PageInfo ¶
func (it *ParameterIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ParameterVersionIterator ¶
type ParameterVersionIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*parametermanagerpb.ParameterVersion, nextPageToken string, err error) // contains filtered or unexported fields }
ParameterVersionIterator manages a stream of *parametermanagerpb.ParameterVersion.
func (*ParameterVersionIterator) All ¶
func (it *ParameterVersionIterator) All() iter.Seq2[*parametermanagerpb.ParameterVersion, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ParameterVersionIterator) Next ¶
func (it *ParameterVersionIterator) Next() (*parametermanagerpb.ParameterVersion, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ParameterVersionIterator) PageInfo ¶
func (it *ParameterVersionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.