Documentation ¶
Overview ¶
Package compute is an auto-generated package for the Google Compute Engine API.
NOTE: This package is in alpha. It is not stable, and is likely to change.
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.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Index ¶
- func DefaultAuthScopes() []string
- type AcceleratorTypesCallOptions
- type AcceleratorTypesClient
- func (c *AcceleratorTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListAcceleratorTypesRequest, ...) (*computepb.AcceleratorTypeAggregatedList, error)
- func (c *AcceleratorTypesClient) Close() error
- func (c *AcceleratorTypesClient) Connection() *grpc.ClientConn
- func (c *AcceleratorTypesClient) Get(ctx context.Context, req *computepb.GetAcceleratorTypeRequest, ...) (*computepb.AcceleratorType, error)
- func (c *AcceleratorTypesClient) List(ctx context.Context, req *computepb.ListAcceleratorTypesRequest, ...) (*computepb.AcceleratorTypeList, error)
- type AddressesCallOptions
- type AddressesClient
- func (c *AddressesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListAddressesRequest, ...) (*computepb.AddressAggregatedList, error)
- func (c *AddressesClient) Close() error
- func (c *AddressesClient) Connection() *grpc.ClientConn
- func (c *AddressesClient) Delete(ctx context.Context, req *computepb.DeleteAddressRequest, ...) (*computepb.Operation, error)
- func (c *AddressesClient) Get(ctx context.Context, req *computepb.GetAddressRequest, opts ...gax.CallOption) (*computepb.Address, error)
- func (c *AddressesClient) Insert(ctx context.Context, req *computepb.InsertAddressRequest, ...) (*computepb.Operation, error)
- func (c *AddressesClient) List(ctx context.Context, req *computepb.ListAddressesRequest, ...) (*computepb.AddressList, error)
- type AutoscalersCallOptions
- type AutoscalersClient
- func (c *AutoscalersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListAutoscalersRequest, ...) (*computepb.AutoscalerAggregatedList, error)
- func (c *AutoscalersClient) Close() error
- func (c *AutoscalersClient) Connection() *grpc.ClientConn
- func (c *AutoscalersClient) Delete(ctx context.Context, req *computepb.DeleteAutoscalerRequest, ...) (*computepb.Operation, error)
- func (c *AutoscalersClient) Get(ctx context.Context, req *computepb.GetAutoscalerRequest, ...) (*computepb.Autoscaler, error)
- func (c *AutoscalersClient) Insert(ctx context.Context, req *computepb.InsertAutoscalerRequest, ...) (*computepb.Operation, error)
- func (c *AutoscalersClient) List(ctx context.Context, req *computepb.ListAutoscalersRequest, ...) (*computepb.AutoscalerList, error)
- func (c *AutoscalersClient) Patch(ctx context.Context, req *computepb.PatchAutoscalerRequest, ...) (*computepb.Operation, error)
- func (c *AutoscalersClient) Update(ctx context.Context, req *computepb.UpdateAutoscalerRequest, ...) (*computepb.Operation, error)
- type BackendBucketsCallOptions
- type BackendBucketsClient
- func (c *BackendBucketsClient) AddSignedUrlKey(ctx context.Context, req *computepb.AddSignedUrlKeyBackendBucketRequest, ...) (*computepb.Operation, error)
- func (c *BackendBucketsClient) Close() error
- func (c *BackendBucketsClient) Connection() *grpc.ClientConn
- func (c *BackendBucketsClient) Delete(ctx context.Context, req *computepb.DeleteBackendBucketRequest, ...) (*computepb.Operation, error)
- func (c *BackendBucketsClient) DeleteSignedUrlKey(ctx context.Context, req *computepb.DeleteSignedUrlKeyBackendBucketRequest, ...) (*computepb.Operation, error)
- func (c *BackendBucketsClient) Get(ctx context.Context, req *computepb.GetBackendBucketRequest, ...) (*computepb.BackendBucket, error)
- func (c *BackendBucketsClient) Insert(ctx context.Context, req *computepb.InsertBackendBucketRequest, ...) (*computepb.Operation, error)
- func (c *BackendBucketsClient) List(ctx context.Context, req *computepb.ListBackendBucketsRequest, ...) (*computepb.BackendBucketList, error)
- func (c *BackendBucketsClient) Patch(ctx context.Context, req *computepb.PatchBackendBucketRequest, ...) (*computepb.Operation, error)
- func (c *BackendBucketsClient) Update(ctx context.Context, req *computepb.UpdateBackendBucketRequest, ...) (*computepb.Operation, error)
- type BackendServicesCallOptions
- type BackendServicesClient
- func (c *BackendServicesClient) AddSignedUrlKey(ctx context.Context, req *computepb.AddSignedUrlKeyBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *BackendServicesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListBackendServicesRequest, ...) (*computepb.BackendServiceAggregatedList, error)
- func (c *BackendServicesClient) Close() error
- func (c *BackendServicesClient) Connection() *grpc.ClientConn
- func (c *BackendServicesClient) Delete(ctx context.Context, req *computepb.DeleteBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *BackendServicesClient) DeleteSignedUrlKey(ctx context.Context, req *computepb.DeleteSignedUrlKeyBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *BackendServicesClient) Get(ctx context.Context, req *computepb.GetBackendServiceRequest, ...) (*computepb.BackendService, error)
- func (c *BackendServicesClient) GetHealth(ctx context.Context, req *computepb.GetHealthBackendServiceRequest, ...) (*computepb.BackendServiceGroupHealth, error)
- func (c *BackendServicesClient) Insert(ctx context.Context, req *computepb.InsertBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *BackendServicesClient) List(ctx context.Context, req *computepb.ListBackendServicesRequest, ...) (*computepb.BackendServiceList, error)
- func (c *BackendServicesClient) Patch(ctx context.Context, req *computepb.PatchBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *BackendServicesClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *BackendServicesClient) Update(ctx context.Context, req *computepb.UpdateBackendServiceRequest, ...) (*computepb.Operation, error)
- type DiskTypesCallOptions
- type DiskTypesClient
- func (c *DiskTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListDiskTypesRequest, ...) (*computepb.DiskTypeAggregatedList, error)
- func (c *DiskTypesClient) Close() error
- func (c *DiskTypesClient) Connection() *grpc.ClientConn
- func (c *DiskTypesClient) Get(ctx context.Context, req *computepb.GetDiskTypeRequest, opts ...gax.CallOption) (*computepb.DiskType, error)
- func (c *DiskTypesClient) List(ctx context.Context, req *computepb.ListDiskTypesRequest, ...) (*computepb.DiskTypeList, error)
- type DisksCallOptions
- type DisksClient
- func (c *DisksClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesDiskRequest, ...) (*computepb.Operation, error)
- func (c *DisksClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListDisksRequest, ...) (*computepb.DiskAggregatedList, error)
- func (c *DisksClient) Close() error
- func (c *DisksClient) Connection() *grpc.ClientConn
- func (c *DisksClient) CreateSnapshot(ctx context.Context, req *computepb.CreateSnapshotDiskRequest, ...) (*computepb.Operation, error)
- func (c *DisksClient) Delete(ctx context.Context, req *computepb.DeleteDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *DisksClient) Get(ctx context.Context, req *computepb.GetDiskRequest, opts ...gax.CallOption) (*computepb.Disk, error)
- func (c *DisksClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyDiskRequest, ...) (*computepb.Policy, error)
- func (c *DisksClient) Insert(ctx context.Context, req *computepb.InsertDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *DisksClient) List(ctx context.Context, req *computepb.ListDisksRequest, opts ...gax.CallOption) (*computepb.DiskList, error)
- func (c *DisksClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesDiskRequest, ...) (*computepb.Operation, error)
- func (c *DisksClient) Resize(ctx context.Context, req *computepb.ResizeDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *DisksClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyDiskRequest, ...) (*computepb.Policy, error)
- func (c *DisksClient) SetLabels(ctx context.Context, req *computepb.SetLabelsDiskRequest, ...) (*computepb.Operation, error)
- func (c *DisksClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsDiskRequest, ...) (*computepb.TestPermissionsResponse, error)
- type ExternalVpnGatewaysCallOptions
- type ExternalVpnGatewaysClient
- func (c *ExternalVpnGatewaysClient) Close() error
- func (c *ExternalVpnGatewaysClient) Connection() *grpc.ClientConn
- func (c *ExternalVpnGatewaysClient) Delete(ctx context.Context, req *computepb.DeleteExternalVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *ExternalVpnGatewaysClient) Get(ctx context.Context, req *computepb.GetExternalVpnGatewayRequest, ...) (*computepb.ExternalVpnGateway, error)
- func (c *ExternalVpnGatewaysClient) Insert(ctx context.Context, req *computepb.InsertExternalVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *ExternalVpnGatewaysClient) List(ctx context.Context, req *computepb.ListExternalVpnGatewaysRequest, ...) (*computepb.ExternalVpnGatewayList, error)
- func (c *ExternalVpnGatewaysClient) SetLabels(ctx context.Context, req *computepb.SetLabelsExternalVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *ExternalVpnGatewaysClient) TestIamPermissions(ctx context.Context, ...) (*computepb.TestPermissionsResponse, error)
- type FirewallPoliciesCallOptions
- type FirewallPoliciesClient
- func (c *FirewallPoliciesClient) AddAssociation(ctx context.Context, req *computepb.AddAssociationFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) AddRule(ctx context.Context, req *computepb.AddRuleFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) CloneRules(ctx context.Context, req *computepb.CloneRulesFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) Close() error
- func (c *FirewallPoliciesClient) Connection() *grpc.ClientConn
- func (c *FirewallPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) Get(ctx context.Context, req *computepb.GetFirewallPolicyRequest, ...) (*computepb.FirewallPolicy, error)
- func (c *FirewallPoliciesClient) GetAssociation(ctx context.Context, req *computepb.GetAssociationFirewallPolicyRequest, ...) (*computepb.FirewallPolicyAssociation, error)
- func (c *FirewallPoliciesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyFirewallPolicyRequest, ...) (*computepb.Policy, error)
- func (c *FirewallPoliciesClient) GetRule(ctx context.Context, req *computepb.GetRuleFirewallPolicyRequest, ...) (*computepb.FirewallPolicyRule, error)
- func (c *FirewallPoliciesClient) Insert(ctx context.Context, req *computepb.InsertFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) List(ctx context.Context, req *computepb.ListFirewallPoliciesRequest, ...) (*computepb.FirewallPolicyList, error)
- func (c *FirewallPoliciesClient) ListAssociations(ctx context.Context, req *computepb.ListAssociationsFirewallPolicyRequest, ...) (*computepb.FirewallPoliciesListAssociationsResponse, error)
- func (c *FirewallPoliciesClient) Move(ctx context.Context, req *computepb.MoveFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) Patch(ctx context.Context, req *computepb.PatchFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) PatchRule(ctx context.Context, req *computepb.PatchRuleFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) RemoveAssociation(ctx context.Context, req *computepb.RemoveAssociationFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) RemoveRule(ctx context.Context, req *computepb.RemoveRuleFirewallPolicyRequest, ...) (*computepb.Operation, error)
- func (c *FirewallPoliciesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyFirewallPolicyRequest, ...) (*computepb.Policy, error)
- func (c *FirewallPoliciesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsFirewallPolicyRequest, ...) (*computepb.TestPermissionsResponse, error)
- type FirewallsCallOptions
- type FirewallsClient
- func (c *FirewallsClient) Close() error
- func (c *FirewallsClient) Connection() *grpc.ClientConn
- func (c *FirewallsClient) Delete(ctx context.Context, req *computepb.DeleteFirewallRequest, ...) (*computepb.Operation, error)
- func (c *FirewallsClient) Get(ctx context.Context, req *computepb.GetFirewallRequest, opts ...gax.CallOption) (*computepb.Firewall, error)
- func (c *FirewallsClient) Insert(ctx context.Context, req *computepb.InsertFirewallRequest, ...) (*computepb.Operation, error)
- func (c *FirewallsClient) List(ctx context.Context, req *computepb.ListFirewallsRequest, ...) (*computepb.FirewallList, error)
- func (c *FirewallsClient) Patch(ctx context.Context, req *computepb.PatchFirewallRequest, ...) (*computepb.Operation, error)
- func (c *FirewallsClient) Update(ctx context.Context, req *computepb.UpdateFirewallRequest, ...) (*computepb.Operation, error)
- type ForwardingRulesCallOptions
- type ForwardingRulesClient
- func (c *ForwardingRulesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListForwardingRulesRequest, ...) (*computepb.ForwardingRuleAggregatedList, error)
- func (c *ForwardingRulesClient) Close() error
- func (c *ForwardingRulesClient) Connection() *grpc.ClientConn
- func (c *ForwardingRulesClient) Delete(ctx context.Context, req *computepb.DeleteForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *ForwardingRulesClient) Get(ctx context.Context, req *computepb.GetForwardingRuleRequest, ...) (*computepb.ForwardingRule, error)
- func (c *ForwardingRulesClient) Insert(ctx context.Context, req *computepb.InsertForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *ForwardingRulesClient) List(ctx context.Context, req *computepb.ListForwardingRulesRequest, ...) (*computepb.ForwardingRuleList, error)
- func (c *ForwardingRulesClient) Patch(ctx context.Context, req *computepb.PatchForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *ForwardingRulesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *ForwardingRulesClient) SetTarget(ctx context.Context, req *computepb.SetTargetForwardingRuleRequest, ...) (*computepb.Operation, error)
- type GlobalAddressesCallOptions
- type GlobalAddressesClient
- func (c *GlobalAddressesClient) Close() error
- func (c *GlobalAddressesClient) Connection() *grpc.ClientConn
- func (c *GlobalAddressesClient) Delete(ctx context.Context, req *computepb.DeleteGlobalAddressRequest, ...) (*computepb.Operation, error)
- func (c *GlobalAddressesClient) Get(ctx context.Context, req *computepb.GetGlobalAddressRequest, ...) (*computepb.Address, error)
- func (c *GlobalAddressesClient) Insert(ctx context.Context, req *computepb.InsertGlobalAddressRequest, ...) (*computepb.Operation, error)
- func (c *GlobalAddressesClient) List(ctx context.Context, req *computepb.ListGlobalAddressesRequest, ...) (*computepb.AddressList, error)
- type GlobalForwardingRulesCallOptions
- type GlobalForwardingRulesClient
- func (c *GlobalForwardingRulesClient) Close() error
- func (c *GlobalForwardingRulesClient) Connection() *grpc.ClientConn
- func (c *GlobalForwardingRulesClient) Delete(ctx context.Context, req *computepb.DeleteGlobalForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *GlobalForwardingRulesClient) Get(ctx context.Context, req *computepb.GetGlobalForwardingRuleRequest, ...) (*computepb.ForwardingRule, error)
- func (c *GlobalForwardingRulesClient) Insert(ctx context.Context, req *computepb.InsertGlobalForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *GlobalForwardingRulesClient) List(ctx context.Context, req *computepb.ListGlobalForwardingRulesRequest, ...) (*computepb.ForwardingRuleList, error)
- func (c *GlobalForwardingRulesClient) Patch(ctx context.Context, req *computepb.PatchGlobalForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *GlobalForwardingRulesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsGlobalForwardingRuleRequest, ...) (*computepb.Operation, error)
- func (c *GlobalForwardingRulesClient) SetTarget(ctx context.Context, req *computepb.SetTargetGlobalForwardingRuleRequest, ...) (*computepb.Operation, error)
- type GlobalNetworkEndpointGroupsCallOptions
- type GlobalNetworkEndpointGroupsClient
- func (c *GlobalNetworkEndpointGroupsClient) AttachNetworkEndpoints(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *GlobalNetworkEndpointGroupsClient) Close() error
- func (c *GlobalNetworkEndpointGroupsClient) Connection() *grpc.ClientConn
- func (c *GlobalNetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteGlobalNetworkEndpointGroupRequest, ...) (*computepb.Operation, error)
- func (c *GlobalNetworkEndpointGroupsClient) DetachNetworkEndpoints(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *GlobalNetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetGlobalNetworkEndpointGroupRequest, ...) (*computepb.NetworkEndpointGroup, error)
- func (c *GlobalNetworkEndpointGroupsClient) Insert(ctx context.Context, req *computepb.InsertGlobalNetworkEndpointGroupRequest, ...) (*computepb.Operation, error)
- func (c *GlobalNetworkEndpointGroupsClient) List(ctx context.Context, req *computepb.ListGlobalNetworkEndpointGroupsRequest, ...) (*computepb.NetworkEndpointGroupList, error)
- func (c *GlobalNetworkEndpointGroupsClient) ListNetworkEndpoints(ctx context.Context, ...) (*computepb.NetworkEndpointGroupsListNetworkEndpoints, error)
- type GlobalOperationsCallOptions
- type GlobalOperationsClient
- func (c *GlobalOperationsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListGlobalOperationsRequest, ...) (*computepb.OperationAggregatedList, error)
- func (c *GlobalOperationsClient) Close() error
- func (c *GlobalOperationsClient) Connection() *grpc.ClientConn
- func (c *GlobalOperationsClient) Delete(ctx context.Context, req *computepb.DeleteGlobalOperationRequest, ...) (*computepb.DeleteGlobalOperationResponse, error)
- func (c *GlobalOperationsClient) Get(ctx context.Context, req *computepb.GetGlobalOperationRequest, ...) (*computepb.Operation, error)
- func (c *GlobalOperationsClient) List(ctx context.Context, req *computepb.ListGlobalOperationsRequest, ...) (*computepb.OperationList, error)
- func (c *GlobalOperationsClient) Wait(ctx context.Context, req *computepb.WaitGlobalOperationRequest, ...) (*computepb.Operation, error)
- type GlobalOrganizationOperationsCallOptions
- type GlobalOrganizationOperationsClient
- func (c *GlobalOrganizationOperationsClient) Close() error
- func (c *GlobalOrganizationOperationsClient) Connection() *grpc.ClientConn
- func (c *GlobalOrganizationOperationsClient) Delete(ctx context.Context, req *computepb.DeleteGlobalOrganizationOperationRequest, ...) (*computepb.DeleteGlobalOrganizationOperationResponse, error)
- func (c *GlobalOrganizationOperationsClient) Get(ctx context.Context, req *computepb.GetGlobalOrganizationOperationRequest, ...) (*computepb.Operation, error)
- func (c *GlobalOrganizationOperationsClient) List(ctx context.Context, req *computepb.ListGlobalOrganizationOperationsRequest, ...) (*computepb.OperationList, error)
- type GlobalPublicDelegatedPrefixesCallOptions
- type GlobalPublicDelegatedPrefixesClient
- func (c *GlobalPublicDelegatedPrefixesClient) Close() error
- func (c *GlobalPublicDelegatedPrefixesClient) Connection() *grpc.ClientConn
- func (c *GlobalPublicDelegatedPrefixesClient) Delete(ctx context.Context, req *computepb.DeleteGlobalPublicDelegatedPrefixeRequest, ...) (*computepb.Operation, error)
- func (c *GlobalPublicDelegatedPrefixesClient) Get(ctx context.Context, req *computepb.GetGlobalPublicDelegatedPrefixeRequest, ...) (*computepb.PublicDelegatedPrefix, error)
- func (c *GlobalPublicDelegatedPrefixesClient) Insert(ctx context.Context, req *computepb.InsertGlobalPublicDelegatedPrefixeRequest, ...) (*computepb.Operation, error)
- func (c *GlobalPublicDelegatedPrefixesClient) List(ctx context.Context, req *computepb.ListGlobalPublicDelegatedPrefixesRequest, ...) (*computepb.PublicDelegatedPrefixList, error)
- func (c *GlobalPublicDelegatedPrefixesClient) Patch(ctx context.Context, req *computepb.PatchGlobalPublicDelegatedPrefixeRequest, ...) (*computepb.Operation, error)
- type HealthChecksCallOptions
- type HealthChecksClient
- func (c *HealthChecksClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListHealthChecksRequest, ...) (*computepb.HealthChecksAggregatedList, error)
- func (c *HealthChecksClient) Close() error
- func (c *HealthChecksClient) Connection() *grpc.ClientConn
- func (c *HealthChecksClient) Delete(ctx context.Context, req *computepb.DeleteHealthCheckRequest, ...) (*computepb.Operation, error)
- func (c *HealthChecksClient) Get(ctx context.Context, req *computepb.GetHealthCheckRequest, ...) (*computepb.HealthCheck, error)
- func (c *HealthChecksClient) Insert(ctx context.Context, req *computepb.InsertHealthCheckRequest, ...) (*computepb.Operation, error)
- func (c *HealthChecksClient) List(ctx context.Context, req *computepb.ListHealthChecksRequest, ...) (*computepb.HealthCheckList, error)
- func (c *HealthChecksClient) Patch(ctx context.Context, req *computepb.PatchHealthCheckRequest, ...) (*computepb.Operation, error)
- func (c *HealthChecksClient) Update(ctx context.Context, req *computepb.UpdateHealthCheckRequest, ...) (*computepb.Operation, error)
- type ImagesCallOptions
- type ImagesClient
- func (c *ImagesClient) Close() error
- func (c *ImagesClient) Connection() *grpc.ClientConn
- func (c *ImagesClient) Delete(ctx context.Context, req *computepb.DeleteImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *ImagesClient) Deprecate(ctx context.Context, req *computepb.DeprecateImageRequest, ...) (*computepb.Operation, error)
- func (c *ImagesClient) Get(ctx context.Context, req *computepb.GetImageRequest, opts ...gax.CallOption) (*computepb.Image, error)
- func (c *ImagesClient) GetFromFamily(ctx context.Context, req *computepb.GetFromFamilyImageRequest, ...) (*computepb.Image, error)
- func (c *ImagesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyImageRequest, ...) (*computepb.Policy, error)
- func (c *ImagesClient) Insert(ctx context.Context, req *computepb.InsertImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *ImagesClient) List(ctx context.Context, req *computepb.ListImagesRequest, opts ...gax.CallOption) (*computepb.ImageList, error)
- func (c *ImagesClient) Patch(ctx context.Context, req *computepb.PatchImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *ImagesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyImageRequest, ...) (*computepb.Policy, error)
- func (c *ImagesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsImageRequest, ...) (*computepb.Operation, error)
- func (c *ImagesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsImageRequest, ...) (*computepb.TestPermissionsResponse, error)
- type InstanceGroupManagersCallOptions
- type InstanceGroupManagersClient
- func (c *InstanceGroupManagersClient) AbandonInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstanceGroupManagersRequest, ...) (*computepb.InstanceGroupManagerAggregatedList, error)
- func (c *InstanceGroupManagersClient) ApplyUpdatesToInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) Close() error
- func (c *InstanceGroupManagersClient) Connection() *grpc.ClientConn
- func (c *InstanceGroupManagersClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) Delete(ctx context.Context, req *computepb.DeleteInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) DeleteInstances(ctx context.Context, req *computepb.DeleteInstancesInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) DeletePerInstanceConfigs(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) Get(ctx context.Context, req *computepb.GetInstanceGroupManagerRequest, ...) (*computepb.InstanceGroupManager, error)
- func (c *InstanceGroupManagersClient) Insert(ctx context.Context, req *computepb.InsertInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) List(ctx context.Context, req *computepb.ListInstanceGroupManagersRequest, ...) (*computepb.InstanceGroupManagerList, error)
- func (c *InstanceGroupManagersClient) ListErrors(ctx context.Context, req *computepb.ListErrorsInstanceGroupManagersRequest, ...) (*computepb.InstanceGroupManagersListErrorsResponse, error)
- func (c *InstanceGroupManagersClient) ListManagedInstances(ctx context.Context, ...) (*computepb.InstanceGroupManagersListManagedInstancesResponse, error)
- func (c *InstanceGroupManagersClient) ListPerInstanceConfigs(ctx context.Context, ...) (*computepb.InstanceGroupManagersListPerInstanceConfigsResp, error)
- func (c *InstanceGroupManagersClient) Patch(ctx context.Context, req *computepb.PatchInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) PatchPerInstanceConfigs(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) RecreateInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) Resize(ctx context.Context, req *computepb.ResizeInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) SetInstanceTemplate(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) SetTargetPools(ctx context.Context, req *computepb.SetTargetPoolsInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupManagersClient) UpdatePerInstanceConfigs(ctx context.Context, ...) (*computepb.Operation, error)
- type InstanceGroupsCallOptions
- type InstanceGroupsClient
- func (c *InstanceGroupsClient) AddInstances(ctx context.Context, req *computepb.AddInstancesInstanceGroupRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstanceGroupsRequest, ...) (*computepb.InstanceGroupAggregatedList, error)
- func (c *InstanceGroupsClient) Close() error
- func (c *InstanceGroupsClient) Connection() *grpc.ClientConn
- func (c *InstanceGroupsClient) Delete(ctx context.Context, req *computepb.DeleteInstanceGroupRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupsClient) Get(ctx context.Context, req *computepb.GetInstanceGroupRequest, ...) (*computepb.InstanceGroup, error)
- func (c *InstanceGroupsClient) Insert(ctx context.Context, req *computepb.InsertInstanceGroupRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupsClient) List(ctx context.Context, req *computepb.ListInstanceGroupsRequest, ...) (*computepb.InstanceGroupList, error)
- func (c *InstanceGroupsClient) ListInstances(ctx context.Context, req *computepb.ListInstancesInstanceGroupsRequest, ...) (*computepb.InstanceGroupsListInstances, error)
- func (c *InstanceGroupsClient) RemoveInstances(ctx context.Context, req *computepb.RemoveInstancesInstanceGroupRequest, ...) (*computepb.Operation, error)
- func (c *InstanceGroupsClient) SetNamedPorts(ctx context.Context, req *computepb.SetNamedPortsInstanceGroupRequest, ...) (*computepb.Operation, error)
- type InstanceTemplatesCallOptions
- type InstanceTemplatesClient
- func (c *InstanceTemplatesClient) Close() error
- func (c *InstanceTemplatesClient) Connection() *grpc.ClientConn
- func (c *InstanceTemplatesClient) Delete(ctx context.Context, req *computepb.DeleteInstanceTemplateRequest, ...) (*computepb.Operation, error)
- func (c *InstanceTemplatesClient) Get(ctx context.Context, req *computepb.GetInstanceTemplateRequest, ...) (*computepb.InstanceTemplate, error)
- func (c *InstanceTemplatesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyInstanceTemplateRequest, ...) (*computepb.Policy, error)
- func (c *InstanceTemplatesClient) Insert(ctx context.Context, req *computepb.InsertInstanceTemplateRequest, ...) (*computepb.Operation, error)
- func (c *InstanceTemplatesClient) List(ctx context.Context, req *computepb.ListInstanceTemplatesRequest, ...) (*computepb.InstanceTemplateList, error)
- func (c *InstanceTemplatesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyInstanceTemplateRequest, ...) (*computepb.Policy, error)
- func (c *InstanceTemplatesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsInstanceTemplateRequest, ...) (*computepb.TestPermissionsResponse, error)
- type InstancesCallOptions
- type InstancesClient
- func (c *InstancesClient) AddAccessConfig(ctx context.Context, req *computepb.AddAccessConfigInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstancesRequest, ...) (*computepb.InstanceAggregatedList, error)
- func (c *InstancesClient) AttachDisk(ctx context.Context, req *computepb.AttachDiskInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) BulkInsert(ctx context.Context, req *computepb.BulkInsertInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) Close() error
- func (c *InstancesClient) Connection() *grpc.ClientConn
- func (c *InstancesClient) Delete(ctx context.Context, req *computepb.DeleteInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) DeleteAccessConfig(ctx context.Context, req *computepb.DeleteAccessConfigInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) DetachDisk(ctx context.Context, req *computepb.DetachDiskInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) Get(ctx context.Context, req *computepb.GetInstanceRequest, opts ...gax.CallOption) (*computepb.Instance, error)
- func (c *InstancesClient) GetEffectiveFirewalls(ctx context.Context, req *computepb.GetEffectiveFirewallsInstanceRequest, ...) (*computepb.InstancesGetEffectiveFirewallsResponse, error)
- func (c *InstancesClient) GetGuestAttributes(ctx context.Context, req *computepb.GetGuestAttributesInstanceRequest, ...) (*computepb.GuestAttributes, error)
- func (c *InstancesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyInstanceRequest, ...) (*computepb.Policy, error)
- func (c *InstancesClient) GetScreenshot(ctx context.Context, req *computepb.GetScreenshotInstanceRequest, ...) (*computepb.Screenshot, error)
- func (c *InstancesClient) GetSerialPortOutput(ctx context.Context, req *computepb.GetSerialPortOutputInstanceRequest, ...) (*computepb.SerialPortOutput, error)
- func (c *InstancesClient) GetShieldedInstanceIdentity(ctx context.Context, req *computepb.GetShieldedInstanceIdentityInstanceRequest, ...) (*computepb.ShieldedInstanceIdentity, error)
- func (c *InstancesClient) Insert(ctx context.Context, req *computepb.InsertInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) List(ctx context.Context, req *computepb.ListInstancesRequest, ...) (*computepb.InstanceList, error)
- func (c *InstancesClient) ListReferrers(ctx context.Context, req *computepb.ListReferrersInstancesRequest, ...) (*computepb.InstanceListReferrers, error)
- func (c *InstancesClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) Reset(ctx context.Context, req *computepb.ResetInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetDeletionProtection(ctx context.Context, req *computepb.SetDeletionProtectionInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetDiskAutoDelete(ctx context.Context, req *computepb.SetDiskAutoDeleteInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyInstanceRequest, ...) (*computepb.Policy, error)
- func (c *InstancesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetMachineResources(ctx context.Context, req *computepb.SetMachineResourcesInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetMachineType(ctx context.Context, req *computepb.SetMachineTypeInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetMetadata(ctx context.Context, req *computepb.SetMetadataInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetMinCpuPlatform(ctx context.Context, req *computepb.SetMinCpuPlatformInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetScheduling(ctx context.Context, req *computepb.SetSchedulingInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetServiceAccount(ctx context.Context, req *computepb.SetServiceAccountInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetShieldedInstanceIntegrityPolicy(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SetTags(ctx context.Context, req *computepb.SetTagsInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) SimulateMaintenanceEvent(ctx context.Context, req *computepb.SimulateMaintenanceEventInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) Start(ctx context.Context, req *computepb.StartInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) StartWithEncryptionKey(ctx context.Context, req *computepb.StartWithEncryptionKeyInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) Stop(ctx context.Context, req *computepb.StopInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsInstanceRequest, ...) (*computepb.TestPermissionsResponse, error)
- func (c *InstancesClient) Update(ctx context.Context, req *computepb.UpdateInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) UpdateAccessConfig(ctx context.Context, req *computepb.UpdateAccessConfigInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) UpdateDisplayDevice(ctx context.Context, req *computepb.UpdateDisplayDeviceInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) UpdateNetworkInterface(ctx context.Context, req *computepb.UpdateNetworkInterfaceInstanceRequest, ...) (*computepb.Operation, error)
- func (c *InstancesClient) UpdateShieldedInstanceConfig(ctx context.Context, ...) (*computepb.Operation, error)
- type InterconnectAttachmentsCallOptions
- type InterconnectAttachmentsClient
- func (c *InterconnectAttachmentsClient) AggregatedList(ctx context.Context, ...) (*computepb.InterconnectAttachmentAggregatedList, error)
- func (c *InterconnectAttachmentsClient) Close() error
- func (c *InterconnectAttachmentsClient) Connection() *grpc.ClientConn
- func (c *InterconnectAttachmentsClient) Delete(ctx context.Context, req *computepb.DeleteInterconnectAttachmentRequest, ...) (*computepb.Operation, error)
- func (c *InterconnectAttachmentsClient) Get(ctx context.Context, req *computepb.GetInterconnectAttachmentRequest, ...) (*computepb.InterconnectAttachment, error)
- func (c *InterconnectAttachmentsClient) Insert(ctx context.Context, req *computepb.InsertInterconnectAttachmentRequest, ...) (*computepb.Operation, error)
- func (c *InterconnectAttachmentsClient) List(ctx context.Context, req *computepb.ListInterconnectAttachmentsRequest, ...) (*computepb.InterconnectAttachmentList, error)
- func (c *InterconnectAttachmentsClient) Patch(ctx context.Context, req *computepb.PatchInterconnectAttachmentRequest, ...) (*computepb.Operation, error)
- type InterconnectLocationsCallOptions
- type InterconnectLocationsClient
- func (c *InterconnectLocationsClient) Close() error
- func (c *InterconnectLocationsClient) Connection() *grpc.ClientConn
- func (c *InterconnectLocationsClient) Get(ctx context.Context, req *computepb.GetInterconnectLocationRequest, ...) (*computepb.InterconnectLocation, error)
- func (c *InterconnectLocationsClient) List(ctx context.Context, req *computepb.ListInterconnectLocationsRequest, ...) (*computepb.InterconnectLocationList, error)
- type InterconnectsCallOptions
- type InterconnectsClient
- func (c *InterconnectsClient) Close() error
- func (c *InterconnectsClient) Connection() *grpc.ClientConn
- func (c *InterconnectsClient) Delete(ctx context.Context, req *computepb.DeleteInterconnectRequest, ...) (*computepb.Operation, error)
- func (c *InterconnectsClient) Get(ctx context.Context, req *computepb.GetInterconnectRequest, ...) (*computepb.Interconnect, error)
- func (c *InterconnectsClient) GetDiagnostics(ctx context.Context, req *computepb.GetDiagnosticsInterconnectRequest, ...) (*computepb.InterconnectsGetDiagnosticsResponse, error)
- func (c *InterconnectsClient) Insert(ctx context.Context, req *computepb.InsertInterconnectRequest, ...) (*computepb.Operation, error)
- func (c *InterconnectsClient) List(ctx context.Context, req *computepb.ListInterconnectsRequest, ...) (*computepb.InterconnectList, error)
- func (c *InterconnectsClient) Patch(ctx context.Context, req *computepb.PatchInterconnectRequest, ...) (*computepb.Operation, error)
- type LicenseCodesCallOptions
- type LicenseCodesClient
- func (c *LicenseCodesClient) Close() error
- func (c *LicenseCodesClient) Connection() *grpc.ClientConn
- func (c *LicenseCodesClient) Get(ctx context.Context, req *computepb.GetLicenseCodeRequest, ...) (*computepb.LicenseCode, error)
- func (c *LicenseCodesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsLicenseCodeRequest, ...) (*computepb.TestPermissionsResponse, error)
- type LicensesCallOptions
- type LicensesClient
- func (c *LicensesClient) Close() error
- func (c *LicensesClient) Connection() *grpc.ClientConn
- func (c *LicensesClient) Delete(ctx context.Context, req *computepb.DeleteLicenseRequest, ...) (*computepb.Operation, error)
- func (c *LicensesClient) Get(ctx context.Context, req *computepb.GetLicenseRequest, opts ...gax.CallOption) (*computepb.License, error)
- func (c *LicensesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyLicenseRequest, ...) (*computepb.Policy, error)
- func (c *LicensesClient) Insert(ctx context.Context, req *computepb.InsertLicenseRequest, ...) (*computepb.Operation, error)
- func (c *LicensesClient) List(ctx context.Context, req *computepb.ListLicensesRequest, ...) (*computepb.LicensesListResponse, error)
- func (c *LicensesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyLicenseRequest, ...) (*computepb.Policy, error)
- func (c *LicensesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsLicenseRequest, ...) (*computepb.TestPermissionsResponse, error)
- type MachineTypesCallOptions
- type MachineTypesClient
- func (c *MachineTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListMachineTypesRequest, ...) (*computepb.MachineTypeAggregatedList, error)
- func (c *MachineTypesClient) Close() error
- func (c *MachineTypesClient) Connection() *grpc.ClientConn
- func (c *MachineTypesClient) Get(ctx context.Context, req *computepb.GetMachineTypeRequest, ...) (*computepb.MachineType, error)
- func (c *MachineTypesClient) List(ctx context.Context, req *computepb.ListMachineTypesRequest, ...) (*computepb.MachineTypeList, error)
- type NetworkEndpointGroupsCallOptions
- type NetworkEndpointGroupsClient
- func (c *NetworkEndpointGroupsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNetworkEndpointGroupsRequest, ...) (*computepb.NetworkEndpointGroupAggregatedList, error)
- func (c *NetworkEndpointGroupsClient) AttachNetworkEndpoints(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *NetworkEndpointGroupsClient) Close() error
- func (c *NetworkEndpointGroupsClient) Connection() *grpc.ClientConn
- func (c *NetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteNetworkEndpointGroupRequest, ...) (*computepb.Operation, error)
- func (c *NetworkEndpointGroupsClient) DetachNetworkEndpoints(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *NetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetNetworkEndpointGroupRequest, ...) (*computepb.NetworkEndpointGroup, error)
- func (c *NetworkEndpointGroupsClient) Insert(ctx context.Context, req *computepb.InsertNetworkEndpointGroupRequest, ...) (*computepb.Operation, error)
- func (c *NetworkEndpointGroupsClient) List(ctx context.Context, req *computepb.ListNetworkEndpointGroupsRequest, ...) (*computepb.NetworkEndpointGroupList, error)
- func (c *NetworkEndpointGroupsClient) ListNetworkEndpoints(ctx context.Context, ...) (*computepb.NetworkEndpointGroupsListNetworkEndpoints, error)
- func (c *NetworkEndpointGroupsClient) TestIamPermissions(ctx context.Context, ...) (*computepb.TestPermissionsResponse, error)
- type NetworksCallOptions
- type NetworksClient
- func (c *NetworksClient) AddPeering(ctx context.Context, req *computepb.AddPeeringNetworkRequest, ...) (*computepb.Operation, error)
- func (c *NetworksClient) Close() error
- func (c *NetworksClient) Connection() *grpc.ClientConn
- func (c *NetworksClient) Delete(ctx context.Context, req *computepb.DeleteNetworkRequest, ...) (*computepb.Operation, error)
- func (c *NetworksClient) Get(ctx context.Context, req *computepb.GetNetworkRequest, opts ...gax.CallOption) (*computepb.Network, error)
- func (c *NetworksClient) GetEffectiveFirewalls(ctx context.Context, req *computepb.GetEffectiveFirewallsNetworkRequest, ...) (*computepb.NetworksGetEffectiveFirewallsResponse, error)
- func (c *NetworksClient) Insert(ctx context.Context, req *computepb.InsertNetworkRequest, ...) (*computepb.Operation, error)
- func (c *NetworksClient) List(ctx context.Context, req *computepb.ListNetworksRequest, ...) (*computepb.NetworkList, error)
- func (c *NetworksClient) ListPeeringRoutes(ctx context.Context, req *computepb.ListPeeringRoutesNetworksRequest, ...) (*computepb.ExchangedPeeringRoutesList, error)
- func (c *NetworksClient) Patch(ctx context.Context, req *computepb.PatchNetworkRequest, ...) (*computepb.Operation, error)
- func (c *NetworksClient) RemovePeering(ctx context.Context, req *computepb.RemovePeeringNetworkRequest, ...) (*computepb.Operation, error)
- func (c *NetworksClient) SwitchToCustomMode(ctx context.Context, req *computepb.SwitchToCustomModeNetworkRequest, ...) (*computepb.Operation, error)
- func (c *NetworksClient) UpdatePeering(ctx context.Context, req *computepb.UpdatePeeringNetworkRequest, ...) (*computepb.Operation, error)
- type NodeGroupsCallOptions
- type NodeGroupsClient
- func (c *NodeGroupsClient) AddNodes(ctx context.Context, req *computepb.AddNodesNodeGroupRequest, ...) (*computepb.Operation, error)
- func (c *NodeGroupsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNodeGroupsRequest, ...) (*computepb.NodeGroupAggregatedList, error)
- func (c *NodeGroupsClient) Close() error
- func (c *NodeGroupsClient) Connection() *grpc.ClientConn
- func (c *NodeGroupsClient) Delete(ctx context.Context, req *computepb.DeleteNodeGroupRequest, ...) (*computepb.Operation, error)
- func (c *NodeGroupsClient) DeleteNodes(ctx context.Context, req *computepb.DeleteNodesNodeGroupRequest, ...) (*computepb.Operation, error)
- func (c *NodeGroupsClient) Get(ctx context.Context, req *computepb.GetNodeGroupRequest, ...) (*computepb.NodeGroup, error)
- func (c *NodeGroupsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyNodeGroupRequest, ...) (*computepb.Policy, error)
- func (c *NodeGroupsClient) Insert(ctx context.Context, req *computepb.InsertNodeGroupRequest, ...) (*computepb.Operation, error)
- func (c *NodeGroupsClient) List(ctx context.Context, req *computepb.ListNodeGroupsRequest, ...) (*computepb.NodeGroupList, error)
- func (c *NodeGroupsClient) ListNodes(ctx context.Context, req *computepb.ListNodesNodeGroupsRequest, ...) (*computepb.NodeGroupsListNodes, error)
- func (c *NodeGroupsClient) Patch(ctx context.Context, req *computepb.PatchNodeGroupRequest, ...) (*computepb.Operation, error)
- func (c *NodeGroupsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNodeGroupRequest, ...) (*computepb.Policy, error)
- func (c *NodeGroupsClient) SetNodeTemplate(ctx context.Context, req *computepb.SetNodeTemplateNodeGroupRequest, ...) (*computepb.Operation, error)
- func (c *NodeGroupsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsNodeGroupRequest, ...) (*computepb.TestPermissionsResponse, error)
- type NodeTemplatesCallOptions
- type NodeTemplatesClient
- func (c *NodeTemplatesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNodeTemplatesRequest, ...) (*computepb.NodeTemplateAggregatedList, error)
- func (c *NodeTemplatesClient) Close() error
- func (c *NodeTemplatesClient) Connection() *grpc.ClientConn
- func (c *NodeTemplatesClient) Delete(ctx context.Context, req *computepb.DeleteNodeTemplateRequest, ...) (*computepb.Operation, error)
- func (c *NodeTemplatesClient) Get(ctx context.Context, req *computepb.GetNodeTemplateRequest, ...) (*computepb.NodeTemplate, error)
- func (c *NodeTemplatesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyNodeTemplateRequest, ...) (*computepb.Policy, error)
- func (c *NodeTemplatesClient) Insert(ctx context.Context, req *computepb.InsertNodeTemplateRequest, ...) (*computepb.Operation, error)
- func (c *NodeTemplatesClient) List(ctx context.Context, req *computepb.ListNodeTemplatesRequest, ...) (*computepb.NodeTemplateList, error)
- func (c *NodeTemplatesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNodeTemplateRequest, ...) (*computepb.Policy, error)
- func (c *NodeTemplatesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsNodeTemplateRequest, ...) (*computepb.TestPermissionsResponse, error)
- type NodeTypesCallOptions
- type NodeTypesClient
- func (c *NodeTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNodeTypesRequest, ...) (*computepb.NodeTypeAggregatedList, error)
- func (c *NodeTypesClient) Close() error
- func (c *NodeTypesClient) Connection() *grpc.ClientConn
- func (c *NodeTypesClient) Get(ctx context.Context, req *computepb.GetNodeTypeRequest, opts ...gax.CallOption) (*computepb.NodeType, error)
- func (c *NodeTypesClient) List(ctx context.Context, req *computepb.ListNodeTypesRequest, ...) (*computepb.NodeTypeList, error)
- type PacketMirroringsCallOptions
- type PacketMirroringsClient
- func (c *PacketMirroringsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListPacketMirroringsRequest, ...) (*computepb.PacketMirroringAggregatedList, error)
- func (c *PacketMirroringsClient) Close() error
- func (c *PacketMirroringsClient) Connection() *grpc.ClientConn
- func (c *PacketMirroringsClient) Delete(ctx context.Context, req *computepb.DeletePacketMirroringRequest, ...) (*computepb.Operation, error)
- func (c *PacketMirroringsClient) Get(ctx context.Context, req *computepb.GetPacketMirroringRequest, ...) (*computepb.PacketMirroring, error)
- func (c *PacketMirroringsClient) Insert(ctx context.Context, req *computepb.InsertPacketMirroringRequest, ...) (*computepb.Operation, error)
- func (c *PacketMirroringsClient) List(ctx context.Context, req *computepb.ListPacketMirroringsRequest, ...) (*computepb.PacketMirroringList, error)
- func (c *PacketMirroringsClient) Patch(ctx context.Context, req *computepb.PatchPacketMirroringRequest, ...) (*computepb.Operation, error)
- func (c *PacketMirroringsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsPacketMirroringRequest, ...) (*computepb.TestPermissionsResponse, error)
- type ProjectsCallOptions
- type ProjectsClient
- func (c *ProjectsClient) Close() error
- func (c *ProjectsClient) Connection() *grpc.ClientConn
- func (c *ProjectsClient) DisableXpnHost(ctx context.Context, req *computepb.DisableXpnHostProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) DisableXpnResource(ctx context.Context, req *computepb.DisableXpnResourceProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) EnableXpnHost(ctx context.Context, req *computepb.EnableXpnHostProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) EnableXpnResource(ctx context.Context, req *computepb.EnableXpnResourceProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) Get(ctx context.Context, req *computepb.GetProjectRequest, opts ...gax.CallOption) (*computepb.Project, error)
- func (c *ProjectsClient) GetXpnHost(ctx context.Context, req *computepb.GetXpnHostProjectRequest, ...) (*computepb.Project, error)
- func (c *ProjectsClient) GetXpnResources(ctx context.Context, req *computepb.GetXpnResourcesProjectsRequest, ...) (*computepb.ProjectsGetXpnResources, error)
- func (c *ProjectsClient) ListXpnHosts(ctx context.Context, req *computepb.ListXpnHostsProjectsRequest, ...) (*computepb.XpnHostList, error)
- func (c *ProjectsClient) MoveDisk(ctx context.Context, req *computepb.MoveDiskProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) MoveInstance(ctx context.Context, req *computepb.MoveInstanceProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) SetCommonInstanceMetadata(ctx context.Context, req *computepb.SetCommonInstanceMetadataProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) SetDefaultNetworkTier(ctx context.Context, req *computepb.SetDefaultNetworkTierProjectRequest, ...) (*computepb.Operation, error)
- func (c *ProjectsClient) SetUsageExportBucket(ctx context.Context, req *computepb.SetUsageExportBucketProjectRequest, ...) (*computepb.Operation, error)
- type PublicAdvertisedPrefixesCallOptions
- type PublicAdvertisedPrefixesClient
- func (c *PublicAdvertisedPrefixesClient) Close() error
- func (c *PublicAdvertisedPrefixesClient) Connection() *grpc.ClientConn
- func (c *PublicAdvertisedPrefixesClient) Delete(ctx context.Context, req *computepb.DeletePublicAdvertisedPrefixeRequest, ...) (*computepb.Operation, error)
- func (c *PublicAdvertisedPrefixesClient) Get(ctx context.Context, req *computepb.GetPublicAdvertisedPrefixeRequest, ...) (*computepb.PublicAdvertisedPrefix, error)
- func (c *PublicAdvertisedPrefixesClient) Insert(ctx context.Context, req *computepb.InsertPublicAdvertisedPrefixeRequest, ...) (*computepb.Operation, error)
- func (c *PublicAdvertisedPrefixesClient) List(ctx context.Context, req *computepb.ListPublicAdvertisedPrefixesRequest, ...) (*computepb.PublicAdvertisedPrefixList, error)
- func (c *PublicAdvertisedPrefixesClient) Patch(ctx context.Context, req *computepb.PatchPublicAdvertisedPrefixeRequest, ...) (*computepb.Operation, error)
- type PublicDelegatedPrefixesCallOptions
- type PublicDelegatedPrefixesClient
- func (c *PublicDelegatedPrefixesClient) AggregatedList(ctx context.Context, ...) (*computepb.PublicDelegatedPrefixAggregatedList, error)
- func (c *PublicDelegatedPrefixesClient) Close() error
- func (c *PublicDelegatedPrefixesClient) Connection() *grpc.ClientConn
- func (c *PublicDelegatedPrefixesClient) Delete(ctx context.Context, req *computepb.DeletePublicDelegatedPrefixeRequest, ...) (*computepb.Operation, error)
- func (c *PublicDelegatedPrefixesClient) Get(ctx context.Context, req *computepb.GetPublicDelegatedPrefixeRequest, ...) (*computepb.PublicDelegatedPrefix, error)
- func (c *PublicDelegatedPrefixesClient) Insert(ctx context.Context, req *computepb.InsertPublicDelegatedPrefixeRequest, ...) (*computepb.Operation, error)
- func (c *PublicDelegatedPrefixesClient) List(ctx context.Context, req *computepb.ListPublicDelegatedPrefixesRequest, ...) (*computepb.PublicDelegatedPrefixList, error)
- func (c *PublicDelegatedPrefixesClient) Patch(ctx context.Context, req *computepb.PatchPublicDelegatedPrefixeRequest, ...) (*computepb.Operation, error)
- type RegionAutoscalersCallOptions
- type RegionAutoscalersClient
- func (c *RegionAutoscalersClient) Close() error
- func (c *RegionAutoscalersClient) Connection() *grpc.ClientConn
- func (c *RegionAutoscalersClient) Delete(ctx context.Context, req *computepb.DeleteRegionAutoscalerRequest, ...) (*computepb.Operation, error)
- func (c *RegionAutoscalersClient) Get(ctx context.Context, req *computepb.GetRegionAutoscalerRequest, ...) (*computepb.Autoscaler, error)
- func (c *RegionAutoscalersClient) Insert(ctx context.Context, req *computepb.InsertRegionAutoscalerRequest, ...) (*computepb.Operation, error)
- func (c *RegionAutoscalersClient) List(ctx context.Context, req *computepb.ListRegionAutoscalersRequest, ...) (*computepb.RegionAutoscalerList, error)
- func (c *RegionAutoscalersClient) Patch(ctx context.Context, req *computepb.PatchRegionAutoscalerRequest, ...) (*computepb.Operation, error)
- func (c *RegionAutoscalersClient) Update(ctx context.Context, req *computepb.UpdateRegionAutoscalerRequest, ...) (*computepb.Operation, error)
- type RegionBackendServicesCallOptions
- type RegionBackendServicesClient
- func (c *RegionBackendServicesClient) Close() error
- func (c *RegionBackendServicesClient) Connection() *grpc.ClientConn
- func (c *RegionBackendServicesClient) Delete(ctx context.Context, req *computepb.DeleteRegionBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *RegionBackendServicesClient) Get(ctx context.Context, req *computepb.GetRegionBackendServiceRequest, ...) (*computepb.BackendService, error)
- func (c *RegionBackendServicesClient) GetHealth(ctx context.Context, req *computepb.GetHealthRegionBackendServiceRequest, ...) (*computepb.BackendServiceGroupHealth, error)
- func (c *RegionBackendServicesClient) Insert(ctx context.Context, req *computepb.InsertRegionBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *RegionBackendServicesClient) List(ctx context.Context, req *computepb.ListRegionBackendServicesRequest, ...) (*computepb.BackendServiceList, error)
- func (c *RegionBackendServicesClient) Patch(ctx context.Context, req *computepb.PatchRegionBackendServiceRequest, ...) (*computepb.Operation, error)
- func (c *RegionBackendServicesClient) Update(ctx context.Context, req *computepb.UpdateRegionBackendServiceRequest, ...) (*computepb.Operation, error)
- type RegionCommitmentsCallOptions
- type RegionCommitmentsClient
- func (c *RegionCommitmentsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListRegionCommitmentsRequest, ...) (*computepb.CommitmentAggregatedList, error)
- func (c *RegionCommitmentsClient) Close() error
- func (c *RegionCommitmentsClient) Connection() *grpc.ClientConn
- func (c *RegionCommitmentsClient) Get(ctx context.Context, req *computepb.GetRegionCommitmentRequest, ...) (*computepb.Commitment, error)
- func (c *RegionCommitmentsClient) Insert(ctx context.Context, req *computepb.InsertRegionCommitmentRequest, ...) (*computepb.Operation, error)
- func (c *RegionCommitmentsClient) List(ctx context.Context, req *computepb.ListRegionCommitmentsRequest, ...) (*computepb.CommitmentList, error)
- type RegionDiskTypesCallOptions
- type RegionDiskTypesClient
- func (c *RegionDiskTypesClient) Close() error
- func (c *RegionDiskTypesClient) Connection() *grpc.ClientConn
- func (c *RegionDiskTypesClient) Get(ctx context.Context, req *computepb.GetRegionDiskTypeRequest, ...) (*computepb.DiskType, error)
- func (c *RegionDiskTypesClient) List(ctx context.Context, req *computepb.ListRegionDiskTypesRequest, ...) (*computepb.RegionDiskTypeList, error)
- type RegionDisksCallOptions
- type RegionDisksClient
- func (c *RegionDisksClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) Close() error
- func (c *RegionDisksClient) Connection() *grpc.ClientConn
- func (c *RegionDisksClient) CreateSnapshot(ctx context.Context, req *computepb.CreateSnapshotRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) Delete(ctx context.Context, req *computepb.DeleteRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) Get(ctx context.Context, req *computepb.GetRegionDiskRequest, ...) (*computepb.Disk, error)
- func (c *RegionDisksClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyRegionDiskRequest, ...) (*computepb.Policy, error)
- func (c *RegionDisksClient) Insert(ctx context.Context, req *computepb.InsertRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) List(ctx context.Context, req *computepb.ListRegionDisksRequest, ...) (*computepb.DiskList, error)
- func (c *RegionDisksClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) Resize(ctx context.Context, req *computepb.ResizeRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyRegionDiskRequest, ...) (*computepb.Policy, error)
- func (c *RegionDisksClient) SetLabels(ctx context.Context, req *computepb.SetLabelsRegionDiskRequest, ...) (*computepb.Operation, error)
- func (c *RegionDisksClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsRegionDiskRequest, ...) (*computepb.TestPermissionsResponse, error)
- type RegionHealthCheckServicesCallOptions
- type RegionHealthCheckServicesClient
- func (c *RegionHealthCheckServicesClient) Close() error
- func (c *RegionHealthCheckServicesClient) Connection() *grpc.ClientConn
- func (c *RegionHealthCheckServicesClient) Delete(ctx context.Context, req *computepb.DeleteRegionHealthCheckServiceRequest, ...) (*computepb.Operation, error)
- func (c *RegionHealthCheckServicesClient) Get(ctx context.Context, req *computepb.GetRegionHealthCheckServiceRequest, ...) (*computepb.HealthCheckService, error)
- func (c *RegionHealthCheckServicesClient) Insert(ctx context.Context, req *computepb.InsertRegionHealthCheckServiceRequest, ...) (*computepb.Operation, error)
- func (c *RegionHealthCheckServicesClient) List(ctx context.Context, req *computepb.ListRegionHealthCheckServicesRequest, ...) (*computepb.HealthCheckServicesList, error)
- func (c *RegionHealthCheckServicesClient) Patch(ctx context.Context, req *computepb.PatchRegionHealthCheckServiceRequest, ...) (*computepb.Operation, error)
- type RegionHealthChecksCallOptions
- type RegionHealthChecksClient
- func (c *RegionHealthChecksClient) Close() error
- func (c *RegionHealthChecksClient) Connection() *grpc.ClientConn
- func (c *RegionHealthChecksClient) Delete(ctx context.Context, req *computepb.DeleteRegionHealthCheckRequest, ...) (*computepb.Operation, error)
- func (c *RegionHealthChecksClient) Get(ctx context.Context, req *computepb.GetRegionHealthCheckRequest, ...) (*computepb.HealthCheck, error)
- func (c *RegionHealthChecksClient) Insert(ctx context.Context, req *computepb.InsertRegionHealthCheckRequest, ...) (*computepb.Operation, error)
- func (c *RegionHealthChecksClient) List(ctx context.Context, req *computepb.ListRegionHealthChecksRequest, ...) (*computepb.HealthCheckList, error)
- func (c *RegionHealthChecksClient) Patch(ctx context.Context, req *computepb.PatchRegionHealthCheckRequest, ...) (*computepb.Operation, error)
- func (c *RegionHealthChecksClient) Update(ctx context.Context, req *computepb.UpdateRegionHealthCheckRequest, ...) (*computepb.Operation, error)
- type RegionInstanceGroupManagersCallOptions
- type RegionInstanceGroupManagersClient
- func (c *RegionInstanceGroupManagersClient) AbandonInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) ApplyUpdatesToInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) Close() error
- func (c *RegionInstanceGroupManagersClient) Connection() *grpc.ClientConn
- func (c *RegionInstanceGroupManagersClient) CreateInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) Delete(ctx context.Context, req *computepb.DeleteRegionInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) DeleteInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) DeletePerInstanceConfigs(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) Get(ctx context.Context, req *computepb.GetRegionInstanceGroupManagerRequest, ...) (*computepb.InstanceGroupManager, error)
- func (c *RegionInstanceGroupManagersClient) Insert(ctx context.Context, req *computepb.InsertRegionInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) List(ctx context.Context, req *computepb.ListRegionInstanceGroupManagersRequest, ...) (*computepb.RegionInstanceGroupManagerList, error)
- func (c *RegionInstanceGroupManagersClient) ListErrors(ctx context.Context, ...) (*computepb.RegionInstanceGroupManagersListErrorsResponse, error)
- func (c *RegionInstanceGroupManagersClient) ListManagedInstances(ctx context.Context, ...) (*computepb.RegionInstanceGroupManagersListInstancesResponse, error)
- func (c *RegionInstanceGroupManagersClient) ListPerInstanceConfigs(ctx context.Context, ...) (*computepb.RegionInstanceGroupManagersListInstanceConfigsResp, error)
- func (c *RegionInstanceGroupManagersClient) Patch(ctx context.Context, req *computepb.PatchRegionInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) PatchPerInstanceConfigs(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) RecreateInstances(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) Resize(ctx context.Context, req *computepb.ResizeRegionInstanceGroupManagerRequest, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) SetInstanceTemplate(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) SetTargetPools(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionInstanceGroupManagersClient) UpdatePerInstanceConfigs(ctx context.Context, ...) (*computepb.Operation, error)
- type RegionInstanceGroupsCallOptions
- type RegionInstanceGroupsClient
- func (c *RegionInstanceGroupsClient) Close() error
- func (c *RegionInstanceGroupsClient) Connection() *grpc.ClientConn
- func (c *RegionInstanceGroupsClient) Get(ctx context.Context, req *computepb.GetRegionInstanceGroupRequest, ...) (*computepb.InstanceGroup, error)
- func (c *RegionInstanceGroupsClient) List(ctx context.Context, req *computepb.ListRegionInstanceGroupsRequest, ...) (*computepb.RegionInstanceGroupList, error)
- func (c *RegionInstanceGroupsClient) ListInstances(ctx context.Context, req *computepb.ListInstancesRegionInstanceGroupsRequest, ...) (*computepb.RegionInstanceGroupsListInstances, error)
- func (c *RegionInstanceGroupsClient) SetNamedPorts(ctx context.Context, req *computepb.SetNamedPortsRegionInstanceGroupRequest, ...) (*computepb.Operation, error)
- type RegionInstancesCallOptions
- type RegionInstancesClient
- type RegionNetworkEndpointGroupsCallOptions
- type RegionNetworkEndpointGroupsClient
- func (c *RegionNetworkEndpointGroupsClient) Close() error
- func (c *RegionNetworkEndpointGroupsClient) Connection() *grpc.ClientConn
- func (c *RegionNetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteRegionNetworkEndpointGroupRequest, ...) (*computepb.Operation, error)
- func (c *RegionNetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetRegionNetworkEndpointGroupRequest, ...) (*computepb.NetworkEndpointGroup, error)
- func (c *RegionNetworkEndpointGroupsClient) Insert(ctx context.Context, req *computepb.InsertRegionNetworkEndpointGroupRequest, ...) (*computepb.Operation, error)
- func (c *RegionNetworkEndpointGroupsClient) List(ctx context.Context, req *computepb.ListRegionNetworkEndpointGroupsRequest, ...) (*computepb.NetworkEndpointGroupList, error)
- type RegionNotificationEndpointsCallOptions
- type RegionNotificationEndpointsClient
- func (c *RegionNotificationEndpointsClient) Close() error
- func (c *RegionNotificationEndpointsClient) Connection() *grpc.ClientConn
- func (c *RegionNotificationEndpointsClient) Delete(ctx context.Context, req *computepb.DeleteRegionNotificationEndpointRequest, ...) (*computepb.Operation, error)
- func (c *RegionNotificationEndpointsClient) Get(ctx context.Context, req *computepb.GetRegionNotificationEndpointRequest, ...) (*computepb.NotificationEndpoint, error)
- func (c *RegionNotificationEndpointsClient) Insert(ctx context.Context, req *computepb.InsertRegionNotificationEndpointRequest, ...) (*computepb.Operation, error)
- func (c *RegionNotificationEndpointsClient) List(ctx context.Context, req *computepb.ListRegionNotificationEndpointsRequest, ...) (*computepb.NotificationEndpointList, error)
- type RegionOperationsCallOptions
- type RegionOperationsClient
- func (c *RegionOperationsClient) Close() error
- func (c *RegionOperationsClient) Connection() *grpc.ClientConn
- func (c *RegionOperationsClient) Delete(ctx context.Context, req *computepb.DeleteRegionOperationRequest, ...) (*computepb.DeleteRegionOperationResponse, error)
- func (c *RegionOperationsClient) Get(ctx context.Context, req *computepb.GetRegionOperationRequest, ...) (*computepb.Operation, error)
- func (c *RegionOperationsClient) List(ctx context.Context, req *computepb.ListRegionOperationsRequest, ...) (*computepb.OperationList, error)
- func (c *RegionOperationsClient) Wait(ctx context.Context, req *computepb.WaitRegionOperationRequest, ...) (*computepb.Operation, error)
- type RegionSslCertificatesCallOptions
- type RegionSslCertificatesClient
- func (c *RegionSslCertificatesClient) Close() error
- func (c *RegionSslCertificatesClient) Connection() *grpc.ClientConn
- func (c *RegionSslCertificatesClient) Delete(ctx context.Context, req *computepb.DeleteRegionSslCertificateRequest, ...) (*computepb.Operation, error)
- func (c *RegionSslCertificatesClient) Get(ctx context.Context, req *computepb.GetRegionSslCertificateRequest, ...) (*computepb.SslCertificate, error)
- func (c *RegionSslCertificatesClient) Insert(ctx context.Context, req *computepb.InsertRegionSslCertificateRequest, ...) (*computepb.Operation, error)
- func (c *RegionSslCertificatesClient) List(ctx context.Context, req *computepb.ListRegionSslCertificatesRequest, ...) (*computepb.SslCertificateList, error)
- type RegionTargetHttpProxiesCallOptions
- type RegionTargetHttpProxiesClient
- func (c *RegionTargetHttpProxiesClient) Close() error
- func (c *RegionTargetHttpProxiesClient) Connection() *grpc.ClientConn
- func (c *RegionTargetHttpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteRegionTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- func (c *RegionTargetHttpProxiesClient) Get(ctx context.Context, req *computepb.GetRegionTargetHttpProxyRequest, ...) (*computepb.TargetHttpProxy, error)
- func (c *RegionTargetHttpProxiesClient) Insert(ctx context.Context, req *computepb.InsertRegionTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- func (c *RegionTargetHttpProxiesClient) List(ctx context.Context, req *computepb.ListRegionTargetHttpProxiesRequest, ...) (*computepb.TargetHttpProxyList, error)
- func (c *RegionTargetHttpProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapRegionTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- type RegionTargetHttpsProxiesCallOptions
- type RegionTargetHttpsProxiesClient
- func (c *RegionTargetHttpsProxiesClient) Close() error
- func (c *RegionTargetHttpsProxiesClient) Connection() *grpc.ClientConn
- func (c *RegionTargetHttpsProxiesClient) Delete(ctx context.Context, req *computepb.DeleteRegionTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *RegionTargetHttpsProxiesClient) Get(ctx context.Context, req *computepb.GetRegionTargetHttpsProxyRequest, ...) (*computepb.TargetHttpsProxy, error)
- func (c *RegionTargetHttpsProxiesClient) Insert(ctx context.Context, req *computepb.InsertRegionTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *RegionTargetHttpsProxiesClient) List(ctx context.Context, req *computepb.ListRegionTargetHttpsProxiesRequest, ...) (*computepb.TargetHttpsProxyList, error)
- func (c *RegionTargetHttpsProxiesClient) SetSslCertificates(ctx context.Context, ...) (*computepb.Operation, error)
- func (c *RegionTargetHttpsProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapRegionTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- type RegionUrlMapsCallOptions
- type RegionUrlMapsClient
- func (c *RegionUrlMapsClient) Close() error
- func (c *RegionUrlMapsClient) Connection() *grpc.ClientConn
- func (c *RegionUrlMapsClient) Delete(ctx context.Context, req *computepb.DeleteRegionUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *RegionUrlMapsClient) Get(ctx context.Context, req *computepb.GetRegionUrlMapRequest, ...) (*computepb.UrlMap, error)
- func (c *RegionUrlMapsClient) Insert(ctx context.Context, req *computepb.InsertRegionUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *RegionUrlMapsClient) List(ctx context.Context, req *computepb.ListRegionUrlMapsRequest, ...) (*computepb.UrlMapList, error)
- func (c *RegionUrlMapsClient) Patch(ctx context.Context, req *computepb.PatchRegionUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *RegionUrlMapsClient) Update(ctx context.Context, req *computepb.UpdateRegionUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *RegionUrlMapsClient) Validate(ctx context.Context, req *computepb.ValidateRegionUrlMapRequest, ...) (*computepb.UrlMapsValidateResponse, error)
- type RegionsCallOptions
- type RegionsClient
- func (c *RegionsClient) Close() error
- func (c *RegionsClient) Connection() *grpc.ClientConn
- func (c *RegionsClient) Get(ctx context.Context, req *computepb.GetRegionRequest, opts ...gax.CallOption) (*computepb.Region, error)
- func (c *RegionsClient) List(ctx context.Context, req *computepb.ListRegionsRequest, opts ...gax.CallOption) (*computepb.RegionList, error)
- type ReservationsCallOptions
- type ReservationsClient
- func (c *ReservationsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListReservationsRequest, ...) (*computepb.ReservationAggregatedList, error)
- func (c *ReservationsClient) Close() error
- func (c *ReservationsClient) Connection() *grpc.ClientConn
- func (c *ReservationsClient) Delete(ctx context.Context, req *computepb.DeleteReservationRequest, ...) (*computepb.Operation, error)
- func (c *ReservationsClient) Get(ctx context.Context, req *computepb.GetReservationRequest, ...) (*computepb.Reservation, error)
- func (c *ReservationsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyReservationRequest, ...) (*computepb.Policy, error)
- func (c *ReservationsClient) Insert(ctx context.Context, req *computepb.InsertReservationRequest, ...) (*computepb.Operation, error)
- func (c *ReservationsClient) List(ctx context.Context, req *computepb.ListReservationsRequest, ...) (*computepb.ReservationList, error)
- func (c *ReservationsClient) Resize(ctx context.Context, req *computepb.ResizeReservationRequest, ...) (*computepb.Operation, error)
- func (c *ReservationsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyReservationRequest, ...) (*computepb.Policy, error)
- func (c *ReservationsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsReservationRequest, ...) (*computepb.TestPermissionsResponse, error)
- type ResourcePoliciesCallOptions
- type ResourcePoliciesClient
- func (c *ResourcePoliciesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListResourcePoliciesRequest, ...) (*computepb.ResourcePolicyAggregatedList, error)
- func (c *ResourcePoliciesClient) Close() error
- func (c *ResourcePoliciesClient) Connection() *grpc.ClientConn
- func (c *ResourcePoliciesClient) Delete(ctx context.Context, req *computepb.DeleteResourcePolicyRequest, ...) (*computepb.Operation, error)
- func (c *ResourcePoliciesClient) Get(ctx context.Context, req *computepb.GetResourcePolicyRequest, ...) (*computepb.ResourcePolicy, error)
- func (c *ResourcePoliciesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyResourcePolicyRequest, ...) (*computepb.Policy, error)
- func (c *ResourcePoliciesClient) Insert(ctx context.Context, req *computepb.InsertResourcePolicyRequest, ...) (*computepb.Operation, error)
- func (c *ResourcePoliciesClient) List(ctx context.Context, req *computepb.ListResourcePoliciesRequest, ...) (*computepb.ResourcePolicyList, error)
- func (c *ResourcePoliciesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyResourcePolicyRequest, ...) (*computepb.Policy, error)
- func (c *ResourcePoliciesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsResourcePolicyRequest, ...) (*computepb.TestPermissionsResponse, error)
- type RoutersCallOptions
- type RoutersClient
- func (c *RoutersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListRoutersRequest, ...) (*computepb.RouterAggregatedList, error)
- func (c *RoutersClient) Close() error
- func (c *RoutersClient) Connection() *grpc.ClientConn
- func (c *RoutersClient) Delete(ctx context.Context, req *computepb.DeleteRouterRequest, ...) (*computepb.Operation, error)
- func (c *RoutersClient) Get(ctx context.Context, req *computepb.GetRouterRequest, opts ...gax.CallOption) (*computepb.Router, error)
- func (c *RoutersClient) GetNatMappingInfo(ctx context.Context, req *computepb.GetNatMappingInfoRoutersRequest, ...) (*computepb.VmEndpointNatMappingsList, error)
- func (c *RoutersClient) GetRouterStatus(ctx context.Context, req *computepb.GetRouterStatusRouterRequest, ...) (*computepb.RouterStatusResponse, error)
- func (c *RoutersClient) Insert(ctx context.Context, req *computepb.InsertRouterRequest, ...) (*computepb.Operation, error)
- func (c *RoutersClient) List(ctx context.Context, req *computepb.ListRoutersRequest, opts ...gax.CallOption) (*computepb.RouterList, error)
- func (c *RoutersClient) Patch(ctx context.Context, req *computepb.PatchRouterRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *RoutersClient) Preview(ctx context.Context, req *computepb.PreviewRouterRequest, ...) (*computepb.RoutersPreviewResponse, error)
- func (c *RoutersClient) Update(ctx context.Context, req *computepb.UpdateRouterRequest, ...) (*computepb.Operation, error)
- type RoutesCallOptions
- type RoutesClient
- func (c *RoutesClient) Close() error
- func (c *RoutesClient) Connection() *grpc.ClientConn
- func (c *RoutesClient) Delete(ctx context.Context, req *computepb.DeleteRouteRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *RoutesClient) Get(ctx context.Context, req *computepb.GetRouteRequest, opts ...gax.CallOption) (*computepb.Route, error)
- func (c *RoutesClient) Insert(ctx context.Context, req *computepb.InsertRouteRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *RoutesClient) List(ctx context.Context, req *computepb.ListRoutesRequest, opts ...gax.CallOption) (*computepb.RouteList, error)
- type SecurityPoliciesCallOptions
- type SecurityPoliciesClient
- func (c *SecurityPoliciesClient) AddRule(ctx context.Context, req *computepb.AddRuleSecurityPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SecurityPoliciesClient) Close() error
- func (c *SecurityPoliciesClient) Connection() *grpc.ClientConn
- func (c *SecurityPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteSecurityPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SecurityPoliciesClient) Get(ctx context.Context, req *computepb.GetSecurityPolicyRequest, ...) (*computepb.SecurityPolicy, error)
- func (c *SecurityPoliciesClient) GetRule(ctx context.Context, req *computepb.GetRuleSecurityPolicyRequest, ...) (*computepb.SecurityPolicyRule, error)
- func (c *SecurityPoliciesClient) Insert(ctx context.Context, req *computepb.InsertSecurityPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SecurityPoliciesClient) List(ctx context.Context, req *computepb.ListSecurityPoliciesRequest, ...) (*computepb.SecurityPolicyList, error)
- func (c *SecurityPoliciesClient) ListPreconfiguredExpressionSets(ctx context.Context, ...) (*computepb.SecurityPoliciesListPreconfiguredExpressionSetsResponse, error)
- func (c *SecurityPoliciesClient) Patch(ctx context.Context, req *computepb.PatchSecurityPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SecurityPoliciesClient) PatchRule(ctx context.Context, req *computepb.PatchRuleSecurityPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SecurityPoliciesClient) RemoveRule(ctx context.Context, req *computepb.RemoveRuleSecurityPolicyRequest, ...) (*computepb.Operation, error)
- type SnapshotsCallOptions
- type SnapshotsClient
- func (c *SnapshotsClient) Close() error
- func (c *SnapshotsClient) Connection() *grpc.ClientConn
- func (c *SnapshotsClient) Delete(ctx context.Context, req *computepb.DeleteSnapshotRequest, ...) (*computepb.Operation, error)
- func (c *SnapshotsClient) Get(ctx context.Context, req *computepb.GetSnapshotRequest, opts ...gax.CallOption) (*computepb.Snapshot, error)
- func (c *SnapshotsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicySnapshotRequest, ...) (*computepb.Policy, error)
- func (c *SnapshotsClient) List(ctx context.Context, req *computepb.ListSnapshotsRequest, ...) (*computepb.SnapshotList, error)
- func (c *SnapshotsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicySnapshotRequest, ...) (*computepb.Policy, error)
- func (c *SnapshotsClient) SetLabels(ctx context.Context, req *computepb.SetLabelsSnapshotRequest, ...) (*computepb.Operation, error)
- func (c *SnapshotsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsSnapshotRequest, ...) (*computepb.TestPermissionsResponse, error)
- type SslCertificatesCallOptions
- type SslCertificatesClient
- func (c *SslCertificatesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListSslCertificatesRequest, ...) (*computepb.SslCertificateAggregatedList, error)
- func (c *SslCertificatesClient) Close() error
- func (c *SslCertificatesClient) Connection() *grpc.ClientConn
- func (c *SslCertificatesClient) Delete(ctx context.Context, req *computepb.DeleteSslCertificateRequest, ...) (*computepb.Operation, error)
- func (c *SslCertificatesClient) Get(ctx context.Context, req *computepb.GetSslCertificateRequest, ...) (*computepb.SslCertificate, error)
- func (c *SslCertificatesClient) Insert(ctx context.Context, req *computepb.InsertSslCertificateRequest, ...) (*computepb.Operation, error)
- func (c *SslCertificatesClient) List(ctx context.Context, req *computepb.ListSslCertificatesRequest, ...) (*computepb.SslCertificateList, error)
- type SslPoliciesCallOptions
- type SslPoliciesClient
- func (c *SslPoliciesClient) Close() error
- func (c *SslPoliciesClient) Connection() *grpc.ClientConn
- func (c *SslPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteSslPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SslPoliciesClient) Get(ctx context.Context, req *computepb.GetSslPolicyRequest, ...) (*computepb.SslPolicy, error)
- func (c *SslPoliciesClient) Insert(ctx context.Context, req *computepb.InsertSslPolicyRequest, ...) (*computepb.Operation, error)
- func (c *SslPoliciesClient) List(ctx context.Context, req *computepb.ListSslPoliciesRequest, ...) (*computepb.SslPoliciesList, error)
- func (c *SslPoliciesClient) ListAvailableFeatures(ctx context.Context, req *computepb.ListAvailableFeaturesSslPoliciesRequest, ...) (*computepb.SslPoliciesListAvailableFeaturesResponse, error)
- func (c *SslPoliciesClient) Patch(ctx context.Context, req *computepb.PatchSslPolicyRequest, ...) (*computepb.Operation, error)
- type SubnetworksCallOptions
- type SubnetworksClient
- func (c *SubnetworksClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListSubnetworksRequest, ...) (*computepb.SubnetworkAggregatedList, error)
- func (c *SubnetworksClient) Close() error
- func (c *SubnetworksClient) Connection() *grpc.ClientConn
- func (c *SubnetworksClient) Delete(ctx context.Context, req *computepb.DeleteSubnetworkRequest, ...) (*computepb.Operation, error)
- func (c *SubnetworksClient) ExpandIpCidrRange(ctx context.Context, req *computepb.ExpandIpCidrRangeSubnetworkRequest, ...) (*computepb.Operation, error)
- func (c *SubnetworksClient) Get(ctx context.Context, req *computepb.GetSubnetworkRequest, ...) (*computepb.Subnetwork, error)
- func (c *SubnetworksClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicySubnetworkRequest, ...) (*computepb.Policy, error)
- func (c *SubnetworksClient) Insert(ctx context.Context, req *computepb.InsertSubnetworkRequest, ...) (*computepb.Operation, error)
- func (c *SubnetworksClient) List(ctx context.Context, req *computepb.ListSubnetworksRequest, ...) (*computepb.SubnetworkList, error)
- func (c *SubnetworksClient) ListUsable(ctx context.Context, req *computepb.ListUsableSubnetworksRequest, ...) (*computepb.UsableSubnetworksAggregatedList, error)
- func (c *SubnetworksClient) Patch(ctx context.Context, req *computepb.PatchSubnetworkRequest, ...) (*computepb.Operation, error)
- func (c *SubnetworksClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicySubnetworkRequest, ...) (*computepb.Policy, error)
- func (c *SubnetworksClient) SetPrivateIpGoogleAccess(ctx context.Context, req *computepb.SetPrivateIpGoogleAccessSubnetworkRequest, ...) (*computepb.Operation, error)
- func (c *SubnetworksClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsSubnetworkRequest, ...) (*computepb.TestPermissionsResponse, error)
- type TargetGrpcProxiesCallOptions
- type TargetGrpcProxiesClient
- func (c *TargetGrpcProxiesClient) Close() error
- func (c *TargetGrpcProxiesClient) Connection() *grpc.ClientConn
- func (c *TargetGrpcProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetGrpcProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetGrpcProxiesClient) Get(ctx context.Context, req *computepb.GetTargetGrpcProxyRequest, ...) (*computepb.TargetGrpcProxy, error)
- func (c *TargetGrpcProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetGrpcProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetGrpcProxiesClient) List(ctx context.Context, req *computepb.ListTargetGrpcProxiesRequest, ...) (*computepb.TargetGrpcProxyList, error)
- func (c *TargetGrpcProxiesClient) Patch(ctx context.Context, req *computepb.PatchTargetGrpcProxyRequest, ...) (*computepb.Operation, error)
- type TargetHttpProxiesCallOptions
- type TargetHttpProxiesClient
- func (c *TargetHttpProxiesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetHttpProxiesRequest, ...) (*computepb.TargetHttpProxyAggregatedList, error)
- func (c *TargetHttpProxiesClient) Close() error
- func (c *TargetHttpProxiesClient) Connection() *grpc.ClientConn
- func (c *TargetHttpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpProxiesClient) Get(ctx context.Context, req *computepb.GetTargetHttpProxyRequest, ...) (*computepb.TargetHttpProxy, error)
- func (c *TargetHttpProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpProxiesClient) List(ctx context.Context, req *computepb.ListTargetHttpProxiesRequest, ...) (*computepb.TargetHttpProxyList, error)
- func (c *TargetHttpProxiesClient) Patch(ctx context.Context, req *computepb.PatchTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapTargetHttpProxyRequest, ...) (*computepb.Operation, error)
- type TargetHttpsProxiesCallOptions
- type TargetHttpsProxiesClient
- func (c *TargetHttpsProxiesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetHttpsProxiesRequest, ...) (*computepb.TargetHttpsProxyAggregatedList, error)
- func (c *TargetHttpsProxiesClient) Close() error
- func (c *TargetHttpsProxiesClient) Connection() *grpc.ClientConn
- func (c *TargetHttpsProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpsProxiesClient) Get(ctx context.Context, req *computepb.GetTargetHttpsProxyRequest, ...) (*computepb.TargetHttpsProxy, error)
- func (c *TargetHttpsProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpsProxiesClient) List(ctx context.Context, req *computepb.ListTargetHttpsProxiesRequest, ...) (*computepb.TargetHttpsProxyList, error)
- func (c *TargetHttpsProxiesClient) Patch(ctx context.Context, req *computepb.PatchTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpsProxiesClient) SetQuicOverride(ctx context.Context, req *computepb.SetQuicOverrideTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpsProxiesClient) SetSslCertificates(ctx context.Context, req *computepb.SetSslCertificatesTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpsProxiesClient) SetSslPolicy(ctx context.Context, req *computepb.SetSslPolicyTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetHttpsProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapTargetHttpsProxyRequest, ...) (*computepb.Operation, error)
- type TargetInstancesCallOptions
- type TargetInstancesClient
- func (c *TargetInstancesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetInstancesRequest, ...) (*computepb.TargetInstanceAggregatedList, error)
- func (c *TargetInstancesClient) Close() error
- func (c *TargetInstancesClient) Connection() *grpc.ClientConn
- func (c *TargetInstancesClient) Delete(ctx context.Context, req *computepb.DeleteTargetInstanceRequest, ...) (*computepb.Operation, error)
- func (c *TargetInstancesClient) Get(ctx context.Context, req *computepb.GetTargetInstanceRequest, ...) (*computepb.TargetInstance, error)
- func (c *TargetInstancesClient) Insert(ctx context.Context, req *computepb.InsertTargetInstanceRequest, ...) (*computepb.Operation, error)
- func (c *TargetInstancesClient) List(ctx context.Context, req *computepb.ListTargetInstancesRequest, ...) (*computepb.TargetInstanceList, error)
- type TargetPoolsCallOptions
- type TargetPoolsClient
- func (c *TargetPoolsClient) AddHealthCheck(ctx context.Context, req *computepb.AddHealthCheckTargetPoolRequest, ...) (*computepb.Operation, error)
- func (c *TargetPoolsClient) AddInstance(ctx context.Context, req *computepb.AddInstanceTargetPoolRequest, ...) (*computepb.Operation, error)
- func (c *TargetPoolsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetPoolsRequest, ...) (*computepb.TargetPoolAggregatedList, error)
- func (c *TargetPoolsClient) Close() error
- func (c *TargetPoolsClient) Connection() *grpc.ClientConn
- func (c *TargetPoolsClient) Delete(ctx context.Context, req *computepb.DeleteTargetPoolRequest, ...) (*computepb.Operation, error)
- func (c *TargetPoolsClient) Get(ctx context.Context, req *computepb.GetTargetPoolRequest, ...) (*computepb.TargetPool, error)
- func (c *TargetPoolsClient) GetHealth(ctx context.Context, req *computepb.GetHealthTargetPoolRequest, ...) (*computepb.TargetPoolInstanceHealth, error)
- func (c *TargetPoolsClient) Insert(ctx context.Context, req *computepb.InsertTargetPoolRequest, ...) (*computepb.Operation, error)
- func (c *TargetPoolsClient) List(ctx context.Context, req *computepb.ListTargetPoolsRequest, ...) (*computepb.TargetPoolList, error)
- func (c *TargetPoolsClient) RemoveHealthCheck(ctx context.Context, req *computepb.RemoveHealthCheckTargetPoolRequest, ...) (*computepb.Operation, error)
- func (c *TargetPoolsClient) RemoveInstance(ctx context.Context, req *computepb.RemoveInstanceTargetPoolRequest, ...) (*computepb.Operation, error)
- func (c *TargetPoolsClient) SetBackup(ctx context.Context, req *computepb.SetBackupTargetPoolRequest, ...) (*computepb.Operation, error)
- type TargetSslProxiesCallOptions
- type TargetSslProxiesClient
- func (c *TargetSslProxiesClient) Close() error
- func (c *TargetSslProxiesClient) Connection() *grpc.ClientConn
- func (c *TargetSslProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetSslProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetSslProxiesClient) Get(ctx context.Context, req *computepb.GetTargetSslProxyRequest, ...) (*computepb.TargetSslProxy, error)
- func (c *TargetSslProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetSslProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetSslProxiesClient) List(ctx context.Context, req *computepb.ListTargetSslProxiesRequest, ...) (*computepb.TargetSslProxyList, error)
- func (c *TargetSslProxiesClient) SetBackendService(ctx context.Context, req *computepb.SetBackendServiceTargetSslProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetSslProxiesClient) SetProxyHeader(ctx context.Context, req *computepb.SetProxyHeaderTargetSslProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetSslProxiesClient) SetSslCertificates(ctx context.Context, req *computepb.SetSslCertificatesTargetSslProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetSslProxiesClient) SetSslPolicy(ctx context.Context, req *computepb.SetSslPolicyTargetSslProxyRequest, ...) (*computepb.Operation, error)
- type TargetTcpProxiesCallOptions
- type TargetTcpProxiesClient
- func (c *TargetTcpProxiesClient) Close() error
- func (c *TargetTcpProxiesClient) Connection() *grpc.ClientConn
- func (c *TargetTcpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetTcpProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetTcpProxiesClient) Get(ctx context.Context, req *computepb.GetTargetTcpProxyRequest, ...) (*computepb.TargetTcpProxy, error)
- func (c *TargetTcpProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetTcpProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetTcpProxiesClient) List(ctx context.Context, req *computepb.ListTargetTcpProxiesRequest, ...) (*computepb.TargetTcpProxyList, error)
- func (c *TargetTcpProxiesClient) SetBackendService(ctx context.Context, req *computepb.SetBackendServiceTargetTcpProxyRequest, ...) (*computepb.Operation, error)
- func (c *TargetTcpProxiesClient) SetProxyHeader(ctx context.Context, req *computepb.SetProxyHeaderTargetTcpProxyRequest, ...) (*computepb.Operation, error)
- type TargetVpnGatewaysCallOptions
- type TargetVpnGatewaysClient
- func (c *TargetVpnGatewaysClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetVpnGatewaysRequest, ...) (*computepb.TargetVpnGatewayAggregatedList, error)
- func (c *TargetVpnGatewaysClient) Close() error
- func (c *TargetVpnGatewaysClient) Connection() *grpc.ClientConn
- func (c *TargetVpnGatewaysClient) Delete(ctx context.Context, req *computepb.DeleteTargetVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *TargetVpnGatewaysClient) Get(ctx context.Context, req *computepb.GetTargetVpnGatewayRequest, ...) (*computepb.TargetVpnGateway, error)
- func (c *TargetVpnGatewaysClient) Insert(ctx context.Context, req *computepb.InsertTargetVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *TargetVpnGatewaysClient) List(ctx context.Context, req *computepb.ListTargetVpnGatewaysRequest, ...) (*computepb.TargetVpnGatewayList, error)
- type UrlMapsCallOptions
- type UrlMapsClient
- func (c *UrlMapsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListUrlMapsRequest, ...) (*computepb.UrlMapsAggregatedList, error)
- func (c *UrlMapsClient) Close() error
- func (c *UrlMapsClient) Connection() *grpc.ClientConn
- func (c *UrlMapsClient) Delete(ctx context.Context, req *computepb.DeleteUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *UrlMapsClient) Get(ctx context.Context, req *computepb.GetUrlMapRequest, opts ...gax.CallOption) (*computepb.UrlMap, error)
- func (c *UrlMapsClient) Insert(ctx context.Context, req *computepb.InsertUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *UrlMapsClient) InvalidateCache(ctx context.Context, req *computepb.InvalidateCacheUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *UrlMapsClient) List(ctx context.Context, req *computepb.ListUrlMapsRequest, opts ...gax.CallOption) (*computepb.UrlMapList, error)
- func (c *UrlMapsClient) Patch(ctx context.Context, req *computepb.PatchUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
- func (c *UrlMapsClient) Update(ctx context.Context, req *computepb.UpdateUrlMapRequest, ...) (*computepb.Operation, error)
- func (c *UrlMapsClient) Validate(ctx context.Context, req *computepb.ValidateUrlMapRequest, ...) (*computepb.UrlMapsValidateResponse, error)
- type VpnGatewaysCallOptions
- type VpnGatewaysClient
- func (c *VpnGatewaysClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListVpnGatewaysRequest, ...) (*computepb.VpnGatewayAggregatedList, error)
- func (c *VpnGatewaysClient) Close() error
- func (c *VpnGatewaysClient) Connection() *grpc.ClientConn
- func (c *VpnGatewaysClient) Delete(ctx context.Context, req *computepb.DeleteVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *VpnGatewaysClient) Get(ctx context.Context, req *computepb.GetVpnGatewayRequest, ...) (*computepb.VpnGateway, error)
- func (c *VpnGatewaysClient) GetStatus(ctx context.Context, req *computepb.GetStatusVpnGatewayRequest, ...) (*computepb.VpnGatewaysGetStatusResponse, error)
- func (c *VpnGatewaysClient) Insert(ctx context.Context, req *computepb.InsertVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *VpnGatewaysClient) List(ctx context.Context, req *computepb.ListVpnGatewaysRequest, ...) (*computepb.VpnGatewayList, error)
- func (c *VpnGatewaysClient) SetLabels(ctx context.Context, req *computepb.SetLabelsVpnGatewayRequest, ...) (*computepb.Operation, error)
- func (c *VpnGatewaysClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsVpnGatewayRequest, ...) (*computepb.TestPermissionsResponse, error)
- type VpnTunnelsCallOptions
- type VpnTunnelsClient
- func (c *VpnTunnelsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListVpnTunnelsRequest, ...) (*computepb.VpnTunnelAggregatedList, error)
- func (c *VpnTunnelsClient) Close() error
- func (c *VpnTunnelsClient) Connection() *grpc.ClientConn
- func (c *VpnTunnelsClient) Delete(ctx context.Context, req *computepb.DeleteVpnTunnelRequest, ...) (*computepb.Operation, error)
- func (c *VpnTunnelsClient) Get(ctx context.Context, req *computepb.GetVpnTunnelRequest, ...) (*computepb.VpnTunnel, error)
- func (c *VpnTunnelsClient) Insert(ctx context.Context, req *computepb.InsertVpnTunnelRequest, ...) (*computepb.Operation, error)
- func (c *VpnTunnelsClient) List(ctx context.Context, req *computepb.ListVpnTunnelsRequest, ...) (*computepb.VpnTunnelList, error)
- type ZoneOperationsCallOptions
- type ZoneOperationsClient
- func (c *ZoneOperationsClient) Close() error
- func (c *ZoneOperationsClient) Connection() *grpc.ClientConn
- func (c *ZoneOperationsClient) Delete(ctx context.Context, req *computepb.DeleteZoneOperationRequest, ...) (*computepb.DeleteZoneOperationResponse, error)
- func (c *ZoneOperationsClient) Get(ctx context.Context, req *computepb.GetZoneOperationRequest, ...) (*computepb.Operation, error)
- func (c *ZoneOperationsClient) List(ctx context.Context, req *computepb.ListZoneOperationsRequest, ...) (*computepb.OperationList, error)
- func (c *ZoneOperationsClient) Wait(ctx context.Context, req *computepb.WaitZoneOperationRequest, ...) (*computepb.Operation, error)
- type ZonesCallOptions
- type ZonesClient
- func (c *ZonesClient) Close() error
- func (c *ZonesClient) Connection() *grpc.ClientConn
- func (c *ZonesClient) Get(ctx context.Context, req *computepb.GetZoneRequest, opts ...gax.CallOption) (*computepb.Zone, error)
- func (c *ZonesClient) List(ctx context.Context, req *computepb.ListZonesRequest, opts ...gax.CallOption) (*computepb.ZoneList, error)
Examples ¶
- AcceleratorTypesClient.AggregatedList
- AcceleratorTypesClient.Get
- AcceleratorTypesClient.List
- AddressesClient.AggregatedList
- AddressesClient.Delete
- AddressesClient.Get
- AddressesClient.Insert
- AddressesClient.List
- AutoscalersClient.AggregatedList
- AutoscalersClient.Delete
- AutoscalersClient.Get
- AutoscalersClient.Insert
- AutoscalersClient.List
- AutoscalersClient.Patch
- AutoscalersClient.Update
- BackendBucketsClient.AddSignedUrlKey
- BackendBucketsClient.Delete
- BackendBucketsClient.DeleteSignedUrlKey
- BackendBucketsClient.Get
- BackendBucketsClient.Insert
- BackendBucketsClient.List
- BackendBucketsClient.Patch
- BackendBucketsClient.Update
- BackendServicesClient.AddSignedUrlKey
- BackendServicesClient.AggregatedList
- BackendServicesClient.Delete
- BackendServicesClient.DeleteSignedUrlKey
- BackendServicesClient.Get
- BackendServicesClient.GetHealth
- BackendServicesClient.Insert
- BackendServicesClient.List
- BackendServicesClient.Patch
- BackendServicesClient.SetSecurityPolicy
- BackendServicesClient.Update
- DiskTypesClient.AggregatedList
- DiskTypesClient.Get
- DiskTypesClient.List
- DisksClient.AddResourcePolicies
- DisksClient.AggregatedList
- DisksClient.CreateSnapshot
- DisksClient.Delete
- DisksClient.Get
- DisksClient.GetIamPolicy
- DisksClient.Insert
- DisksClient.List
- DisksClient.RemoveResourcePolicies
- DisksClient.Resize
- DisksClient.SetIamPolicy
- DisksClient.SetLabels
- DisksClient.TestIamPermissions
- ExternalVpnGatewaysClient.Delete
- ExternalVpnGatewaysClient.Get
- ExternalVpnGatewaysClient.Insert
- ExternalVpnGatewaysClient.List
- ExternalVpnGatewaysClient.SetLabels
- ExternalVpnGatewaysClient.TestIamPermissions
- FirewallPoliciesClient.AddAssociation
- FirewallPoliciesClient.AddRule
- FirewallPoliciesClient.CloneRules
- FirewallPoliciesClient.Delete
- FirewallPoliciesClient.Get
- FirewallPoliciesClient.GetAssociation
- FirewallPoliciesClient.GetIamPolicy
- FirewallPoliciesClient.GetRule
- FirewallPoliciesClient.Insert
- FirewallPoliciesClient.List
- FirewallPoliciesClient.ListAssociations
- FirewallPoliciesClient.Move
- FirewallPoliciesClient.Patch
- FirewallPoliciesClient.PatchRule
- FirewallPoliciesClient.RemoveAssociation
- FirewallPoliciesClient.RemoveRule
- FirewallPoliciesClient.SetIamPolicy
- FirewallPoliciesClient.TestIamPermissions
- FirewallsClient.Delete
- FirewallsClient.Get
- FirewallsClient.Insert
- FirewallsClient.List
- FirewallsClient.Patch
- FirewallsClient.Update
- ForwardingRulesClient.AggregatedList
- ForwardingRulesClient.Delete
- ForwardingRulesClient.Get
- ForwardingRulesClient.Insert
- ForwardingRulesClient.List
- ForwardingRulesClient.Patch
- ForwardingRulesClient.SetLabels
- ForwardingRulesClient.SetTarget
- GlobalAddressesClient.Delete
- GlobalAddressesClient.Get
- GlobalAddressesClient.Insert
- GlobalAddressesClient.List
- GlobalForwardingRulesClient.Delete
- GlobalForwardingRulesClient.Get
- GlobalForwardingRulesClient.Insert
- GlobalForwardingRulesClient.List
- GlobalForwardingRulesClient.Patch
- GlobalForwardingRulesClient.SetLabels
- GlobalForwardingRulesClient.SetTarget
- GlobalNetworkEndpointGroupsClient.AttachNetworkEndpoints
- GlobalNetworkEndpointGroupsClient.Delete
- GlobalNetworkEndpointGroupsClient.DetachNetworkEndpoints
- GlobalNetworkEndpointGroupsClient.Get
- GlobalNetworkEndpointGroupsClient.Insert
- GlobalNetworkEndpointGroupsClient.List
- GlobalNetworkEndpointGroupsClient.ListNetworkEndpoints
- GlobalOperationsClient.AggregatedList
- GlobalOperationsClient.Delete
- GlobalOperationsClient.Get
- GlobalOperationsClient.List
- GlobalOperationsClient.Wait
- GlobalOrganizationOperationsClient.Delete
- GlobalOrganizationOperationsClient.Get
- GlobalOrganizationOperationsClient.List
- GlobalPublicDelegatedPrefixesClient.Delete
- GlobalPublicDelegatedPrefixesClient.Get
- GlobalPublicDelegatedPrefixesClient.Insert
- GlobalPublicDelegatedPrefixesClient.List
- GlobalPublicDelegatedPrefixesClient.Patch
- HealthChecksClient.AggregatedList
- HealthChecksClient.Delete
- HealthChecksClient.Get
- HealthChecksClient.Insert
- HealthChecksClient.List
- HealthChecksClient.Patch
- HealthChecksClient.Update
- ImagesClient.Delete
- ImagesClient.Deprecate
- ImagesClient.Get
- ImagesClient.GetFromFamily
- ImagesClient.GetIamPolicy
- ImagesClient.Insert
- ImagesClient.List
- ImagesClient.Patch
- ImagesClient.SetIamPolicy
- ImagesClient.SetLabels
- ImagesClient.TestIamPermissions
- InstanceGroupManagersClient.AbandonInstances
- InstanceGroupManagersClient.AggregatedList
- InstanceGroupManagersClient.ApplyUpdatesToInstances
- InstanceGroupManagersClient.CreateInstances
- InstanceGroupManagersClient.Delete
- InstanceGroupManagersClient.DeleteInstances
- InstanceGroupManagersClient.DeletePerInstanceConfigs
- InstanceGroupManagersClient.Get
- InstanceGroupManagersClient.Insert
- InstanceGroupManagersClient.List
- InstanceGroupManagersClient.ListErrors
- InstanceGroupManagersClient.ListManagedInstances
- InstanceGroupManagersClient.ListPerInstanceConfigs
- InstanceGroupManagersClient.Patch
- InstanceGroupManagersClient.PatchPerInstanceConfigs
- InstanceGroupManagersClient.RecreateInstances
- InstanceGroupManagersClient.Resize
- InstanceGroupManagersClient.SetInstanceTemplate
- InstanceGroupManagersClient.SetTargetPools
- InstanceGroupManagersClient.UpdatePerInstanceConfigs
- InstanceGroupsClient.AddInstances
- InstanceGroupsClient.AggregatedList
- InstanceGroupsClient.Delete
- InstanceGroupsClient.Get
- InstanceGroupsClient.Insert
- InstanceGroupsClient.List
- InstanceGroupsClient.ListInstances
- InstanceGroupsClient.RemoveInstances
- InstanceGroupsClient.SetNamedPorts
- InstanceTemplatesClient.Delete
- InstanceTemplatesClient.Get
- InstanceTemplatesClient.GetIamPolicy
- InstanceTemplatesClient.Insert
- InstanceTemplatesClient.List
- InstanceTemplatesClient.SetIamPolicy
- InstanceTemplatesClient.TestIamPermissions
- InstancesClient.AddAccessConfig
- InstancesClient.AddResourcePolicies
- InstancesClient.AggregatedList
- InstancesClient.AttachDisk
- InstancesClient.BulkInsert
- InstancesClient.Delete
- InstancesClient.DeleteAccessConfig
- InstancesClient.DetachDisk
- InstancesClient.Get
- InstancesClient.GetEffectiveFirewalls
- InstancesClient.GetGuestAttributes
- InstancesClient.GetIamPolicy
- InstancesClient.GetScreenshot
- InstancesClient.GetSerialPortOutput
- InstancesClient.GetShieldedInstanceIdentity
- InstancesClient.Insert
- InstancesClient.List
- InstancesClient.ListReferrers
- InstancesClient.RemoveResourcePolicies
- InstancesClient.Reset
- InstancesClient.SetDeletionProtection
- InstancesClient.SetDiskAutoDelete
- InstancesClient.SetIamPolicy
- InstancesClient.SetLabels
- InstancesClient.SetMachineResources
- InstancesClient.SetMachineType
- InstancesClient.SetMetadata
- InstancesClient.SetMinCpuPlatform
- InstancesClient.SetScheduling
- InstancesClient.SetServiceAccount
- InstancesClient.SetShieldedInstanceIntegrityPolicy
- InstancesClient.SetTags
- InstancesClient.SimulateMaintenanceEvent
- InstancesClient.Start
- InstancesClient.StartWithEncryptionKey
- InstancesClient.Stop
- InstancesClient.TestIamPermissions
- InstancesClient.Update
- InstancesClient.UpdateAccessConfig
- InstancesClient.UpdateDisplayDevice
- InstancesClient.UpdateNetworkInterface
- InstancesClient.UpdateShieldedInstanceConfig
- InterconnectAttachmentsClient.AggregatedList
- InterconnectAttachmentsClient.Delete
- InterconnectAttachmentsClient.Get
- InterconnectAttachmentsClient.Insert
- InterconnectAttachmentsClient.List
- InterconnectAttachmentsClient.Patch
- InterconnectLocationsClient.Get
- InterconnectLocationsClient.List
- InterconnectsClient.Delete
- InterconnectsClient.Get
- InterconnectsClient.GetDiagnostics
- InterconnectsClient.Insert
- InterconnectsClient.List
- InterconnectsClient.Patch
- LicenseCodesClient.Get
- LicenseCodesClient.TestIamPermissions
- LicensesClient.Delete
- LicensesClient.Get
- LicensesClient.GetIamPolicy
- LicensesClient.Insert
- LicensesClient.List
- LicensesClient.SetIamPolicy
- LicensesClient.TestIamPermissions
- MachineTypesClient.AggregatedList
- MachineTypesClient.Get
- MachineTypesClient.List
- NetworkEndpointGroupsClient.AggregatedList
- NetworkEndpointGroupsClient.AttachNetworkEndpoints
- NetworkEndpointGroupsClient.Delete
- NetworkEndpointGroupsClient.DetachNetworkEndpoints
- NetworkEndpointGroupsClient.Get
- NetworkEndpointGroupsClient.Insert
- NetworkEndpointGroupsClient.List
- NetworkEndpointGroupsClient.ListNetworkEndpoints
- NetworkEndpointGroupsClient.TestIamPermissions
- NetworksClient.AddPeering
- NetworksClient.Delete
- NetworksClient.Get
- NetworksClient.GetEffectiveFirewalls
- NetworksClient.Insert
- NetworksClient.List
- NetworksClient.ListPeeringRoutes
- NetworksClient.Patch
- NetworksClient.RemovePeering
- NetworksClient.SwitchToCustomMode
- NetworksClient.UpdatePeering
- NewAcceleratorTypesRESTClient
- NewAddressesRESTClient
- NewAutoscalersRESTClient
- NewBackendBucketsRESTClient
- NewBackendServicesRESTClient
- NewDiskTypesRESTClient
- NewDisksRESTClient
- NewExternalVpnGatewaysRESTClient
- NewFirewallPoliciesRESTClient
- NewFirewallsRESTClient
- NewForwardingRulesRESTClient
- NewGlobalAddressesRESTClient
- NewGlobalForwardingRulesRESTClient
- NewGlobalNetworkEndpointGroupsRESTClient
- NewGlobalOperationsRESTClient
- NewGlobalOrganizationOperationsRESTClient
- NewGlobalPublicDelegatedPrefixesRESTClient
- NewHealthChecksRESTClient
- NewImagesRESTClient
- NewInstanceGroupManagersRESTClient
- NewInstanceGroupsRESTClient
- NewInstanceTemplatesRESTClient
- NewInstancesRESTClient
- NewInterconnectAttachmentsRESTClient
- NewInterconnectLocationsRESTClient
- NewInterconnectsRESTClient
- NewLicenseCodesRESTClient
- NewLicensesRESTClient
- NewMachineTypesRESTClient
- NewNetworkEndpointGroupsRESTClient
- NewNetworksRESTClient
- NewNodeGroupsRESTClient
- NewNodeTemplatesRESTClient
- NewNodeTypesRESTClient
- NewPacketMirroringsRESTClient
- NewProjectsRESTClient
- NewPublicAdvertisedPrefixesRESTClient
- NewPublicDelegatedPrefixesRESTClient
- NewRegionAutoscalersRESTClient
- NewRegionBackendServicesRESTClient
- NewRegionCommitmentsRESTClient
- NewRegionDiskTypesRESTClient
- NewRegionDisksRESTClient
- NewRegionHealthCheckServicesRESTClient
- NewRegionHealthChecksRESTClient
- NewRegionInstanceGroupManagersRESTClient
- NewRegionInstanceGroupsRESTClient
- NewRegionInstancesRESTClient
- NewRegionNetworkEndpointGroupsRESTClient
- NewRegionNotificationEndpointsRESTClient
- NewRegionOperationsRESTClient
- NewRegionSslCertificatesRESTClient
- NewRegionTargetHttpProxiesRESTClient
- NewRegionTargetHttpsProxiesRESTClient
- NewRegionUrlMapsRESTClient
- NewRegionsRESTClient
- NewReservationsRESTClient
- NewResourcePoliciesRESTClient
- NewRoutersRESTClient
- NewRoutesRESTClient
- NewSecurityPoliciesRESTClient
- NewSnapshotsRESTClient
- NewSslCertificatesRESTClient
- NewSslPoliciesRESTClient
- NewSubnetworksRESTClient
- NewTargetGrpcProxiesRESTClient
- NewTargetHttpProxiesRESTClient
- NewTargetHttpsProxiesRESTClient
- NewTargetInstancesRESTClient
- NewTargetPoolsRESTClient
- NewTargetSslProxiesRESTClient
- NewTargetTcpProxiesRESTClient
- NewTargetVpnGatewaysRESTClient
- NewUrlMapsRESTClient
- NewVpnGatewaysRESTClient
- NewVpnTunnelsRESTClient
- NewZoneOperationsRESTClient
- NewZonesRESTClient
- NodeGroupsClient.AddNodes
- NodeGroupsClient.AggregatedList
- NodeGroupsClient.Delete
- NodeGroupsClient.DeleteNodes
- NodeGroupsClient.Get
- NodeGroupsClient.GetIamPolicy
- NodeGroupsClient.Insert
- NodeGroupsClient.List
- NodeGroupsClient.ListNodes
- NodeGroupsClient.Patch
- NodeGroupsClient.SetIamPolicy
- NodeGroupsClient.SetNodeTemplate
- NodeGroupsClient.TestIamPermissions
- NodeTemplatesClient.AggregatedList
- NodeTemplatesClient.Delete
- NodeTemplatesClient.Get
- NodeTemplatesClient.GetIamPolicy
- NodeTemplatesClient.Insert
- NodeTemplatesClient.List
- NodeTemplatesClient.SetIamPolicy
- NodeTemplatesClient.TestIamPermissions
- NodeTypesClient.AggregatedList
- NodeTypesClient.Get
- NodeTypesClient.List
- PacketMirroringsClient.AggregatedList
- PacketMirroringsClient.Delete
- PacketMirroringsClient.Get
- PacketMirroringsClient.Insert
- PacketMirroringsClient.List
- PacketMirroringsClient.Patch
- PacketMirroringsClient.TestIamPermissions
- ProjectsClient.DisableXpnHost
- ProjectsClient.DisableXpnResource
- ProjectsClient.EnableXpnHost
- ProjectsClient.EnableXpnResource
- ProjectsClient.Get
- ProjectsClient.GetXpnHost
- ProjectsClient.GetXpnResources
- ProjectsClient.ListXpnHosts
- ProjectsClient.MoveDisk
- ProjectsClient.MoveInstance
- ProjectsClient.SetCommonInstanceMetadata
- ProjectsClient.SetDefaultNetworkTier
- ProjectsClient.SetUsageExportBucket
- PublicAdvertisedPrefixesClient.Delete
- PublicAdvertisedPrefixesClient.Get
- PublicAdvertisedPrefixesClient.Insert
- PublicAdvertisedPrefixesClient.List
- PublicAdvertisedPrefixesClient.Patch
- PublicDelegatedPrefixesClient.AggregatedList
- PublicDelegatedPrefixesClient.Delete
- PublicDelegatedPrefixesClient.Get
- PublicDelegatedPrefixesClient.Insert
- PublicDelegatedPrefixesClient.List
- PublicDelegatedPrefixesClient.Patch
- RegionAutoscalersClient.Delete
- RegionAutoscalersClient.Get
- RegionAutoscalersClient.Insert
- RegionAutoscalersClient.List
- RegionAutoscalersClient.Patch
- RegionAutoscalersClient.Update
- RegionBackendServicesClient.Delete
- RegionBackendServicesClient.Get
- RegionBackendServicesClient.GetHealth
- RegionBackendServicesClient.Insert
- RegionBackendServicesClient.List
- RegionBackendServicesClient.Patch
- RegionBackendServicesClient.Update
- RegionCommitmentsClient.AggregatedList
- RegionCommitmentsClient.Get
- RegionCommitmentsClient.Insert
- RegionCommitmentsClient.List
- RegionDiskTypesClient.Get
- RegionDiskTypesClient.List
- RegionDisksClient.AddResourcePolicies
- RegionDisksClient.CreateSnapshot
- RegionDisksClient.Delete
- RegionDisksClient.Get
- RegionDisksClient.GetIamPolicy
- RegionDisksClient.Insert
- RegionDisksClient.List
- RegionDisksClient.RemoveResourcePolicies
- RegionDisksClient.Resize
- RegionDisksClient.SetIamPolicy
- RegionDisksClient.SetLabels
- RegionDisksClient.TestIamPermissions
- RegionHealthCheckServicesClient.Delete
- RegionHealthCheckServicesClient.Get
- RegionHealthCheckServicesClient.Insert
- RegionHealthCheckServicesClient.List
- RegionHealthCheckServicesClient.Patch
- RegionHealthChecksClient.Delete
- RegionHealthChecksClient.Get
- RegionHealthChecksClient.Insert
- RegionHealthChecksClient.List
- RegionHealthChecksClient.Patch
- RegionHealthChecksClient.Update
- RegionInstanceGroupManagersClient.AbandonInstances
- RegionInstanceGroupManagersClient.ApplyUpdatesToInstances
- RegionInstanceGroupManagersClient.CreateInstances
- RegionInstanceGroupManagersClient.Delete
- RegionInstanceGroupManagersClient.DeleteInstances
- RegionInstanceGroupManagersClient.DeletePerInstanceConfigs
- RegionInstanceGroupManagersClient.Get
- RegionInstanceGroupManagersClient.Insert
- RegionInstanceGroupManagersClient.List
- RegionInstanceGroupManagersClient.ListErrors
- RegionInstanceGroupManagersClient.ListManagedInstances
- RegionInstanceGroupManagersClient.ListPerInstanceConfigs
- RegionInstanceGroupManagersClient.Patch
- RegionInstanceGroupManagersClient.PatchPerInstanceConfigs
- RegionInstanceGroupManagersClient.RecreateInstances
- RegionInstanceGroupManagersClient.Resize
- RegionInstanceGroupManagersClient.SetInstanceTemplate
- RegionInstanceGroupManagersClient.SetTargetPools
- RegionInstanceGroupManagersClient.UpdatePerInstanceConfigs
- RegionInstanceGroupsClient.Get
- RegionInstanceGroupsClient.List
- RegionInstanceGroupsClient.ListInstances
- RegionInstanceGroupsClient.SetNamedPorts
- RegionInstancesClient.BulkInsert
- RegionNetworkEndpointGroupsClient.Delete
- RegionNetworkEndpointGroupsClient.Get
- RegionNetworkEndpointGroupsClient.Insert
- RegionNetworkEndpointGroupsClient.List
- RegionNotificationEndpointsClient.Delete
- RegionNotificationEndpointsClient.Get
- RegionNotificationEndpointsClient.Insert
- RegionNotificationEndpointsClient.List
- RegionOperationsClient.Delete
- RegionOperationsClient.Get
- RegionOperationsClient.List
- RegionOperationsClient.Wait
- RegionSslCertificatesClient.Delete
- RegionSslCertificatesClient.Get
- RegionSslCertificatesClient.Insert
- RegionSslCertificatesClient.List
- RegionTargetHttpProxiesClient.Delete
- RegionTargetHttpProxiesClient.Get
- RegionTargetHttpProxiesClient.Insert
- RegionTargetHttpProxiesClient.List
- RegionTargetHttpProxiesClient.SetUrlMap
- RegionTargetHttpsProxiesClient.Delete
- RegionTargetHttpsProxiesClient.Get
- RegionTargetHttpsProxiesClient.Insert
- RegionTargetHttpsProxiesClient.List
- RegionTargetHttpsProxiesClient.SetSslCertificates
- RegionTargetHttpsProxiesClient.SetUrlMap
- RegionUrlMapsClient.Delete
- RegionUrlMapsClient.Get
- RegionUrlMapsClient.Insert
- RegionUrlMapsClient.List
- RegionUrlMapsClient.Patch
- RegionUrlMapsClient.Update
- RegionUrlMapsClient.Validate
- RegionsClient.Get
- RegionsClient.List
- ReservationsClient.AggregatedList
- ReservationsClient.Delete
- ReservationsClient.Get
- ReservationsClient.GetIamPolicy
- ReservationsClient.Insert
- ReservationsClient.List
- ReservationsClient.Resize
- ReservationsClient.SetIamPolicy
- ReservationsClient.TestIamPermissions
- ResourcePoliciesClient.AggregatedList
- ResourcePoliciesClient.Delete
- ResourcePoliciesClient.Get
- ResourcePoliciesClient.GetIamPolicy
- ResourcePoliciesClient.Insert
- ResourcePoliciesClient.List
- ResourcePoliciesClient.SetIamPolicy
- ResourcePoliciesClient.TestIamPermissions
- RoutersClient.AggregatedList
- RoutersClient.Delete
- RoutersClient.Get
- RoutersClient.GetNatMappingInfo
- RoutersClient.GetRouterStatus
- RoutersClient.Insert
- RoutersClient.List
- RoutersClient.Patch
- RoutersClient.Preview
- RoutersClient.Update
- RoutesClient.Delete
- RoutesClient.Get
- RoutesClient.Insert
- RoutesClient.List
- SecurityPoliciesClient.AddRule
- SecurityPoliciesClient.Delete
- SecurityPoliciesClient.Get
- SecurityPoliciesClient.GetRule
- SecurityPoliciesClient.Insert
- SecurityPoliciesClient.List
- SecurityPoliciesClient.ListPreconfiguredExpressionSets
- SecurityPoliciesClient.Patch
- SecurityPoliciesClient.PatchRule
- SecurityPoliciesClient.RemoveRule
- SnapshotsClient.Delete
- SnapshotsClient.Get
- SnapshotsClient.GetIamPolicy
- SnapshotsClient.List
- SnapshotsClient.SetIamPolicy
- SnapshotsClient.SetLabels
- SnapshotsClient.TestIamPermissions
- SslCertificatesClient.AggregatedList
- SslCertificatesClient.Delete
- SslCertificatesClient.Get
- SslCertificatesClient.Insert
- SslCertificatesClient.List
- SslPoliciesClient.Delete
- SslPoliciesClient.Get
- SslPoliciesClient.Insert
- SslPoliciesClient.List
- SslPoliciesClient.ListAvailableFeatures
- SslPoliciesClient.Patch
- SubnetworksClient.AggregatedList
- SubnetworksClient.Delete
- SubnetworksClient.ExpandIpCidrRange
- SubnetworksClient.Get
- SubnetworksClient.GetIamPolicy
- SubnetworksClient.Insert
- SubnetworksClient.List
- SubnetworksClient.ListUsable
- SubnetworksClient.Patch
- SubnetworksClient.SetIamPolicy
- SubnetworksClient.SetPrivateIpGoogleAccess
- SubnetworksClient.TestIamPermissions
- TargetGrpcProxiesClient.Delete
- TargetGrpcProxiesClient.Get
- TargetGrpcProxiesClient.Insert
- TargetGrpcProxiesClient.List
- TargetGrpcProxiesClient.Patch
- TargetHttpProxiesClient.AggregatedList
- TargetHttpProxiesClient.Delete
- TargetHttpProxiesClient.Get
- TargetHttpProxiesClient.Insert
- TargetHttpProxiesClient.List
- TargetHttpProxiesClient.Patch
- TargetHttpProxiesClient.SetUrlMap
- TargetHttpsProxiesClient.AggregatedList
- TargetHttpsProxiesClient.Delete
- TargetHttpsProxiesClient.Get
- TargetHttpsProxiesClient.Insert
- TargetHttpsProxiesClient.List
- TargetHttpsProxiesClient.Patch
- TargetHttpsProxiesClient.SetQuicOverride
- TargetHttpsProxiesClient.SetSslCertificates
- TargetHttpsProxiesClient.SetSslPolicy
- TargetHttpsProxiesClient.SetUrlMap
- TargetInstancesClient.AggregatedList
- TargetInstancesClient.Delete
- TargetInstancesClient.Get
- TargetInstancesClient.Insert
- TargetInstancesClient.List
- TargetPoolsClient.AddHealthCheck
- TargetPoolsClient.AddInstance
- TargetPoolsClient.AggregatedList
- TargetPoolsClient.Delete
- TargetPoolsClient.Get
- TargetPoolsClient.GetHealth
- TargetPoolsClient.Insert
- TargetPoolsClient.List
- TargetPoolsClient.RemoveHealthCheck
- TargetPoolsClient.RemoveInstance
- TargetPoolsClient.SetBackup
- TargetSslProxiesClient.Delete
- TargetSslProxiesClient.Get
- TargetSslProxiesClient.Insert
- TargetSslProxiesClient.List
- TargetSslProxiesClient.SetBackendService
- TargetSslProxiesClient.SetProxyHeader
- TargetSslProxiesClient.SetSslCertificates
- TargetSslProxiesClient.SetSslPolicy
- TargetTcpProxiesClient.Delete
- TargetTcpProxiesClient.Get
- TargetTcpProxiesClient.Insert
- TargetTcpProxiesClient.List
- TargetTcpProxiesClient.SetBackendService
- TargetTcpProxiesClient.SetProxyHeader
- TargetVpnGatewaysClient.AggregatedList
- TargetVpnGatewaysClient.Delete
- TargetVpnGatewaysClient.Get
- TargetVpnGatewaysClient.Insert
- TargetVpnGatewaysClient.List
- UrlMapsClient.AggregatedList
- UrlMapsClient.Delete
- UrlMapsClient.Get
- UrlMapsClient.Insert
- UrlMapsClient.InvalidateCache
- UrlMapsClient.List
- UrlMapsClient.Patch
- UrlMapsClient.Update
- UrlMapsClient.Validate
- VpnGatewaysClient.AggregatedList
- VpnGatewaysClient.Delete
- VpnGatewaysClient.Get
- VpnGatewaysClient.GetStatus
- VpnGatewaysClient.Insert
- VpnGatewaysClient.List
- VpnGatewaysClient.SetLabels
- VpnGatewaysClient.TestIamPermissions
- VpnTunnelsClient.AggregatedList
- VpnTunnelsClient.Delete
- VpnTunnelsClient.Get
- VpnTunnelsClient.Insert
- VpnTunnelsClient.List
- ZoneOperationsClient.Delete
- ZoneOperationsClient.Get
- ZoneOperationsClient.List
- ZoneOperationsClient.Wait
- ZonesClient.Get
- ZonesClient.List
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 AcceleratorTypesCallOptions ¶
type AcceleratorTypesCallOptions struct { AggregatedList []gax.CallOption Get []gax.CallOption List []gax.CallOption }
AcceleratorTypesCallOptions contains the retry settings for each method of AcceleratorTypesClient.
type AcceleratorTypesClient ¶
type AcceleratorTypesClient struct { // The call options for this service. CallOptions *AcceleratorTypesCallOptions // contains filtered or unexported fields }
AcceleratorTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Services ¶
The AcceleratorTypes API.
func NewAcceleratorTypesRESTClient ¶
func NewAcceleratorTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*AcceleratorTypesClient, error)
NewAcceleratorTypesRESTClient creates a new accelerator types rest client.
Services ¶
The AcceleratorTypes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*AcceleratorTypesClient) AggregatedList ¶
func (c *AcceleratorTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListAcceleratorTypesRequest, opts ...gax.CallOption) (*computepb.AcceleratorTypeAggregatedList, error)
AggregatedList retrieves an aggregated list of accelerator types.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListAcceleratorTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AcceleratorTypesClient) Close ¶
func (c *AcceleratorTypesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AcceleratorTypesClient) Connection ¶
func (c *AcceleratorTypesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*AcceleratorTypesClient) Get ¶
func (c *AcceleratorTypesClient) Get(ctx context.Context, req *computepb.GetAcceleratorTypeRequest, opts ...gax.CallOption) (*computepb.AcceleratorType, error)
Get returns the specified accelerator type.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetAcceleratorTypeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AcceleratorTypesClient) List ¶
func (c *AcceleratorTypesClient) List(ctx context.Context, req *computepb.ListAcceleratorTypesRequest, opts ...gax.CallOption) (*computepb.AcceleratorTypeList, error)
List retrieves a list of accelerator types that are available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListAcceleratorTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type AddressesCallOptions ¶
type AddressesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
AddressesCallOptions contains the retry settings for each method of AddressesClient.
type AddressesClient ¶
type AddressesClient struct { // The call options for this service. CallOptions *AddressesCallOptions // contains filtered or unexported fields }
AddressesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Addresses API.
func NewAddressesRESTClient ¶
func NewAddressesRESTClient(ctx context.Context, opts ...option.ClientOption) (*AddressesClient, error)
NewAddressesRESTClient creates a new addresses rest client.
The Addresses API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*AddressesClient) AggregatedList ¶
func (c *AddressesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListAddressesRequest, opts ...gax.CallOption) (*computepb.AddressAggregatedList, error)
AggregatedList retrieves an aggregated list of addresses.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListAddressesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AddressesClient) Close ¶
func (c *AddressesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AddressesClient) Connection ¶
func (c *AddressesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*AddressesClient) Delete ¶
func (c *AddressesClient) Delete(ctx context.Context, req *computepb.DeleteAddressRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified address resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteAddressRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AddressesClient) Get ¶
func (c *AddressesClient) Get(ctx context.Context, req *computepb.GetAddressRequest, opts ...gax.CallOption) (*computepb.Address, error)
Get returns the specified address resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetAddressRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AddressesClient) Insert ¶
func (c *AddressesClient) Insert(ctx context.Context, req *computepb.InsertAddressRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an address resource in the specified project by using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertAddressRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AddressesClient) List ¶
func (c *AddressesClient) List(ctx context.Context, req *computepb.ListAddressesRequest, opts ...gax.CallOption) (*computepb.AddressList, error)
List retrieves a list of addresses contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListAddressesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type AutoscalersCallOptions ¶
type AutoscalersCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
AutoscalersCallOptions contains the retry settings for each method of AutoscalersClient.
type AutoscalersClient ¶
type AutoscalersClient struct { // The call options for this service. CallOptions *AutoscalersCallOptions // contains filtered or unexported fields }
AutoscalersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Autoscalers API.
func NewAutoscalersRESTClient ¶
func NewAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOption) (*AutoscalersClient, error)
NewAutoscalersRESTClient creates a new autoscalers rest client.
The Autoscalers API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*AutoscalersClient) AggregatedList ¶
func (c *AutoscalersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListAutoscalersRequest, opts ...gax.CallOption) (*computepb.AutoscalerAggregatedList, error)
AggregatedList retrieves an aggregated list of autoscalers.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListAutoscalersRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AutoscalersClient) Close ¶
func (c *AutoscalersClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AutoscalersClient) Connection ¶
func (c *AutoscalersClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*AutoscalersClient) Delete ¶
func (c *AutoscalersClient) Delete(ctx context.Context, req *computepb.DeleteAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified autoscaler.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AutoscalersClient) Get ¶
func (c *AutoscalersClient) Get(ctx context.Context, req *computepb.GetAutoscalerRequest, opts ...gax.CallOption) (*computepb.Autoscaler, error)
Get returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AutoscalersClient) Insert ¶
func (c *AutoscalersClient) Insert(ctx context.Context, req *computepb.InsertAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an autoscaler in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AutoscalersClient) List ¶
func (c *AutoscalersClient) List(ctx context.Context, req *computepb.ListAutoscalersRequest, opts ...gax.CallOption) (*computepb.AutoscalerList, error)
List retrieves a list of autoscalers contained within the specified zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListAutoscalersRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AutoscalersClient) Patch ¶
func (c *AutoscalersClient) Patch(ctx context.Context, req *computepb.PatchAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AutoscalersClient) Update ¶
func (c *AutoscalersClient) Update(ctx context.Context, req *computepb.UpdateAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates an autoscaler in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type BackendBucketsCallOptions ¶
type BackendBucketsCallOptions struct { AddSignedUrlKey []gax.CallOption Delete []gax.CallOption DeleteSignedUrlKey []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
BackendBucketsCallOptions contains the retry settings for each method of BackendBucketsClient.
type BackendBucketsClient ¶
type BackendBucketsClient struct { // The call options for this service. CallOptions *BackendBucketsCallOptions // contains filtered or unexported fields }
BackendBucketsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The BackendBuckets API.
func NewBackendBucketsRESTClient ¶
func NewBackendBucketsRESTClient(ctx context.Context, opts ...option.ClientOption) (*BackendBucketsClient, error)
NewBackendBucketsRESTClient creates a new backend buckets rest client.
The BackendBuckets API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*BackendBucketsClient) AddSignedUrlKey ¶
func (c *BackendBucketsClient) AddSignedUrlKey(ctx context.Context, req *computepb.AddSignedUrlKeyBackendBucketRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddSignedUrlKey adds a key for validating requests with signed URLs for this backend bucket.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddSignedUrlKeyBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.AddSignedUrlKey(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) Close ¶
func (c *BackendBucketsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*BackendBucketsClient) Connection ¶
func (c *BackendBucketsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*BackendBucketsClient) Delete ¶
func (c *BackendBucketsClient) Delete(ctx context.Context, req *computepb.DeleteBackendBucketRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified BackendBucket resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) DeleteSignedUrlKey ¶
func (c *BackendBucketsClient) DeleteSignedUrlKey(ctx context.Context, req *computepb.DeleteSignedUrlKeyBackendBucketRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeleteSignedUrlKey deletes a key for validating requests with signed URLs for this backend bucket.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSignedUrlKeyBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteSignedUrlKey(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) Get ¶
func (c *BackendBucketsClient) Get(ctx context.Context, req *computepb.GetBackendBucketRequest, opts ...gax.CallOption) (*computepb.BackendBucket, error)
Get returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) Insert ¶
func (c *BackendBucketsClient) Insert(ctx context.Context, req *computepb.InsertBackendBucketRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a BackendBucket resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) List ¶
func (c *BackendBucketsClient) List(ctx context.Context, req *computepb.ListBackendBucketsRequest, opts ...gax.CallOption) (*computepb.BackendBucketList, error)
List retrieves the list of BackendBucket resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListBackendBucketsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) Patch ¶
func (c *BackendBucketsClient) Patch(ctx context.Context, req *computepb.PatchBackendBucketRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendBucketsClient) Update ¶
func (c *BackendBucketsClient) Update(ctx context.Context, req *computepb.UpdateBackendBucketRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified BackendBucket resource with the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateBackendBucketRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type BackendServicesCallOptions ¶
type BackendServicesCallOptions struct { AddSignedUrlKey []gax.CallOption AggregatedList []gax.CallOption Delete []gax.CallOption DeleteSignedUrlKey []gax.CallOption Get []gax.CallOption GetHealth []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetSecurityPolicy []gax.CallOption Update []gax.CallOption }
BackendServicesCallOptions contains the retry settings for each method of BackendServicesClient.
type BackendServicesClient ¶
type BackendServicesClient struct { // The call options for this service. CallOptions *BackendServicesCallOptions // contains filtered or unexported fields }
BackendServicesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The BackendServices API.
func NewBackendServicesRESTClient ¶
func NewBackendServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*BackendServicesClient, error)
NewBackendServicesRESTClient creates a new backend services rest client.
The BackendServices API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*BackendServicesClient) AddSignedUrlKey ¶
func (c *BackendServicesClient) AddSignedUrlKey(ctx context.Context, req *computepb.AddSignedUrlKeyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddSignedUrlKey adds a key for validating requests with signed URLs for this backend service.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddSignedUrlKeyBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.AddSignedUrlKey(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) AggregatedList ¶
func (c *BackendServicesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListBackendServicesRequest, opts ...gax.CallOption) (*computepb.BackendServiceAggregatedList, error)
AggregatedList retrieves the list of all BackendService resources, regional and global, available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListBackendServicesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) Close ¶
func (c *BackendServicesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*BackendServicesClient) Connection ¶
func (c *BackendServicesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*BackendServicesClient) Delete ¶
func (c *BackendServicesClient) Delete(ctx context.Context, req *computepb.DeleteBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified BackendService resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) DeleteSignedUrlKey ¶
func (c *BackendServicesClient) DeleteSignedUrlKey(ctx context.Context, req *computepb.DeleteSignedUrlKeyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeleteSignedUrlKey deletes a key for validating requests with signed URLs for this backend service.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSignedUrlKeyBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteSignedUrlKey(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) Get ¶
func (c *BackendServicesClient) Get(ctx context.Context, req *computepb.GetBackendServiceRequest, opts ...gax.CallOption) (*computepb.BackendService, error)
Get returns the specified BackendService resource. Gets a list of available backend services.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) GetHealth ¶
func (c *BackendServicesClient) GetHealth(ctx context.Context, req *computepb.GetHealthBackendServiceRequest, opts ...gax.CallOption) (*computepb.BackendServiceGroupHealth, error)
GetHealth gets the most recent health check results for this BackendService.
Example request body:
{ “group”: “/zones/us-east1-b/instanceGroups/lb-backend-example” }
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetHealthBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetHealth(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) Insert ¶
func (c *BackendServicesClient) Insert(ctx context.Context, req *computepb.InsertBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) List ¶
func (c *BackendServicesClient) List(ctx context.Context, req *computepb.ListBackendServicesRequest, opts ...gax.CallOption) (*computepb.BackendServiceList, error)
List retrieves the list of BackendService resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListBackendServicesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) Patch ¶
func (c *BackendServicesClient) Patch(ctx context.Context, req *computepb.PatchBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) SetSecurityPolicy ¶
func (c *BackendServicesClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetSecurityPolicy sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSecurityPolicyBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetSecurityPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*BackendServicesClient) Update ¶
func (c *BackendServicesClient) Update(ctx context.Context, req *computepb.UpdateBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type DiskTypesCallOptions ¶
type DiskTypesCallOptions struct { AggregatedList []gax.CallOption Get []gax.CallOption List []gax.CallOption }
DiskTypesCallOptions contains the retry settings for each method of DiskTypesClient.
type DiskTypesClient ¶
type DiskTypesClient struct { // The call options for this service. CallOptions *DiskTypesCallOptions // contains filtered or unexported fields }
DiskTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The DiskTypes API.
func NewDiskTypesRESTClient ¶
func NewDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*DiskTypesClient, error)
NewDiskTypesRESTClient creates a new disk types rest client.
The DiskTypes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*DiskTypesClient) AggregatedList ¶
func (c *DiskTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListDiskTypesRequest, opts ...gax.CallOption) (*computepb.DiskTypeAggregatedList, error)
AggregatedList retrieves an aggregated list of disk types.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListDiskTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DiskTypesClient) Close ¶
func (c *DiskTypesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DiskTypesClient) Connection ¶
func (c *DiskTypesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*DiskTypesClient) Get ¶
func (c *DiskTypesClient) Get(ctx context.Context, req *computepb.GetDiskTypeRequest, opts ...gax.CallOption) (*computepb.DiskType, error)
Get returns the specified disk type. Gets a list of available disk types by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetDiskTypeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DiskTypesClient) List ¶
func (c *DiskTypesClient) List(ctx context.Context, req *computepb.ListDiskTypesRequest, opts ...gax.CallOption) (*computepb.DiskTypeList, error)
List retrieves a list of disk types available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListDiskTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type DisksCallOptions ¶
type DisksCallOptions struct { AddResourcePolicies []gax.CallOption AggregatedList []gax.CallOption CreateSnapshot []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption RemoveResourcePolicies []gax.CallOption Resize []gax.CallOption SetIamPolicy []gax.CallOption SetLabels []gax.CallOption TestIamPermissions []gax.CallOption }
DisksCallOptions contains the retry settings for each method of DisksClient.
type DisksClient ¶
type DisksClient struct { // The call options for this service. CallOptions *DisksCallOptions // contains filtered or unexported fields }
DisksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Disks API.
func NewDisksRESTClient ¶
func NewDisksRESTClient(ctx context.Context, opts ...option.ClientOption) (*DisksClient, error)
NewDisksRESTClient creates a new disks rest client.
The Disks API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*DisksClient) AddResourcePolicies ¶
func (c *DisksClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddResourcePolicies adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddResourcePoliciesDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.AddResourcePolicies(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) AggregatedList ¶
func (c *DisksClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListDisksRequest, opts ...gax.CallOption) (*computepb.DiskAggregatedList, error)
AggregatedList retrieves an aggregated list of persistent disks.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListDisksRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) Close ¶
func (c *DisksClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DisksClient) Connection ¶
func (c *DisksClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*DisksClient) CreateSnapshot ¶
func (c *DisksClient) CreateSnapshot(ctx context.Context, req *computepb.CreateSnapshotDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
CreateSnapshot creates a snapshot of a specified persistent disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.CreateSnapshotDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateSnapshot(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) Delete ¶
func (c *DisksClient) Delete(ctx context.Context, req *computepb.DeleteDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) Get ¶
func (c *DisksClient) Get(ctx context.Context, req *computepb.GetDiskRequest, opts ...gax.CallOption) (*computepb.Disk, error)
Get returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) GetIamPolicy ¶
func (c *DisksClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyDiskRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) Insert ¶
func (c *DisksClient) Insert(ctx context.Context, req *computepb.InsertDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) List ¶
func (c *DisksClient) List(ctx context.Context, req *computepb.ListDisksRequest, opts ...gax.CallOption) (*computepb.DiskList, error)
List retrieves a list of persistent disks contained within the specified zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListDisksRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) RemoveResourcePolicies ¶
func (c *DisksClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveResourcePolicies removes resource policies from a disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveResourcePoliciesDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveResourcePolicies(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) Resize ¶
func (c *DisksClient) Resize(ctx context.Context, req *computepb.ResizeDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Resize resizes the specified persistent disk. You can only increase the size of the disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ResizeDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Resize(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) SetIamPolicy ¶
func (c *DisksClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyDiskRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) SetLabels ¶
func (c *DisksClient) SetLabels(ctx context.Context, req *computepb.SetLabelsDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DisksClient) TestIamPermissions ¶
func (c *DisksClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsDiskRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ExternalVpnGatewaysCallOptions ¶
type ExternalVpnGatewaysCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetLabels []gax.CallOption TestIamPermissions []gax.CallOption }
ExternalVpnGatewaysCallOptions contains the retry settings for each method of ExternalVpnGatewaysClient.
type ExternalVpnGatewaysClient ¶
type ExternalVpnGatewaysClient struct { // The call options for this service. CallOptions *ExternalVpnGatewaysCallOptions // contains filtered or unexported fields }
ExternalVpnGatewaysClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The ExternalVpnGateways API.
func NewExternalVpnGatewaysRESTClient ¶
func NewExternalVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) (*ExternalVpnGatewaysClient, error)
NewExternalVpnGatewaysRESTClient creates a new external vpn gateways rest client.
The ExternalVpnGateways API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ExternalVpnGatewaysClient) Close ¶
func (c *ExternalVpnGatewaysClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ExternalVpnGatewaysClient) Connection ¶
func (c *ExternalVpnGatewaysClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ExternalVpnGatewaysClient) Delete ¶
func (c *ExternalVpnGatewaysClient) Delete(ctx context.Context, req *computepb.DeleteExternalVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified externalVpnGateway.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteExternalVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ExternalVpnGatewaysClient) Get ¶
func (c *ExternalVpnGatewaysClient) Get(ctx context.Context, req *computepb.GetExternalVpnGatewayRequest, opts ...gax.CallOption) (*computepb.ExternalVpnGateway, error)
Get returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetExternalVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ExternalVpnGatewaysClient) Insert ¶
func (c *ExternalVpnGatewaysClient) Insert(ctx context.Context, req *computepb.InsertExternalVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a ExternalVpnGateway in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertExternalVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ExternalVpnGatewaysClient) List ¶
func (c *ExternalVpnGatewaysClient) List(ctx context.Context, req *computepb.ListExternalVpnGatewaysRequest, opts ...gax.CallOption) (*computepb.ExternalVpnGatewayList, error)
List retrieves the list of ExternalVpnGateway available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListExternalVpnGatewaysRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ExternalVpnGatewaysClient) SetLabels ¶
func (c *ExternalVpnGatewaysClient) SetLabels(ctx context.Context, req *computepb.SetLabelsExternalVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsExternalVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ExternalVpnGatewaysClient) TestIamPermissions ¶
func (c *ExternalVpnGatewaysClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsExternalVpnGatewayRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsExternalVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type FirewallPoliciesCallOptions ¶
type FirewallPoliciesCallOptions struct { AddAssociation []gax.CallOption AddRule []gax.CallOption CloneRules []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetAssociation []gax.CallOption GetIamPolicy []gax.CallOption GetRule []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListAssociations []gax.CallOption Move []gax.CallOption Patch []gax.CallOption PatchRule []gax.CallOption RemoveAssociation []gax.CallOption RemoveRule []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
FirewallPoliciesCallOptions contains the retry settings for each method of FirewallPoliciesClient.
type FirewallPoliciesClient ¶
type FirewallPoliciesClient struct { // The call options for this service. CallOptions *FirewallPoliciesCallOptions // contains filtered or unexported fields }
FirewallPoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The FirewallPolicies API.
func NewFirewallPoliciesRESTClient ¶
func NewFirewallPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*FirewallPoliciesClient, error)
NewFirewallPoliciesRESTClient creates a new firewall policies rest client.
The FirewallPolicies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*FirewallPoliciesClient) AddAssociation ¶
func (c *FirewallPoliciesClient) AddAssociation(ctx context.Context, req *computepb.AddAssociationFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddAssociation inserts an association for the specified firewall policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddAssociationFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.AddAssociation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) AddRule ¶
func (c *FirewallPoliciesClient) AddRule(ctx context.Context, req *computepb.AddRuleFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddRule inserts a rule into a firewall policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddRuleFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.AddRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) CloneRules ¶
func (c *FirewallPoliciesClient) CloneRules(ctx context.Context, req *computepb.CloneRulesFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
CloneRules copies rules to the specified firewall policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.CloneRulesFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.CloneRules(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) Close ¶
func (c *FirewallPoliciesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*FirewallPoliciesClient) Connection ¶
func (c *FirewallPoliciesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*FirewallPoliciesClient) Delete ¶
func (c *FirewallPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) Get ¶
func (c *FirewallPoliciesClient) Get(ctx context.Context, req *computepb.GetFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.FirewallPolicy, error)
Get returns the specified firewall policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) GetAssociation ¶
func (c *FirewallPoliciesClient) GetAssociation(ctx context.Context, req *computepb.GetAssociationFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.FirewallPolicyAssociation, error)
GetAssociation gets an association with the specified name.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetAssociationFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.GetAssociation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) GetIamPolicy ¶
func (c *FirewallPoliciesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) GetRule ¶
func (c *FirewallPoliciesClient) GetRule(ctx context.Context, req *computepb.GetRuleFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.FirewallPolicyRule, error)
GetRule gets a rule of the specified priority.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRuleFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.GetRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) Insert ¶
func (c *FirewallPoliciesClient) Insert(ctx context.Context, req *computepb.InsertFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a new policy in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) List ¶
func (c *FirewallPoliciesClient) List(ctx context.Context, req *computepb.ListFirewallPoliciesRequest, opts ...gax.CallOption) (*computepb.FirewallPolicyList, error)
List lists all the policies that have been configured for the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListFirewallPoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) ListAssociations ¶
func (c *FirewallPoliciesClient) ListAssociations(ctx context.Context, req *computepb.ListAssociationsFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.FirewallPoliciesListAssociationsResponse, error)
ListAssociations lists associations of a specified target, i.e., organization or folder.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListAssociationsFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.ListAssociations(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) Move ¶
func (c *FirewallPoliciesClient) Move(ctx context.Context, req *computepb.MoveFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Move moves the specified firewall policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.MoveFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Move(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) Patch ¶
func (c *FirewallPoliciesClient) Patch(ctx context.Context, req *computepb.PatchFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified policy with the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) PatchRule ¶
func (c *FirewallPoliciesClient) PatchRule(ctx context.Context, req *computepb.PatchRuleFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
PatchRule patches a rule of the specified priority.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRuleFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.PatchRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) RemoveAssociation ¶
func (c *FirewallPoliciesClient) RemoveAssociation(ctx context.Context, req *computepb.RemoveAssociationFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveAssociation removes an association for the specified firewall policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveAssociationFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveAssociation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) RemoveRule ¶
func (c *FirewallPoliciesClient) RemoveRule(ctx context.Context, req *computepb.RemoveRuleFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveRule deletes a rule of the specified priority.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveRuleFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) SetIamPolicy ¶
func (c *FirewallPoliciesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallPoliciesClient) TestIamPermissions ¶
func (c *FirewallPoliciesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsFirewallPolicyRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsFirewallPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type FirewallsCallOptions ¶
type FirewallsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
FirewallsCallOptions contains the retry settings for each method of FirewallsClient.
type FirewallsClient ¶
type FirewallsClient struct { // The call options for this service. CallOptions *FirewallsCallOptions // contains filtered or unexported fields }
FirewallsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Firewalls API.
func NewFirewallsRESTClient ¶
func NewFirewallsRESTClient(ctx context.Context, opts ...option.ClientOption) (*FirewallsClient, error)
NewFirewallsRESTClient creates a new firewalls rest client.
The Firewalls API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*FirewallsClient) Close ¶
func (c *FirewallsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*FirewallsClient) Connection ¶
func (c *FirewallsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*FirewallsClient) Delete ¶
func (c *FirewallsClient) Delete(ctx context.Context, req *computepb.DeleteFirewallRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified firewall.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteFirewallRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallsClient) Get ¶
func (c *FirewallsClient) Get(ctx context.Context, req *computepb.GetFirewallRequest, opts ...gax.CallOption) (*computepb.Firewall, error)
Get returns the specified firewall.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetFirewallRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallsClient) Insert ¶
func (c *FirewallsClient) Insert(ctx context.Context, req *computepb.InsertFirewallRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a firewall rule in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertFirewallRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallsClient) List ¶
func (c *FirewallsClient) List(ctx context.Context, req *computepb.ListFirewallsRequest, opts ...gax.CallOption) (*computepb.FirewallList, error)
List retrieves the list of firewall rules available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListFirewallsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallsClient) Patch ¶
func (c *FirewallsClient) Patch(ctx context.Context, req *computepb.PatchFirewallRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchFirewallRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*FirewallsClient) Update ¶
func (c *FirewallsClient) Update(ctx context.Context, req *computepb.UpdateFirewallRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateFirewallRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ForwardingRulesCallOptions ¶
type ForwardingRulesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetLabels []gax.CallOption SetTarget []gax.CallOption }
ForwardingRulesCallOptions contains the retry settings for each method of ForwardingRulesClient.
type ForwardingRulesClient ¶
type ForwardingRulesClient struct { // The call options for this service. CallOptions *ForwardingRulesCallOptions // contains filtered or unexported fields }
ForwardingRulesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The ForwardingRules API.
func NewForwardingRulesRESTClient ¶
func NewForwardingRulesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ForwardingRulesClient, error)
NewForwardingRulesRESTClient creates a new forwarding rules rest client.
The ForwardingRules API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ForwardingRulesClient) AggregatedList ¶
func (c *ForwardingRulesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListForwardingRulesRequest, opts ...gax.CallOption) (*computepb.ForwardingRuleAggregatedList, error)
AggregatedList retrieves an aggregated list of forwarding rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListForwardingRulesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) Close ¶
func (c *ForwardingRulesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ForwardingRulesClient) Connection ¶
func (c *ForwardingRulesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ForwardingRulesClient) Delete ¶
func (c *ForwardingRulesClient) Delete(ctx context.Context, req *computepb.DeleteForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified ForwardingRule resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) Get ¶
func (c *ForwardingRulesClient) Get(ctx context.Context, req *computepb.GetForwardingRuleRequest, opts ...gax.CallOption) (*computepb.ForwardingRule, error)
Get returns the specified ForwardingRule resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) Insert ¶
func (c *ForwardingRulesClient) Insert(ctx context.Context, req *computepb.InsertForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a ForwardingRule resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) List ¶
func (c *ForwardingRulesClient) List(ctx context.Context, req *computepb.ListForwardingRulesRequest, opts ...gax.CallOption) (*computepb.ForwardingRuleList, error)
List retrieves a list of ForwardingRule resources available to the specified project and region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListForwardingRulesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) Patch ¶
func (c *ForwardingRulesClient) Patch(ctx context.Context, req *computepb.PatchForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) SetLabels ¶
func (c *ForwardingRulesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ForwardingRulesClient) SetTarget ¶
func (c *ForwardingRulesClient) SetTarget(ctx context.Context, req *computepb.SetTargetForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetTarget changes target URL for forwarding rule. The new target should be of the same type as the old target.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetTargetForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.SetTarget(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type GlobalAddressesCallOptions ¶
type GlobalAddressesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
GlobalAddressesCallOptions contains the retry settings for each method of GlobalAddressesClient.
type GlobalAddressesClient ¶
type GlobalAddressesClient struct { // The call options for this service. CallOptions *GlobalAddressesCallOptions // contains filtered or unexported fields }
GlobalAddressesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The GlobalAddresses API.
func NewGlobalAddressesRESTClient ¶
func NewGlobalAddressesRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalAddressesClient, error)
NewGlobalAddressesRESTClient creates a new global addresses rest client.
The GlobalAddresses API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*GlobalAddressesClient) Close ¶
func (c *GlobalAddressesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GlobalAddressesClient) Connection ¶
func (c *GlobalAddressesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*GlobalAddressesClient) Delete ¶
func (c *GlobalAddressesClient) Delete(ctx context.Context, req *computepb.DeleteGlobalAddressRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified address resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteGlobalAddressRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalAddressesClient) Get ¶
func (c *GlobalAddressesClient) Get(ctx context.Context, req *computepb.GetGlobalAddressRequest, opts ...gax.CallOption) (*computepb.Address, error)
Get returns the specified address resource. Gets a list of available addresses by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGlobalAddressRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalAddressesClient) Insert ¶
func (c *GlobalAddressesClient) Insert(ctx context.Context, req *computepb.InsertGlobalAddressRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an address resource in the specified project by using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertGlobalAddressRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalAddressesClient) List ¶
func (c *GlobalAddressesClient) List(ctx context.Context, req *computepb.ListGlobalAddressesRequest, opts ...gax.CallOption) (*computepb.AddressList, error)
List retrieves a list of global addresses.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListGlobalAddressesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type GlobalForwardingRulesCallOptions ¶
type GlobalForwardingRulesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetLabels []gax.CallOption SetTarget []gax.CallOption }
GlobalForwardingRulesCallOptions contains the retry settings for each method of GlobalForwardingRulesClient.
type GlobalForwardingRulesClient ¶
type GlobalForwardingRulesClient struct { // The call options for this service. CallOptions *GlobalForwardingRulesCallOptions // contains filtered or unexported fields }
GlobalForwardingRulesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The GlobalForwardingRules API.
func NewGlobalForwardingRulesRESTClient ¶
func NewGlobalForwardingRulesRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalForwardingRulesClient, error)
NewGlobalForwardingRulesRESTClient creates a new global forwarding rules rest client.
The GlobalForwardingRules API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*GlobalForwardingRulesClient) Close ¶
func (c *GlobalForwardingRulesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GlobalForwardingRulesClient) Connection ¶
func (c *GlobalForwardingRulesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*GlobalForwardingRulesClient) Delete ¶
func (c *GlobalForwardingRulesClient) Delete(ctx context.Context, req *computepb.DeleteGlobalForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified GlobalForwardingRule resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteGlobalForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalForwardingRulesClient) Get ¶
func (c *GlobalForwardingRulesClient) Get(ctx context.Context, req *computepb.GetGlobalForwardingRuleRequest, opts ...gax.CallOption) (*computepb.ForwardingRule, error)
Get returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGlobalForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalForwardingRulesClient) Insert ¶
func (c *GlobalForwardingRulesClient) Insert(ctx context.Context, req *computepb.InsertGlobalForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a GlobalForwardingRule resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertGlobalForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalForwardingRulesClient) List ¶
func (c *GlobalForwardingRulesClient) List(ctx context.Context, req *computepb.ListGlobalForwardingRulesRequest, opts ...gax.CallOption) (*computepb.ForwardingRuleList, error)
List retrieves a list of GlobalForwardingRule resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListGlobalForwardingRulesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalForwardingRulesClient) Patch ¶
func (c *GlobalForwardingRulesClient) Patch(ctx context.Context, req *computepb.PatchGlobalForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchGlobalForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalForwardingRulesClient) SetLabels ¶
func (c *GlobalForwardingRulesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsGlobalForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsGlobalForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalForwardingRulesClient) SetTarget ¶
func (c *GlobalForwardingRulesClient) SetTarget(ctx context.Context, req *computepb.SetTargetGlobalForwardingRuleRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetTarget changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetTargetGlobalForwardingRuleRequest{ // TODO: Fill request struct fields. } resp, err := c.SetTarget(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type GlobalNetworkEndpointGroupsCallOptions ¶
type GlobalNetworkEndpointGroupsCallOptions struct { AttachNetworkEndpoints []gax.CallOption Delete []gax.CallOption DetachNetworkEndpoints []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListNetworkEndpoints []gax.CallOption }
GlobalNetworkEndpointGroupsCallOptions contains the retry settings for each method of GlobalNetworkEndpointGroupsClient.
type GlobalNetworkEndpointGroupsClient ¶
type GlobalNetworkEndpointGroupsClient struct { // The call options for this service. CallOptions *GlobalNetworkEndpointGroupsCallOptions // contains filtered or unexported fields }
GlobalNetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The GlobalNetworkEndpointGroups API.
func NewGlobalNetworkEndpointGroupsRESTClient ¶
func NewGlobalNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalNetworkEndpointGroupsClient, error)
NewGlobalNetworkEndpointGroupsRESTClient creates a new global network endpoint groups rest client.
The GlobalNetworkEndpointGroups API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*GlobalNetworkEndpointGroupsClient) AttachNetworkEndpoints ¶
func (c *GlobalNetworkEndpointGroupsClient) AttachNetworkEndpoints(ctx context.Context, req *computepb.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AttachNetworkEndpoints attach a network endpoint to the specified network endpoint group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.AttachNetworkEndpoints(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalNetworkEndpointGroupsClient) Close ¶
func (c *GlobalNetworkEndpointGroupsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GlobalNetworkEndpointGroupsClient) Connection ¶
func (c *GlobalNetworkEndpointGroupsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*GlobalNetworkEndpointGroupsClient) Delete ¶
func (c *GlobalNetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteGlobalNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteGlobalNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalNetworkEndpointGroupsClient) DetachNetworkEndpoints ¶
func (c *GlobalNetworkEndpointGroupsClient) DetachNetworkEndpoints(ctx context.Context, req *computepb.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DetachNetworkEndpoints detach the network endpoint from the specified network endpoint group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.DetachNetworkEndpoints(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalNetworkEndpointGroupsClient) Get ¶
func (c *GlobalNetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetGlobalNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroup, error)
Get returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGlobalNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalNetworkEndpointGroupsClient) Insert ¶
func (c *GlobalNetworkEndpointGroupsClient) Insert(ctx context.Context, req *computepb.InsertGlobalNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a network endpoint group in the specified project using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertGlobalNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalNetworkEndpointGroupsClient) List ¶
func (c *GlobalNetworkEndpointGroupsClient) List(ctx context.Context, req *computepb.ListGlobalNetworkEndpointGroupsRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroupList, error)
List retrieves the list of network endpoint groups that are located in the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListGlobalNetworkEndpointGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalNetworkEndpointGroupsClient) ListNetworkEndpoints ¶
func (c *GlobalNetworkEndpointGroupsClient) ListNetworkEndpoints(ctx context.Context, req *computepb.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroupsListNetworkEndpoints, error)
ListNetworkEndpoints lists the network endpoints in the specified network endpoint group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.ListNetworkEndpoints(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type GlobalOperationsCallOptions ¶
type GlobalOperationsCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption List []gax.CallOption Wait []gax.CallOption }
GlobalOperationsCallOptions contains the retry settings for each method of GlobalOperationsClient.
type GlobalOperationsClient ¶
type GlobalOperationsClient struct { // The call options for this service. CallOptions *GlobalOperationsCallOptions // contains filtered or unexported fields }
GlobalOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The GlobalOperations API.
func NewGlobalOperationsRESTClient ¶
func NewGlobalOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalOperationsClient, error)
NewGlobalOperationsRESTClient creates a new global operations rest client.
The GlobalOperations API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*GlobalOperationsClient) AggregatedList ¶
func (c *GlobalOperationsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListGlobalOperationsRequest, opts ...gax.CallOption) (*computepb.OperationAggregatedList, error)
AggregatedList retrieves an aggregated list of all operations.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListGlobalOperationsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalOperationsClient) Close ¶
func (c *GlobalOperationsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GlobalOperationsClient) Connection ¶
func (c *GlobalOperationsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*GlobalOperationsClient) Delete ¶
func (c *GlobalOperationsClient) Delete(ctx context.Context, req *computepb.DeleteGlobalOperationRequest, opts ...gax.CallOption) (*computepb.DeleteGlobalOperationResponse, error)
Delete deletes the specified Operations resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteGlobalOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalOperationsClient) Get ¶
func (c *GlobalOperationsClient) Get(ctx context.Context, req *computepb.GetGlobalOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Get retrieves the specified Operations resource. Gets a list of operations by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGlobalOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalOperationsClient) List ¶
func (c *GlobalOperationsClient) List(ctx context.Context, req *computepb.ListGlobalOperationsRequest, opts ...gax.CallOption) (*computepb.OperationList, error)
List retrieves a list of Operation resources contained within the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListGlobalOperationsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalOperationsClient) Wait ¶
func (c *GlobalOperationsClient) Wait(ctx context.Context, req *computepb.WaitGlobalOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Wait waits for the specified Operation resource to return as DONE or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the GET method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be DONE or still in progress.
This method is called on a best-effort basis. Specifically:
In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.WaitGlobalOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Wait(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type GlobalOrganizationOperationsCallOptions ¶
type GlobalOrganizationOperationsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption List []gax.CallOption }
GlobalOrganizationOperationsCallOptions contains the retry settings for each method of GlobalOrganizationOperationsClient.
type GlobalOrganizationOperationsClient ¶
type GlobalOrganizationOperationsClient struct { // The call options for this service. CallOptions *GlobalOrganizationOperationsCallOptions // contains filtered or unexported fields }
GlobalOrganizationOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The GlobalOrganizationOperations API.
func NewGlobalOrganizationOperationsRESTClient ¶
func NewGlobalOrganizationOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalOrganizationOperationsClient, error)
NewGlobalOrganizationOperationsRESTClient creates a new global organization operations rest client.
The GlobalOrganizationOperations API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*GlobalOrganizationOperationsClient) Close ¶
func (c *GlobalOrganizationOperationsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GlobalOrganizationOperationsClient) Connection ¶
func (c *GlobalOrganizationOperationsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*GlobalOrganizationOperationsClient) Delete ¶
func (c *GlobalOrganizationOperationsClient) Delete(ctx context.Context, req *computepb.DeleteGlobalOrganizationOperationRequest, opts ...gax.CallOption) (*computepb.DeleteGlobalOrganizationOperationResponse, error)
Delete deletes the specified Operations resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteGlobalOrganizationOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalOrganizationOperationsClient) Get ¶
func (c *GlobalOrganizationOperationsClient) Get(ctx context.Context, req *computepb.GetGlobalOrganizationOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Get retrieves the specified Operations resource. Gets a list of operations by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGlobalOrganizationOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalOrganizationOperationsClient) List ¶
func (c *GlobalOrganizationOperationsClient) List(ctx context.Context, req *computepb.ListGlobalOrganizationOperationsRequest, opts ...gax.CallOption) (*computepb.OperationList, error)
List retrieves a list of Operation resources contained within the specified organization.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListGlobalOrganizationOperationsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type GlobalPublicDelegatedPrefixesCallOptions ¶
type GlobalPublicDelegatedPrefixesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
GlobalPublicDelegatedPrefixesCallOptions contains the retry settings for each method of GlobalPublicDelegatedPrefixesClient.
type GlobalPublicDelegatedPrefixesClient ¶
type GlobalPublicDelegatedPrefixesClient struct { // The call options for this service. CallOptions *GlobalPublicDelegatedPrefixesCallOptions // contains filtered or unexported fields }
GlobalPublicDelegatedPrefixesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The GlobalPublicDelegatedPrefixes API.
func NewGlobalPublicDelegatedPrefixesRESTClient ¶
func NewGlobalPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalPublicDelegatedPrefixesClient, error)
NewGlobalPublicDelegatedPrefixesRESTClient creates a new global public delegated prefixes rest client.
The GlobalPublicDelegatedPrefixes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*GlobalPublicDelegatedPrefixesClient) Close ¶
func (c *GlobalPublicDelegatedPrefixesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*GlobalPublicDelegatedPrefixesClient) Connection ¶
func (c *GlobalPublicDelegatedPrefixesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*GlobalPublicDelegatedPrefixesClient) Delete ¶
func (c *GlobalPublicDelegatedPrefixesClient) Delete(ctx context.Context, req *computepb.DeleteGlobalPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified global PublicDelegatedPrefix.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteGlobalPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalPublicDelegatedPrefixesClient) Get ¶
func (c *GlobalPublicDelegatedPrefixesClient) Get(ctx context.Context, req *computepb.GetGlobalPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.PublicDelegatedPrefix, error)
Get returns the specified global PublicDelegatedPrefix resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGlobalPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalPublicDelegatedPrefixesClient) Insert ¶
func (c *GlobalPublicDelegatedPrefixesClient) Insert(ctx context.Context, req *computepb.InsertGlobalPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertGlobalPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalPublicDelegatedPrefixesClient) List ¶
func (c *GlobalPublicDelegatedPrefixesClient) List(ctx context.Context, req *computepb.ListGlobalPublicDelegatedPrefixesRequest, opts ...gax.CallOption) (*computepb.PublicDelegatedPrefixList, error)
List lists the global PublicDelegatedPrefixes for a project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListGlobalPublicDelegatedPrefixesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*GlobalPublicDelegatedPrefixesClient) Patch ¶
func (c *GlobalPublicDelegatedPrefixesClient) Patch(ctx context.Context, req *computepb.PatchGlobalPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchGlobalPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type HealthChecksCallOptions ¶
type HealthChecksCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
HealthChecksCallOptions contains the retry settings for each method of HealthChecksClient.
type HealthChecksClient ¶
type HealthChecksClient struct { // The call options for this service. CallOptions *HealthChecksCallOptions // contains filtered or unexported fields }
HealthChecksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The HealthChecks API.
func NewHealthChecksRESTClient ¶
func NewHealthChecksRESTClient(ctx context.Context, opts ...option.ClientOption) (*HealthChecksClient, error)
NewHealthChecksRESTClient creates a new health checks rest client.
The HealthChecks API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*HealthChecksClient) AggregatedList ¶
func (c *HealthChecksClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListHealthChecksRequest, opts ...gax.CallOption) (*computepb.HealthChecksAggregatedList, error)
AggregatedList retrieves the list of all HealthCheck resources, regional and global, available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListHealthChecksRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthChecksClient) Close ¶
func (c *HealthChecksClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*HealthChecksClient) Connection ¶
func (c *HealthChecksClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*HealthChecksClient) Delete ¶
func (c *HealthChecksClient) Delete(ctx context.Context, req *computepb.DeleteHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified HealthCheck resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthChecksClient) Get ¶
func (c *HealthChecksClient) Get(ctx context.Context, req *computepb.GetHealthCheckRequest, opts ...gax.CallOption) (*computepb.HealthCheck, error)
Get returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthChecksClient) Insert ¶
func (c *HealthChecksClient) Insert(ctx context.Context, req *computepb.InsertHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a HealthCheck resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthChecksClient) List ¶
func (c *HealthChecksClient) List(ctx context.Context, req *computepb.ListHealthChecksRequest, opts ...gax.CallOption) (*computepb.HealthCheckList, error)
List retrieves the list of HealthCheck resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListHealthChecksRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthChecksClient) Patch ¶
func (c *HealthChecksClient) Patch(ctx context.Context, req *computepb.PatchHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*HealthChecksClient) Update ¶
func (c *HealthChecksClient) Update(ctx context.Context, req *computepb.UpdateHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates a HealthCheck resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ImagesCallOptions ¶
type ImagesCallOptions struct { Delete []gax.CallOption Deprecate []gax.CallOption Get []gax.CallOption GetFromFamily []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetIamPolicy []gax.CallOption SetLabels []gax.CallOption TestIamPermissions []gax.CallOption }
ImagesCallOptions contains the retry settings for each method of ImagesClient.
type ImagesClient ¶
type ImagesClient struct { // The call options for this service. CallOptions *ImagesCallOptions // contains filtered or unexported fields }
ImagesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Images API.
func NewImagesRESTClient ¶
func NewImagesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ImagesClient, error)
NewImagesRESTClient creates a new images rest client.
The Images API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ImagesClient) Close ¶
func (c *ImagesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ImagesClient) Connection ¶
func (c *ImagesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ImagesClient) Delete ¶
func (c *ImagesClient) Delete(ctx context.Context, req *computepb.DeleteImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified image.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteImageRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) Deprecate ¶
func (c *ImagesClient) Deprecate(ctx context.Context, req *computepb.DeprecateImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Deprecate sets the deprecation status of an image.
If an empty request body is given, clears the deprecation status instead.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeprecateImageRequest{ // TODO: Fill request struct fields. } resp, err := c.Deprecate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) Get ¶
func (c *ImagesClient) Get(ctx context.Context, req *computepb.GetImageRequest, opts ...gax.CallOption) (*computepb.Image, error)
Get returns the specified image. Gets a list of available images by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetImageRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) GetFromFamily ¶
func (c *ImagesClient) GetFromFamily(ctx context.Context, req *computepb.GetFromFamilyImageRequest, opts ...gax.CallOption) (*computepb.Image, error)
GetFromFamily returns the latest image that is part of an image family and is not deprecated.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetFromFamilyImageRequest{ // TODO: Fill request struct fields. } resp, err := c.GetFromFamily(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) GetIamPolicy ¶
func (c *ImagesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyImageRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyImageRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) Insert ¶
func (c *ImagesClient) Insert(ctx context.Context, req *computepb.InsertImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an image in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertImageRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) List ¶
func (c *ImagesClient) List(ctx context.Context, req *computepb.ListImagesRequest, opts ...gax.CallOption) (*computepb.ImageList, error)
List retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListImagesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) Patch ¶
func (c *ImagesClient) Patch(ctx context.Context, req *computepb.PatchImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchImageRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) SetIamPolicy ¶
func (c *ImagesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyImageRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyImageRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) SetLabels ¶
func (c *ImagesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsImageRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsImageRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ImagesClient) TestIamPermissions ¶
func (c *ImagesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsImageRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsImageRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InstanceGroupManagersCallOptions ¶
type InstanceGroupManagersCallOptions struct { AbandonInstances []gax.CallOption AggregatedList []gax.CallOption ApplyUpdatesToInstances []gax.CallOption CreateInstances []gax.CallOption Delete []gax.CallOption DeleteInstances []gax.CallOption DeletePerInstanceConfigs []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListErrors []gax.CallOption ListManagedInstances []gax.CallOption ListPerInstanceConfigs []gax.CallOption Patch []gax.CallOption PatchPerInstanceConfigs []gax.CallOption RecreateInstances []gax.CallOption Resize []gax.CallOption SetInstanceTemplate []gax.CallOption SetTargetPools []gax.CallOption UpdatePerInstanceConfigs []gax.CallOption }
InstanceGroupManagersCallOptions contains the retry settings for each method of InstanceGroupManagersClient.
type InstanceGroupManagersClient ¶
type InstanceGroupManagersClient struct { // The call options for this service. CallOptions *InstanceGroupManagersCallOptions // contains filtered or unexported fields }
InstanceGroupManagersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The InstanceGroupManagers API.
func NewInstanceGroupManagersRESTClient ¶
func NewInstanceGroupManagersRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceGroupManagersClient, error)
NewInstanceGroupManagersRESTClient creates a new instance group managers rest client.
The InstanceGroupManagers API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InstanceGroupManagersClient) AbandonInstances ¶
func (c *InstanceGroupManagersClient) AbandonInstances(ctx context.Context, req *computepb.AbandonInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AbandonInstances flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
You can specify a maximum of 1000 instances with this method per request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AbandonInstancesInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.AbandonInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) AggregatedList ¶
func (c *InstanceGroupManagersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagerAggregatedList, error)
AggregatedList retrieves the list of managed instance groups and groups them by zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) ApplyUpdatesToInstances ¶
func (c *InstanceGroupManagersClient) ApplyUpdatesToInstances(ctx context.Context, req *computepb.ApplyUpdatesToInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
ApplyUpdatesToInstances applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ApplyUpdatesToInstancesInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.ApplyUpdatesToInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) Close ¶
func (c *InstanceGroupManagersClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InstanceGroupManagersClient) Connection ¶
func (c *InstanceGroupManagersClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InstanceGroupManagersClient) CreateInstances ¶
func (c *InstanceGroupManagersClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
CreateInstances creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.CreateInstancesInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) Delete ¶
func (c *InstanceGroupManagersClient) Delete(ctx context.Context, req *computepb.DeleteInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) DeleteInstances ¶
func (c *InstanceGroupManagersClient) DeleteInstances(ctx context.Context, req *computepb.DeleteInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeleteInstances flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
You can specify a maximum of 1000 instances with this method per request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInstancesInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) DeletePerInstanceConfigs ¶
func (c *InstanceGroupManagersClient) DeletePerInstanceConfigs(ctx context.Context, req *computepb.DeletePerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeletePerInstanceConfigsInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.DeletePerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) Get ¶
func (c *InstanceGroupManagersClient) Get(ctx context.Context, req *computepb.GetInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManager, error)
Get returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) Insert ¶
func (c *InstanceGroupManagersClient) Insert(ctx context.Context, req *computepb.InsertInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) List ¶
func (c *InstanceGroupManagersClient) List(ctx context.Context, req *computepb.ListInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagerList, error)
List retrieves a list of managed instance groups that are contained within the specified project and zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) ListErrors ¶
func (c *InstanceGroupManagersClient) ListErrors(ctx context.Context, req *computepb.ListErrorsInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagersListErrorsResponse, error)
ListErrors lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListErrorsInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.ListErrors(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) ListManagedInstances ¶
func (c *InstanceGroupManagersClient) ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagersListManagedInstancesResponse, error)
ListManagedInstances lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListManagedInstancesInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.ListManagedInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) ListPerInstanceConfigs ¶
func (c *InstanceGroupManagersClient) ListPerInstanceConfigs(ctx context.Context, req *computepb.ListPerInstanceConfigsInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagersListPerInstanceConfigsResp, error)
ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPerInstanceConfigsInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.ListPerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) Patch ¶
func (c *InstanceGroupManagersClient) Patch(ctx context.Context, req *computepb.PatchInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) PatchPerInstanceConfigs ¶
func (c *InstanceGroupManagersClient) PatchPerInstanceConfigs(ctx context.Context, req *computepb.PatchPerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchPerInstanceConfigsInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.PatchPerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) RecreateInstances ¶
func (c *InstanceGroupManagersClient) RecreateInstances(ctx context.Context, req *computepb.RecreateInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RecreateInstances flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group’s current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
You can specify a maximum of 1000 instances with this method per request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RecreateInstancesInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.RecreateInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) Resize ¶
func (c *InstanceGroupManagersClient) Resize(ctx context.Context, req *computepb.ResizeInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Resize resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:
The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.
This list is subject to change.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ResizeInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Resize(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) SetInstanceTemplate ¶
func (c *InstanceGroupManagersClient) SetInstanceTemplate(ctx context.Context, req *computepb.SetInstanceTemplateInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetInstanceTemplate specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group’s updatePolicy.type to PROACTIVE.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetInstanceTemplateInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.SetInstanceTemplate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) SetTargetPools ¶
func (c *InstanceGroupManagersClient) SetTargetPools(ctx context.Context, req *computepb.SetTargetPoolsInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetTargetPools modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetTargetPoolsInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.SetTargetPools(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupManagersClient) UpdatePerInstanceConfigs ¶
func (c *InstanceGroupManagersClient) UpdatePerInstanceConfigs(ctx context.Context, req *computepb.UpdatePerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdatePerInstanceConfigsInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdatePerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InstanceGroupsCallOptions ¶
type InstanceGroupsCallOptions struct { AddInstances []gax.CallOption AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListInstances []gax.CallOption RemoveInstances []gax.CallOption SetNamedPorts []gax.CallOption }
InstanceGroupsCallOptions contains the retry settings for each method of InstanceGroupsClient.
type InstanceGroupsClient ¶
type InstanceGroupsClient struct { // The call options for this service. CallOptions *InstanceGroupsCallOptions // contains filtered or unexported fields }
InstanceGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The InstanceGroups API.
func NewInstanceGroupsRESTClient ¶
func NewInstanceGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceGroupsClient, error)
NewInstanceGroupsRESTClient creates a new instance groups rest client.
The InstanceGroups API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InstanceGroupsClient) AddInstances ¶
func (c *InstanceGroupsClient) AddInstances(ctx context.Context, req *computepb.AddInstancesInstanceGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddInstances adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddInstancesInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.AddInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) AggregatedList ¶
func (c *InstanceGroupsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstanceGroupsRequest, opts ...gax.CallOption) (*computepb.InstanceGroupAggregatedList, error)
AggregatedList retrieves the list of instance groups and sorts them by zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListInstanceGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) Close ¶
func (c *InstanceGroupsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InstanceGroupsClient) Connection ¶
func (c *InstanceGroupsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InstanceGroupsClient) Delete ¶
func (c *InstanceGroupsClient) Delete(ctx context.Context, req *computepb.DeleteInstanceGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) Get ¶
func (c *InstanceGroupsClient) Get(ctx context.Context, req *computepb.GetInstanceGroupRequest, opts ...gax.CallOption) (*computepb.InstanceGroup, error)
Get returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.
For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) Insert ¶
func (c *InstanceGroupsClient) Insert(ctx context.Context, req *computepb.InsertInstanceGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an instance group in the specified project using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) List ¶
func (c *InstanceGroupsClient) List(ctx context.Context, req *computepb.ListInstanceGroupsRequest, opts ...gax.CallOption) (*computepb.InstanceGroupList, error)
List retrieves the list of zonal instance group resources contained within the specified zone.
For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInstanceGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) ListInstances ¶
func (c *InstanceGroupsClient) ListInstances(ctx context.Context, req *computepb.ListInstancesInstanceGroupsRequest, opts ...gax.CallOption) (*computepb.InstanceGroupsListInstances, error)
ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInstancesInstanceGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.ListInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) RemoveInstances ¶
func (c *InstanceGroupsClient) RemoveInstances(ctx context.Context, req *computepb.RemoveInstancesInstanceGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveInstances removes one or more instances from the specified instance group, but does not delete those instances.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveInstancesInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceGroupsClient) SetNamedPorts ¶
func (c *InstanceGroupsClient) SetNamedPorts(ctx context.Context, req *computepb.SetNamedPortsInstanceGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetNamedPorts sets the named ports for the specified instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetNamedPortsInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.SetNamedPorts(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InstanceTemplatesCallOptions ¶
type InstanceTemplatesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
InstanceTemplatesCallOptions contains the retry settings for each method of InstanceTemplatesClient.
type InstanceTemplatesClient ¶
type InstanceTemplatesClient struct { // The call options for this service. CallOptions *InstanceTemplatesCallOptions // contains filtered or unexported fields }
InstanceTemplatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The InstanceTemplates API.
func NewInstanceTemplatesRESTClient ¶
func NewInstanceTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceTemplatesClient, error)
NewInstanceTemplatesRESTClient creates a new instance templates rest client.
The InstanceTemplates API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InstanceTemplatesClient) Close ¶
func (c *InstanceTemplatesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InstanceTemplatesClient) Connection ¶
func (c *InstanceTemplatesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InstanceTemplatesClient) Delete ¶
func (c *InstanceTemplatesClient) Delete(ctx context.Context, req *computepb.DeleteInstanceTemplateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInstanceTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceTemplatesClient) Get ¶
func (c *InstanceTemplatesClient) Get(ctx context.Context, req *computepb.GetInstanceTemplateRequest, opts ...gax.CallOption) (*computepb.InstanceTemplate, error)
Get returns the specified instance template. Gets a list of available instance templates by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInstanceTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceTemplatesClient) GetIamPolicy ¶
func (c *InstanceTemplatesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyInstanceTemplateRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyInstanceTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceTemplatesClient) Insert ¶
func (c *InstanceTemplatesClient) Insert(ctx context.Context, req *computepb.InsertInstanceTemplateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertInstanceTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceTemplatesClient) List ¶
func (c *InstanceTemplatesClient) List(ctx context.Context, req *computepb.ListInstanceTemplatesRequest, opts ...gax.CallOption) (*computepb.InstanceTemplateList, error)
List retrieves a list of instance templates that are contained within the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInstanceTemplatesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceTemplatesClient) SetIamPolicy ¶
func (c *InstanceTemplatesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyInstanceTemplateRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyInstanceTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstanceTemplatesClient) TestIamPermissions ¶
func (c *InstanceTemplatesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsInstanceTemplateRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsInstanceTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InstancesCallOptions ¶
type InstancesCallOptions struct { AddAccessConfig []gax.CallOption AddResourcePolicies []gax.CallOption AggregatedList []gax.CallOption AttachDisk []gax.CallOption BulkInsert []gax.CallOption Delete []gax.CallOption DeleteAccessConfig []gax.CallOption DetachDisk []gax.CallOption Get []gax.CallOption GetEffectiveFirewalls []gax.CallOption GetGuestAttributes []gax.CallOption GetIamPolicy []gax.CallOption GetScreenshot []gax.CallOption GetSerialPortOutput []gax.CallOption GetShieldedInstanceIdentity []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListReferrers []gax.CallOption RemoveResourcePolicies []gax.CallOption Reset []gax.CallOption SetDeletionProtection []gax.CallOption SetDiskAutoDelete []gax.CallOption SetIamPolicy []gax.CallOption SetLabels []gax.CallOption SetMachineResources []gax.CallOption SetMachineType []gax.CallOption SetMetadata []gax.CallOption SetMinCpuPlatform []gax.CallOption SetScheduling []gax.CallOption SetServiceAccount []gax.CallOption SetShieldedInstanceIntegrityPolicy []gax.CallOption SetTags []gax.CallOption SimulateMaintenanceEvent []gax.CallOption Start []gax.CallOption StartWithEncryptionKey []gax.CallOption Stop []gax.CallOption TestIamPermissions []gax.CallOption Update []gax.CallOption UpdateAccessConfig []gax.CallOption UpdateDisplayDevice []gax.CallOption UpdateNetworkInterface []gax.CallOption UpdateShieldedInstanceConfig []gax.CallOption }
InstancesCallOptions contains the retry settings for each method of InstancesClient.
type InstancesClient ¶
type InstancesClient struct { // The call options for this service. CallOptions *InstancesCallOptions // contains filtered or unexported fields }
InstancesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Instances API.
func NewInstancesRESTClient ¶
func NewInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstancesClient, error)
NewInstancesRESTClient creates a new instances rest client.
The Instances API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InstancesClient) AddAccessConfig ¶
func (c *InstancesClient) AddAccessConfig(ctx context.Context, req *computepb.AddAccessConfigInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddAccessConfig adds an access config to an instance’s network interface.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddAccessConfigInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.AddAccessConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) AddResourcePolicies ¶
func (c *InstancesClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddResourcePolicies adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddResourcePoliciesInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.AddResourcePolicies(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) AggregatedList ¶
func (c *InstancesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInstancesRequest, opts ...gax.CallOption) (*computepb.InstanceAggregatedList, error)
AggregatedList retrieves aggregated list of all of the instances in your project across all regions and zones.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListInstancesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) AttachDisk ¶
func (c *InstancesClient) AttachDisk(ctx context.Context, req *computepb.AttachDiskInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AttachDisk attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AttachDiskInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.AttachDisk(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) BulkInsert ¶
func (c *InstancesClient) BulkInsert(ctx context.Context, req *computepb.BulkInsertInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
BulkInsert creates multiple instances. Count specifies the number of instances to create.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.BulkInsertInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.BulkInsert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Close ¶
func (c *InstancesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InstancesClient) Connection ¶
func (c *InstancesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InstancesClient) Delete ¶
func (c *InstancesClient) Delete(ctx context.Context, req *computepb.DeleteInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified Instance resource. For more information, see Deleting an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) DeleteAccessConfig ¶
func (c *InstancesClient) DeleteAccessConfig(ctx context.Context, req *computepb.DeleteAccessConfigInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeleteAccessConfig deletes an access config from an instance’s network interface.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteAccessConfigInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteAccessConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) DetachDisk ¶
func (c *InstancesClient) DetachDisk(ctx context.Context, req *computepb.DetachDiskInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DetachDisk detaches a disk from an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DetachDiskInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.DetachDisk(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Get ¶
func (c *InstancesClient) Get(ctx context.Context, req *computepb.GetInstanceRequest, opts ...gax.CallOption) (*computepb.Instance, error)
Get returns the specified Instance resource. Gets a list of available instances by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) GetEffectiveFirewalls ¶
func (c *InstancesClient) GetEffectiveFirewalls(ctx context.Context, req *computepb.GetEffectiveFirewallsInstanceRequest, opts ...gax.CallOption) (*computepb.InstancesGetEffectiveFirewallsResponse, error)
GetEffectiveFirewalls returns effective firewalls applied to an interface of the instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetEffectiveFirewallsInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetEffectiveFirewalls(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) GetGuestAttributes ¶
func (c *InstancesClient) GetGuestAttributes(ctx context.Context, req *computepb.GetGuestAttributesInstanceRequest, opts ...gax.CallOption) (*computepb.GuestAttributes, error)
GetGuestAttributes returns the specified guest attributes entry.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetGuestAttributesInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetGuestAttributes(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) GetIamPolicy ¶
func (c *InstancesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyInstanceRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) GetScreenshot ¶
func (c *InstancesClient) GetScreenshot(ctx context.Context, req *computepb.GetScreenshotInstanceRequest, opts ...gax.CallOption) (*computepb.Screenshot, error)
GetScreenshot returns the screenshot from the specified instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetScreenshotInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetScreenshot(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) GetSerialPortOutput ¶
func (c *InstancesClient) GetSerialPortOutput(ctx context.Context, req *computepb.GetSerialPortOutputInstanceRequest, opts ...gax.CallOption) (*computepb.SerialPortOutput, error)
GetSerialPortOutput returns the last 1 MB of serial port output from the specified instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetSerialPortOutputInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetSerialPortOutput(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) GetShieldedInstanceIdentity ¶
func (c *InstancesClient) GetShieldedInstanceIdentity(ctx context.Context, req *computepb.GetShieldedInstanceIdentityInstanceRequest, opts ...gax.CallOption) (*computepb.ShieldedInstanceIdentity, error)
GetShieldedInstanceIdentity returns the Shielded Instance Identity of an instance
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetShieldedInstanceIdentityInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetShieldedInstanceIdentity(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Insert ¶
func (c *InstancesClient) Insert(ctx context.Context, req *computepb.InsertInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an instance resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) List ¶
func (c *InstancesClient) List(ctx context.Context, req *computepb.ListInstancesRequest, opts ...gax.CallOption) (*computepb.InstanceList, error)
List retrieves the list of instances contained within the specified zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInstancesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) ListReferrers ¶
func (c *InstancesClient) ListReferrers(ctx context.Context, req *computepb.ListReferrersInstancesRequest, opts ...gax.CallOption) (*computepb.InstanceListReferrers, error)
ListReferrers retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListReferrersInstancesRequest{ // TODO: Fill request struct fields. } resp, err := c.ListReferrers(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) RemoveResourcePolicies ¶
func (c *InstancesClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveResourcePolicies removes resource policies from an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveResourcePoliciesInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveResourcePolicies(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Reset ¶
func (c *InstancesClient) Reset(ctx context.Context, req *computepb.ResetInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Reset performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ResetInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Reset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetDeletionProtection ¶
func (c *InstancesClient) SetDeletionProtection(ctx context.Context, req *computepb.SetDeletionProtectionInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetDeletionProtection sets deletion protection on the instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetDeletionProtectionInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetDeletionProtection(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetDiskAutoDelete ¶
func (c *InstancesClient) SetDiskAutoDelete(ctx context.Context, req *computepb.SetDiskAutoDeleteInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetDiskAutoDelete sets the auto-delete flag for a disk attached to an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetDiskAutoDeleteInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetDiskAutoDelete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetIamPolicy ¶
func (c *InstancesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyInstanceRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetLabels ¶
func (c *InstancesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetMachineResources ¶
func (c *InstancesClient) SetMachineResources(ctx context.Context, req *computepb.SetMachineResourcesInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetMachineResources changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetMachineResourcesInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetMachineResources(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetMachineType ¶
func (c *InstancesClient) SetMachineType(ctx context.Context, req *computepb.SetMachineTypeInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetMachineType changes the machine type for a stopped instance to the machine type specified in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetMachineTypeInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetMachineType(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetMetadata ¶
func (c *InstancesClient) SetMetadata(ctx context.Context, req *computepb.SetMetadataInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetMetadata sets metadata for the specified instance to the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetMetadataInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetMetadata(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetMinCpuPlatform ¶
func (c *InstancesClient) SetMinCpuPlatform(ctx context.Context, req *computepb.SetMinCpuPlatformInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetMinCpuPlatform changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetMinCpuPlatformInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetMinCpuPlatform(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetScheduling ¶
func (c *InstancesClient) SetScheduling(ctx context.Context, req *computepb.SetSchedulingInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSchedulingInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetScheduling(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetServiceAccount ¶
func (c *InstancesClient) SetServiceAccount(ctx context.Context, req *computepb.SetServiceAccountInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetServiceAccount sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetServiceAccountInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetServiceAccount(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetShieldedInstanceIntegrityPolicy ¶
func (c *InstancesClient) SetShieldedInstanceIntegrityPolicy(ctx context.Context, req *computepb.SetShieldedInstanceIntegrityPolicyInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetShieldedInstanceIntegrityPolicy sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetShieldedInstanceIntegrityPolicyInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetShieldedInstanceIntegrityPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SetTags ¶
func (c *InstancesClient) SetTags(ctx context.Context, req *computepb.SetTagsInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetTags sets network tags for the specified instance to the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetTagsInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SetTags(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) SimulateMaintenanceEvent ¶
func (c *InstancesClient) SimulateMaintenanceEvent(ctx context.Context, req *computepb.SimulateMaintenanceEventInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SimulateMaintenanceEvent simulates a maintenance event on the instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SimulateMaintenanceEventInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.SimulateMaintenanceEvent(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Start ¶
func (c *InstancesClient) Start(ctx context.Context, req *computepb.StartInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Start starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.StartInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Start(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) StartWithEncryptionKey ¶
func (c *InstancesClient) StartWithEncryptionKey(ctx context.Context, req *computepb.StartWithEncryptionKeyInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
StartWithEncryptionKey starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.StartWithEncryptionKeyInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.StartWithEncryptionKey(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Stop ¶
func (c *InstancesClient) Stop(ctx context.Context, req *computepb.StopInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Stop stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.StopInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Stop(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) TestIamPermissions ¶
func (c *InstancesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsInstanceRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) Update ¶
func (c *InstancesClient) Update(ctx context.Context, req *computepb.UpdateInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) UpdateAccessConfig ¶
func (c *InstancesClient) UpdateAccessConfig(ctx context.Context, req *computepb.UpdateAccessConfigInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdateAccessConfig updates the specified access config from an instance’s network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateAccessConfigInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateAccessConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) UpdateDisplayDevice ¶
func (c *InstancesClient) UpdateDisplayDevice(ctx context.Context, req *computepb.UpdateDisplayDeviceInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdateDisplayDevice updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateDisplayDeviceInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateDisplayDevice(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) UpdateNetworkInterface ¶
func (c *InstancesClient) UpdateNetworkInterface(ctx context.Context, req *computepb.UpdateNetworkInterfaceInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdateNetworkInterface updates an instance’s network interface. This method can only update an interface’s alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateNetworkInterfaceInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateNetworkInterface(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InstancesClient) UpdateShieldedInstanceConfig ¶
func (c *InstancesClient) UpdateShieldedInstanceConfig(ctx context.Context, req *computepb.UpdateShieldedInstanceConfigInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdateShieldedInstanceConfig updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateShieldedInstanceConfigInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdateShieldedInstanceConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InterconnectAttachmentsCallOptions ¶
type InterconnectAttachmentsCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
InterconnectAttachmentsCallOptions contains the retry settings for each method of InterconnectAttachmentsClient.
type InterconnectAttachmentsClient ¶
type InterconnectAttachmentsClient struct { // The call options for this service. CallOptions *InterconnectAttachmentsCallOptions // contains filtered or unexported fields }
InterconnectAttachmentsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The InterconnectAttachments API.
func NewInterconnectAttachmentsRESTClient ¶
func NewInterconnectAttachmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterconnectAttachmentsClient, error)
NewInterconnectAttachmentsRESTClient creates a new interconnect attachments rest client.
The InterconnectAttachments API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InterconnectAttachmentsClient) AggregatedList ¶
func (c *InterconnectAttachmentsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListInterconnectAttachmentsRequest, opts ...gax.CallOption) (*computepb.InterconnectAttachmentAggregatedList, error)
AggregatedList retrieves an aggregated list of interconnect attachments.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListInterconnectAttachmentsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectAttachmentsClient) Close ¶
func (c *InterconnectAttachmentsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InterconnectAttachmentsClient) Connection ¶
func (c *InterconnectAttachmentsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InterconnectAttachmentsClient) Delete ¶
func (c *InterconnectAttachmentsClient) Delete(ctx context.Context, req *computepb.DeleteInterconnectAttachmentRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified interconnect attachment.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInterconnectAttachmentRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectAttachmentsClient) Get ¶
func (c *InterconnectAttachmentsClient) Get(ctx context.Context, req *computepb.GetInterconnectAttachmentRequest, opts ...gax.CallOption) (*computepb.InterconnectAttachment, error)
Get returns the specified interconnect attachment.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInterconnectAttachmentRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectAttachmentsClient) Insert ¶
func (c *InterconnectAttachmentsClient) Insert(ctx context.Context, req *computepb.InsertInterconnectAttachmentRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an InterconnectAttachment in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertInterconnectAttachmentRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectAttachmentsClient) List ¶
func (c *InterconnectAttachmentsClient) List(ctx context.Context, req *computepb.ListInterconnectAttachmentsRequest, opts ...gax.CallOption) (*computepb.InterconnectAttachmentList, error)
List retrieves the list of interconnect attachments contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInterconnectAttachmentsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectAttachmentsClient) Patch ¶
func (c *InterconnectAttachmentsClient) Patch(ctx context.Context, req *computepb.PatchInterconnectAttachmentRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchInterconnectAttachmentRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InterconnectLocationsCallOptions ¶
type InterconnectLocationsCallOptions struct { Get []gax.CallOption List []gax.CallOption }
InterconnectLocationsCallOptions contains the retry settings for each method of InterconnectLocationsClient.
type InterconnectLocationsClient ¶
type InterconnectLocationsClient struct { // The call options for this service. CallOptions *InterconnectLocationsCallOptions // contains filtered or unexported fields }
InterconnectLocationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The InterconnectLocations API.
func NewInterconnectLocationsRESTClient ¶
func NewInterconnectLocationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterconnectLocationsClient, error)
NewInterconnectLocationsRESTClient creates a new interconnect locations rest client.
The InterconnectLocations API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectLocationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InterconnectLocationsClient) Close ¶
func (c *InterconnectLocationsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InterconnectLocationsClient) Connection ¶
func (c *InterconnectLocationsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InterconnectLocationsClient) Get ¶
func (c *InterconnectLocationsClient) Get(ctx context.Context, req *computepb.GetInterconnectLocationRequest, opts ...gax.CallOption) (*computepb.InterconnectLocation, error)
Get returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectLocationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInterconnectLocationRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectLocationsClient) List ¶
func (c *InterconnectLocationsClient) List(ctx context.Context, req *computepb.ListInterconnectLocationsRequest, opts ...gax.CallOption) (*computepb.InterconnectLocationList, error)
List retrieves the list of interconnect locations available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectLocationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInterconnectLocationsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type InterconnectsCallOptions ¶
type InterconnectsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption GetDiagnostics []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
InterconnectsCallOptions contains the retry settings for each method of InterconnectsClient.
type InterconnectsClient ¶
type InterconnectsClient struct { // The call options for this service. CallOptions *InterconnectsCallOptions // contains filtered or unexported fields }
InterconnectsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Interconnects API.
func NewInterconnectsRESTClient ¶
func NewInterconnectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterconnectsClient, error)
NewInterconnectsRESTClient creates a new interconnects rest client.
The Interconnects API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*InterconnectsClient) Close ¶
func (c *InterconnectsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InterconnectsClient) Connection ¶
func (c *InterconnectsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*InterconnectsClient) Delete ¶
func (c *InterconnectsClient) Delete(ctx context.Context, req *computepb.DeleteInterconnectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified interconnect.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInterconnectRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectsClient) Get ¶
func (c *InterconnectsClient) Get(ctx context.Context, req *computepb.GetInterconnectRequest, opts ...gax.CallOption) (*computepb.Interconnect, error)
Get returns the specified interconnect. Get a list of available interconnects by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetInterconnectRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectsClient) GetDiagnostics ¶
func (c *InterconnectsClient) GetDiagnostics(ctx context.Context, req *computepb.GetDiagnosticsInterconnectRequest, opts ...gax.CallOption) (*computepb.InterconnectsGetDiagnosticsResponse, error)
GetDiagnostics returns the interconnectDiagnostics for the specified interconnect.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetDiagnosticsInterconnectRequest{ // TODO: Fill request struct fields. } resp, err := c.GetDiagnostics(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectsClient) Insert ¶
func (c *InterconnectsClient) Insert(ctx context.Context, req *computepb.InsertInterconnectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a Interconnect in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertInterconnectRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectsClient) List ¶
func (c *InterconnectsClient) List(ctx context.Context, req *computepb.ListInterconnectsRequest, opts ...gax.CallOption) (*computepb.InterconnectList, error)
List retrieves the list of interconnect available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInterconnectsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*InterconnectsClient) Patch ¶
func (c *InterconnectsClient) Patch(ctx context.Context, req *computepb.PatchInterconnectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchInterconnectRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type LicenseCodesCallOptions ¶
type LicenseCodesCallOptions struct { Get []gax.CallOption TestIamPermissions []gax.CallOption }
LicenseCodesCallOptions contains the retry settings for each method of LicenseCodesClient.
type LicenseCodesClient ¶
type LicenseCodesClient struct { // The call options for this service. CallOptions *LicenseCodesCallOptions // contains filtered or unexported fields }
LicenseCodesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The LicenseCodes API.
func NewLicenseCodesRESTClient ¶
func NewLicenseCodesRESTClient(ctx context.Context, opts ...option.ClientOption) (*LicenseCodesClient, error)
NewLicenseCodesRESTClient creates a new license codes rest client.
The LicenseCodes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewLicenseCodesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*LicenseCodesClient) Close ¶
func (c *LicenseCodesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*LicenseCodesClient) Connection ¶
func (c *LicenseCodesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*LicenseCodesClient) Get ¶
func (c *LicenseCodesClient) Get(ctx context.Context, req *computepb.GetLicenseCodeRequest, opts ...gax.CallOption) (*computepb.LicenseCode, error)
Get return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicenseCodesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetLicenseCodeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicenseCodesClient) TestIamPermissions ¶
func (c *LicenseCodesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsLicenseCodeRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicenseCodesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsLicenseCodeRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type LicensesCallOptions ¶
type LicensesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
LicensesCallOptions contains the retry settings for each method of LicensesClient.
type LicensesClient ¶
type LicensesClient struct { // The call options for this service. CallOptions *LicensesCallOptions // contains filtered or unexported fields }
LicensesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Licenses API.
func NewLicensesRESTClient ¶
func NewLicensesRESTClient(ctx context.Context, opts ...option.ClientOption) (*LicensesClient, error)
NewLicensesRESTClient creates a new licenses rest client.
The Licenses API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*LicensesClient) Close ¶
func (c *LicensesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*LicensesClient) Connection ¶
func (c *LicensesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*LicensesClient) Delete ¶
func (c *LicensesClient) Delete(ctx context.Context, req *computepb.DeleteLicenseRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteLicenseRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicensesClient) Get ¶
func (c *LicensesClient) Get(ctx context.Context, req *computepb.GetLicenseRequest, opts ...gax.CallOption) (*computepb.License, error)
Get returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetLicenseRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicensesClient) GetIamPolicy ¶
func (c *LicensesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyLicenseRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyLicenseRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicensesClient) Insert ¶
func (c *LicensesClient) Insert(ctx context.Context, req *computepb.InsertLicenseRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertLicenseRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicensesClient) List ¶
func (c *LicensesClient) List(ctx context.Context, req *computepb.ListLicensesRequest, opts ...gax.CallOption) (*computepb.LicensesListResponse, error)
List retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListLicensesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicensesClient) SetIamPolicy ¶
func (c *LicensesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyLicenseRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyLicenseRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*LicensesClient) TestIamPermissions ¶
func (c *LicensesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsLicenseRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsLicenseRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type MachineTypesCallOptions ¶
type MachineTypesCallOptions struct { AggregatedList []gax.CallOption Get []gax.CallOption List []gax.CallOption }
MachineTypesCallOptions contains the retry settings for each method of MachineTypesClient.
type MachineTypesClient ¶
type MachineTypesClient struct { // The call options for this service. CallOptions *MachineTypesCallOptions // contains filtered or unexported fields }
MachineTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The MachineTypes API.
func NewMachineTypesRESTClient ¶
func NewMachineTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*MachineTypesClient, error)
NewMachineTypesRESTClient creates a new machine types rest client.
The MachineTypes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*MachineTypesClient) AggregatedList ¶
func (c *MachineTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListMachineTypesRequest, opts ...gax.CallOption) (*computepb.MachineTypeAggregatedList, error)
AggregatedList retrieves an aggregated list of machine types.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListMachineTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*MachineTypesClient) Close ¶
func (c *MachineTypesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*MachineTypesClient) Connection ¶
func (c *MachineTypesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*MachineTypesClient) Get ¶
func (c *MachineTypesClient) Get(ctx context.Context, req *computepb.GetMachineTypeRequest, opts ...gax.CallOption) (*computepb.MachineType, error)
Get returns the specified machine type. Gets a list of available machine types by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetMachineTypeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*MachineTypesClient) List ¶
func (c *MachineTypesClient) List(ctx context.Context, req *computepb.ListMachineTypesRequest, opts ...gax.CallOption) (*computepb.MachineTypeList, error)
List retrieves a list of machine types available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListMachineTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type NetworkEndpointGroupsCallOptions ¶
type NetworkEndpointGroupsCallOptions struct { AggregatedList []gax.CallOption AttachNetworkEndpoints []gax.CallOption Delete []gax.CallOption DetachNetworkEndpoints []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListNetworkEndpoints []gax.CallOption TestIamPermissions []gax.CallOption }
NetworkEndpointGroupsCallOptions contains the retry settings for each method of NetworkEndpointGroupsClient.
type NetworkEndpointGroupsClient ¶
type NetworkEndpointGroupsClient struct { // The call options for this service. CallOptions *NetworkEndpointGroupsCallOptions // contains filtered or unexported fields }
NetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The NetworkEndpointGroups API.
func NewNetworkEndpointGroupsRESTClient ¶
func NewNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*NetworkEndpointGroupsClient, error)
NewNetworkEndpointGroupsRESTClient creates a new network endpoint groups rest client.
The NetworkEndpointGroups API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*NetworkEndpointGroupsClient) AggregatedList ¶
func (c *NetworkEndpointGroupsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNetworkEndpointGroupsRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroupAggregatedList, error)
AggregatedList retrieves the list of network endpoint groups and sorts them by zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListNetworkEndpointGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) AttachNetworkEndpoints ¶
func (c *NetworkEndpointGroupsClient) AttachNetworkEndpoints(ctx context.Context, req *computepb.AttachNetworkEndpointsNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AttachNetworkEndpoints attach a list of network endpoints to the specified network endpoint group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AttachNetworkEndpointsNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.AttachNetworkEndpoints(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) Close ¶
func (c *NetworkEndpointGroupsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NetworkEndpointGroupsClient) Connection ¶
func (c *NetworkEndpointGroupsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*NetworkEndpointGroupsClient) Delete ¶
func (c *NetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) DetachNetworkEndpoints ¶
func (c *NetworkEndpointGroupsClient) DetachNetworkEndpoints(ctx context.Context, req *computepb.DetachNetworkEndpointsNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DetachNetworkEndpoints detach a list of network endpoints from the specified network endpoint group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DetachNetworkEndpointsNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.DetachNetworkEndpoints(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) Get ¶
func (c *NetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroup, error)
Get returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) Insert ¶
func (c *NetworkEndpointGroupsClient) Insert(ctx context.Context, req *computepb.InsertNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a network endpoint group in the specified project using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) List ¶
func (c *NetworkEndpointGroupsClient) List(ctx context.Context, req *computepb.ListNetworkEndpointGroupsRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroupList, error)
List retrieves the list of network endpoint groups that are located in the specified project and zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNetworkEndpointGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) ListNetworkEndpoints ¶
func (c *NetworkEndpointGroupsClient) ListNetworkEndpoints(ctx context.Context, req *computepb.ListNetworkEndpointsNetworkEndpointGroupsRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroupsListNetworkEndpoints, error)
ListNetworkEndpoints lists the network endpoints in the specified network endpoint group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNetworkEndpointsNetworkEndpointGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.ListNetworkEndpoints(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworkEndpointGroupsClient) TestIamPermissions ¶
func (c *NetworkEndpointGroupsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type NetworksCallOptions ¶
type NetworksCallOptions struct { AddPeering []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetEffectiveFirewalls []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListPeeringRoutes []gax.CallOption Patch []gax.CallOption RemovePeering []gax.CallOption SwitchToCustomMode []gax.CallOption UpdatePeering []gax.CallOption }
NetworksCallOptions contains the retry settings for each method of NetworksClient.
type NetworksClient ¶
type NetworksClient struct { // The call options for this service. CallOptions *NetworksCallOptions // contains filtered or unexported fields }
NetworksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Networks API.
func NewNetworksRESTClient ¶
func NewNetworksRESTClient(ctx context.Context, opts ...option.ClientOption) (*NetworksClient, error)
NewNetworksRESTClient creates a new networks rest client.
The Networks API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*NetworksClient) AddPeering ¶
func (c *NetworksClient) AddPeering(ctx context.Context, req *computepb.AddPeeringNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddPeering adds a peering to the specified network.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddPeeringNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.AddPeering(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) Close ¶
func (c *NetworksClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NetworksClient) Connection ¶
func (c *NetworksClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*NetworksClient) Delete ¶
func (c *NetworksClient) Delete(ctx context.Context, req *computepb.DeleteNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified network.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) Get ¶
func (c *NetworksClient) Get(ctx context.Context, req *computepb.GetNetworkRequest, opts ...gax.CallOption) (*computepb.Network, error)
Get returns the specified network. Gets a list of available networks by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) GetEffectiveFirewalls ¶
func (c *NetworksClient) GetEffectiveFirewalls(ctx context.Context, req *computepb.GetEffectiveFirewallsNetworkRequest, opts ...gax.CallOption) (*computepb.NetworksGetEffectiveFirewallsResponse, error)
GetEffectiveFirewalls returns the effective firewalls on a given network.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetEffectiveFirewallsNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.GetEffectiveFirewalls(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) Insert ¶
func (c *NetworksClient) Insert(ctx context.Context, req *computepb.InsertNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a network in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) List ¶
func (c *NetworksClient) List(ctx context.Context, req *computepb.ListNetworksRequest, opts ...gax.CallOption) (*computepb.NetworkList, error)
List retrieves the list of networks available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNetworksRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) ListPeeringRoutes ¶
func (c *NetworksClient) ListPeeringRoutes(ctx context.Context, req *computepb.ListPeeringRoutesNetworksRequest, opts ...gax.CallOption) (*computepb.ExchangedPeeringRoutesList, error)
ListPeeringRoutes lists the peering routes exchanged over peering connection.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPeeringRoutesNetworksRequest{ // TODO: Fill request struct fields. } resp, err := c.ListPeeringRoutes(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) Patch ¶
func (c *NetworksClient) Patch(ctx context.Context, req *computepb.PatchNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) RemovePeering ¶
func (c *NetworksClient) RemovePeering(ctx context.Context, req *computepb.RemovePeeringNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemovePeering removes a peering from the specified network.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemovePeeringNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.RemovePeering(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) SwitchToCustomMode ¶
func (c *NetworksClient) SwitchToCustomMode(ctx context.Context, req *computepb.SwitchToCustomModeNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SwitchToCustomMode switches the network mode from auto subnet mode to custom subnet mode.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SwitchToCustomModeNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.SwitchToCustomMode(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NetworksClient) UpdatePeering ¶
func (c *NetworksClient) UpdatePeering(ctx context.Context, req *computepb.UpdatePeeringNetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdatePeering updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdatePeeringNetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdatePeering(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type NodeGroupsCallOptions ¶
type NodeGroupsCallOptions struct { AddNodes []gax.CallOption AggregatedList []gax.CallOption Delete []gax.CallOption DeleteNodes []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListNodes []gax.CallOption Patch []gax.CallOption SetIamPolicy []gax.CallOption SetNodeTemplate []gax.CallOption TestIamPermissions []gax.CallOption }
NodeGroupsCallOptions contains the retry settings for each method of NodeGroupsClient.
type NodeGroupsClient ¶
type NodeGroupsClient struct { // The call options for this service. CallOptions *NodeGroupsCallOptions // contains filtered or unexported fields }
NodeGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The NodeGroups API.
func NewNodeGroupsRESTClient ¶
func NewNodeGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*NodeGroupsClient, error)
NewNodeGroupsRESTClient creates a new node groups rest client.
The NodeGroups API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*NodeGroupsClient) AddNodes ¶
func (c *NodeGroupsClient) AddNodes(ctx context.Context, req *computepb.AddNodesNodeGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddNodes adds specified number of nodes to the node group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddNodesNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.AddNodes(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) AggregatedList ¶
func (c *NodeGroupsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNodeGroupsRequest, opts ...gax.CallOption) (*computepb.NodeGroupAggregatedList, error)
AggregatedList retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListNodeGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) Close ¶
func (c *NodeGroupsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NodeGroupsClient) Connection ¶
func (c *NodeGroupsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*NodeGroupsClient) Delete ¶
func (c *NodeGroupsClient) Delete(ctx context.Context, req *computepb.DeleteNodeGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified NodeGroup resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) DeleteNodes ¶
func (c *NodeGroupsClient) DeleteNodes(ctx context.Context, req *computepb.DeleteNodesNodeGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeleteNodes deletes specified nodes from the node group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteNodesNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteNodes(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) Get ¶
func (c *NodeGroupsClient) Get(ctx context.Context, req *computepb.GetNodeGroupRequest, opts ...gax.CallOption) (*computepb.NodeGroup, error)
Get returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the “nodes” field should not be used. Use nodeGroups.listNodes instead.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) GetIamPolicy ¶
func (c *NodeGroupsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyNodeGroupRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) Insert ¶
func (c *NodeGroupsClient) Insert(ctx context.Context, req *computepb.InsertNodeGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a NodeGroup resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) List ¶
func (c *NodeGroupsClient) List(ctx context.Context, req *computepb.ListNodeGroupsRequest, opts ...gax.CallOption) (*computepb.NodeGroupList, error)
List retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNodeGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) ListNodes ¶
func (c *NodeGroupsClient) ListNodes(ctx context.Context, req *computepb.ListNodesNodeGroupsRequest, opts ...gax.CallOption) (*computepb.NodeGroupsListNodes, error)
ListNodes lists nodes in the node group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNodesNodeGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.ListNodes(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) Patch ¶
func (c *NodeGroupsClient) Patch(ctx context.Context, req *computepb.PatchNodeGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified node group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) SetIamPolicy ¶
func (c *NodeGroupsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNodeGroupRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) SetNodeTemplate ¶
func (c *NodeGroupsClient) SetNodeTemplate(ctx context.Context, req *computepb.SetNodeTemplateNodeGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetNodeTemplate updates the node template of the node group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetNodeTemplateNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.SetNodeTemplate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeGroupsClient) TestIamPermissions ¶
func (c *NodeGroupsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsNodeGroupRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsNodeGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type NodeTemplatesCallOptions ¶
type NodeTemplatesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
NodeTemplatesCallOptions contains the retry settings for each method of NodeTemplatesClient.
type NodeTemplatesClient ¶
type NodeTemplatesClient struct { // The call options for this service. CallOptions *NodeTemplatesCallOptions // contains filtered or unexported fields }
NodeTemplatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The NodeTemplates API.
func NewNodeTemplatesRESTClient ¶
func NewNodeTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*NodeTemplatesClient, error)
NewNodeTemplatesRESTClient creates a new node templates rest client.
The NodeTemplates API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*NodeTemplatesClient) AggregatedList ¶
func (c *NodeTemplatesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNodeTemplatesRequest, opts ...gax.CallOption) (*computepb.NodeTemplateAggregatedList, error)
AggregatedList retrieves an aggregated list of node templates.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListNodeTemplatesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) Close ¶
func (c *NodeTemplatesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NodeTemplatesClient) Connection ¶
func (c *NodeTemplatesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*NodeTemplatesClient) Delete ¶
func (c *NodeTemplatesClient) Delete(ctx context.Context, req *computepb.DeleteNodeTemplateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified NodeTemplate resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteNodeTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) Get ¶
func (c *NodeTemplatesClient) Get(ctx context.Context, req *computepb.GetNodeTemplateRequest, opts ...gax.CallOption) (*computepb.NodeTemplate, error)
Get returns the specified node template. Gets a list of available node templates by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetNodeTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) GetIamPolicy ¶
func (c *NodeTemplatesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyNodeTemplateRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyNodeTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) Insert ¶
func (c *NodeTemplatesClient) Insert(ctx context.Context, req *computepb.InsertNodeTemplateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a NodeTemplate resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertNodeTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) List ¶
func (c *NodeTemplatesClient) List(ctx context.Context, req *computepb.ListNodeTemplatesRequest, opts ...gax.CallOption) (*computepb.NodeTemplateList, error)
List retrieves a list of node templates available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNodeTemplatesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) SetIamPolicy ¶
func (c *NodeTemplatesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNodeTemplateRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyNodeTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTemplatesClient) TestIamPermissions ¶
func (c *NodeTemplatesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsNodeTemplateRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsNodeTemplateRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type NodeTypesCallOptions ¶
type NodeTypesCallOptions struct { AggregatedList []gax.CallOption Get []gax.CallOption List []gax.CallOption }
NodeTypesCallOptions contains the retry settings for each method of NodeTypesClient.
type NodeTypesClient ¶
type NodeTypesClient struct { // The call options for this service. CallOptions *NodeTypesCallOptions // contains filtered or unexported fields }
NodeTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The NodeTypes API.
func NewNodeTypesRESTClient ¶
func NewNodeTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*NodeTypesClient, error)
NewNodeTypesRESTClient creates a new node types rest client.
The NodeTypes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*NodeTypesClient) AggregatedList ¶
func (c *NodeTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListNodeTypesRequest, opts ...gax.CallOption) (*computepb.NodeTypeAggregatedList, error)
AggregatedList retrieves an aggregated list of node types.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListNodeTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTypesClient) Close ¶
func (c *NodeTypesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NodeTypesClient) Connection ¶
func (c *NodeTypesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*NodeTypesClient) Get ¶
func (c *NodeTypesClient) Get(ctx context.Context, req *computepb.GetNodeTypeRequest, opts ...gax.CallOption) (*computepb.NodeType, error)
Get returns the specified node type. Gets a list of available node types by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetNodeTypeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*NodeTypesClient) List ¶
func (c *NodeTypesClient) List(ctx context.Context, req *computepb.ListNodeTypesRequest, opts ...gax.CallOption) (*computepb.NodeTypeList, error)
List retrieves a list of node types available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListNodeTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type PacketMirroringsCallOptions ¶
type PacketMirroringsCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption TestIamPermissions []gax.CallOption }
PacketMirroringsCallOptions contains the retry settings for each method of PacketMirroringsClient.
type PacketMirroringsClient ¶
type PacketMirroringsClient struct { // The call options for this service. CallOptions *PacketMirroringsCallOptions // contains filtered or unexported fields }
PacketMirroringsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The PacketMirrorings API.
func NewPacketMirroringsRESTClient ¶
func NewPacketMirroringsRESTClient(ctx context.Context, opts ...option.ClientOption) (*PacketMirroringsClient, error)
NewPacketMirroringsRESTClient creates a new packet mirrorings rest client.
The PacketMirrorings API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*PacketMirroringsClient) AggregatedList ¶
func (c *PacketMirroringsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListPacketMirroringsRequest, opts ...gax.CallOption) (*computepb.PacketMirroringAggregatedList, error)
AggregatedList retrieves an aggregated list of packetMirrorings.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListPacketMirroringsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PacketMirroringsClient) Close ¶
func (c *PacketMirroringsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PacketMirroringsClient) Connection ¶
func (c *PacketMirroringsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*PacketMirroringsClient) Delete ¶
func (c *PacketMirroringsClient) Delete(ctx context.Context, req *computepb.DeletePacketMirroringRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified PacketMirroring resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeletePacketMirroringRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PacketMirroringsClient) Get ¶
func (c *PacketMirroringsClient) Get(ctx context.Context, req *computepb.GetPacketMirroringRequest, opts ...gax.CallOption) (*computepb.PacketMirroring, error)
Get returns the specified PacketMirroring resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetPacketMirroringRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PacketMirroringsClient) Insert ¶
func (c *PacketMirroringsClient) Insert(ctx context.Context, req *computepb.InsertPacketMirroringRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a PacketMirroring resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertPacketMirroringRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PacketMirroringsClient) List ¶
func (c *PacketMirroringsClient) List(ctx context.Context, req *computepb.ListPacketMirroringsRequest, opts ...gax.CallOption) (*computepb.PacketMirroringList, error)
List retrieves a list of PacketMirroring resources available to the specified project and region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPacketMirroringsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PacketMirroringsClient) Patch ¶
func (c *PacketMirroringsClient) Patch(ctx context.Context, req *computepb.PatchPacketMirroringRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchPacketMirroringRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PacketMirroringsClient) TestIamPermissions ¶
func (c *PacketMirroringsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsPacketMirroringRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsPacketMirroringRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ProjectsCallOptions ¶
type ProjectsCallOptions struct { DisableXpnHost []gax.CallOption DisableXpnResource []gax.CallOption EnableXpnHost []gax.CallOption EnableXpnResource []gax.CallOption Get []gax.CallOption GetXpnHost []gax.CallOption GetXpnResources []gax.CallOption ListXpnHosts []gax.CallOption MoveDisk []gax.CallOption MoveInstance []gax.CallOption SetCommonInstanceMetadata []gax.CallOption SetDefaultNetworkTier []gax.CallOption SetUsageExportBucket []gax.CallOption }
ProjectsCallOptions contains the retry settings for each method of ProjectsClient.
type ProjectsClient ¶
type ProjectsClient struct { // The call options for this service. CallOptions *ProjectsCallOptions // contains filtered or unexported fields }
ProjectsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Projects API.
func NewProjectsRESTClient ¶
func NewProjectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ProjectsClient, error)
NewProjectsRESTClient creates a new projects rest client.
The Projects API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ProjectsClient) Close ¶
func (c *ProjectsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ProjectsClient) Connection ¶
func (c *ProjectsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ProjectsClient) DisableXpnHost ¶
func (c *ProjectsClient) DisableXpnHost(ctx context.Context, req *computepb.DisableXpnHostProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DisableXpnHost disable this project as a shared VPC host project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DisableXpnHostProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.DisableXpnHost(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) DisableXpnResource ¶
func (c *ProjectsClient) DisableXpnResource(ctx context.Context, req *computepb.DisableXpnResourceProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DisableXpnResource disable a service resource (also known as service project) associated with this host project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DisableXpnResourceProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.DisableXpnResource(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) EnableXpnHost ¶
func (c *ProjectsClient) EnableXpnHost(ctx context.Context, req *computepb.EnableXpnHostProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
EnableXpnHost enable this project as a shared VPC host project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.EnableXpnHostProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.EnableXpnHost(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) EnableXpnResource ¶
func (c *ProjectsClient) EnableXpnResource(ctx context.Context, req *computepb.EnableXpnResourceProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
EnableXpnResource enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.EnableXpnResourceProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.EnableXpnResource(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) Get ¶
func (c *ProjectsClient) Get(ctx context.Context, req *computepb.GetProjectRequest, opts ...gax.CallOption) (*computepb.Project, error)
Get returns the specified Project resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) GetXpnHost ¶
func (c *ProjectsClient) GetXpnHost(ctx context.Context, req *computepb.GetXpnHostProjectRequest, opts ...gax.CallOption) (*computepb.Project, error)
GetXpnHost gets the shared VPC host project that this project links to. May be empty if no link exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetXpnHostProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.GetXpnHost(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) GetXpnResources ¶
func (c *ProjectsClient) GetXpnResources(ctx context.Context, req *computepb.GetXpnResourcesProjectsRequest, opts ...gax.CallOption) (*computepb.ProjectsGetXpnResources, error)
GetXpnResources gets service resources (a.k.a service project) associated with this host project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetXpnResourcesProjectsRequest{ // TODO: Fill request struct fields. } resp, err := c.GetXpnResources(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) ListXpnHosts ¶
func (c *ProjectsClient) ListXpnHosts(ctx context.Context, req *computepb.ListXpnHostsProjectsRequest, opts ...gax.CallOption) (*computepb.XpnHostList, error)
ListXpnHosts lists all shared VPC host projects visible to the user in an organization.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListXpnHostsProjectsRequest{ // TODO: Fill request struct fields. } resp, err := c.ListXpnHosts(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) MoveDisk ¶
func (c *ProjectsClient) MoveDisk(ctx context.Context, req *computepb.MoveDiskProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
MoveDisk moves a persistent disk from one zone to another.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.MoveDiskProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.MoveDisk(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) MoveInstance ¶
func (c *ProjectsClient) MoveInstance(ctx context.Context, req *computepb.MoveInstanceProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
MoveInstance moves an instance and its attached persistent disks from one zone to another.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.MoveInstanceProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.MoveInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) SetCommonInstanceMetadata ¶
func (c *ProjectsClient) SetCommonInstanceMetadata(ctx context.Context, req *computepb.SetCommonInstanceMetadataProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetCommonInstanceMetadata sets metadata common to all instances within the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetCommonInstanceMetadataProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.SetCommonInstanceMetadata(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) SetDefaultNetworkTier ¶
func (c *ProjectsClient) SetDefaultNetworkTier(ctx context.Context, req *computepb.SetDefaultNetworkTierProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetDefaultNetworkTier sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetDefaultNetworkTierProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.SetDefaultNetworkTier(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ProjectsClient) SetUsageExportBucket ¶
func (c *ProjectsClient) SetUsageExportBucket(ctx context.Context, req *computepb.SetUsageExportBucketProjectRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetUsageExportBucket enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetUsageExportBucketProjectRequest{ // TODO: Fill request struct fields. } resp, err := c.SetUsageExportBucket(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type PublicAdvertisedPrefixesCallOptions ¶
type PublicAdvertisedPrefixesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
PublicAdvertisedPrefixesCallOptions contains the retry settings for each method of PublicAdvertisedPrefixesClient.
type PublicAdvertisedPrefixesClient ¶
type PublicAdvertisedPrefixesClient struct { // The call options for this service. CallOptions *PublicAdvertisedPrefixesCallOptions // contains filtered or unexported fields }
PublicAdvertisedPrefixesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The PublicAdvertisedPrefixes API.
func NewPublicAdvertisedPrefixesRESTClient ¶
func NewPublicAdvertisedPrefixesRESTClient(ctx context.Context, opts ...option.ClientOption) (*PublicAdvertisedPrefixesClient, error)
NewPublicAdvertisedPrefixesRESTClient creates a new public advertised prefixes rest client.
The PublicAdvertisedPrefixes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*PublicAdvertisedPrefixesClient) Close ¶
func (c *PublicAdvertisedPrefixesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PublicAdvertisedPrefixesClient) Connection ¶
func (c *PublicAdvertisedPrefixesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*PublicAdvertisedPrefixesClient) Delete ¶
func (c *PublicAdvertisedPrefixesClient) Delete(ctx context.Context, req *computepb.DeletePublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified PublicAdvertisedPrefix
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeletePublicAdvertisedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicAdvertisedPrefixesClient) Get ¶
func (c *PublicAdvertisedPrefixesClient) Get(ctx context.Context, req *computepb.GetPublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*computepb.PublicAdvertisedPrefix, error)
Get returns the specified PublicAdvertisedPrefix resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetPublicAdvertisedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicAdvertisedPrefixesClient) Insert ¶
func (c *PublicAdvertisedPrefixesClient) Insert(ctx context.Context, req *computepb.InsertPublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertPublicAdvertisedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicAdvertisedPrefixesClient) List ¶
func (c *PublicAdvertisedPrefixesClient) List(ctx context.Context, req *computepb.ListPublicAdvertisedPrefixesRequest, opts ...gax.CallOption) (*computepb.PublicAdvertisedPrefixList, error)
List lists the PublicAdvertisedPrefixes for a project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPublicAdvertisedPrefixesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicAdvertisedPrefixesClient) Patch ¶
func (c *PublicAdvertisedPrefixesClient) Patch(ctx context.Context, req *computepb.PatchPublicAdvertisedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchPublicAdvertisedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type PublicDelegatedPrefixesCallOptions ¶
type PublicDelegatedPrefixesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
PublicDelegatedPrefixesCallOptions contains the retry settings for each method of PublicDelegatedPrefixesClient.
type PublicDelegatedPrefixesClient ¶
type PublicDelegatedPrefixesClient struct { // The call options for this service. CallOptions *PublicDelegatedPrefixesCallOptions // contains filtered or unexported fields }
PublicDelegatedPrefixesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The PublicDelegatedPrefixes API.
func NewPublicDelegatedPrefixesRESTClient ¶
func NewPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...option.ClientOption) (*PublicDelegatedPrefixesClient, error)
NewPublicDelegatedPrefixesRESTClient creates a new public delegated prefixes rest client.
The PublicDelegatedPrefixes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*PublicDelegatedPrefixesClient) AggregatedList ¶
func (c *PublicDelegatedPrefixesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListPublicDelegatedPrefixesRequest, opts ...gax.CallOption) (*computepb.PublicDelegatedPrefixAggregatedList, error)
AggregatedList lists all PublicDelegatedPrefix resources owned by the specific project across all scopes.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListPublicDelegatedPrefixesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicDelegatedPrefixesClient) Close ¶
func (c *PublicDelegatedPrefixesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PublicDelegatedPrefixesClient) Connection ¶
func (c *PublicDelegatedPrefixesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*PublicDelegatedPrefixesClient) Delete ¶
func (c *PublicDelegatedPrefixesClient) Delete(ctx context.Context, req *computepb.DeletePublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified PublicDelegatedPrefix in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeletePublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicDelegatedPrefixesClient) Get ¶
func (c *PublicDelegatedPrefixesClient) Get(ctx context.Context, req *computepb.GetPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.PublicDelegatedPrefix, error)
Get returns the specified PublicDelegatedPrefix resource in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicDelegatedPrefixesClient) Insert ¶
func (c *PublicDelegatedPrefixesClient) Insert(ctx context.Context, req *computepb.InsertPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicDelegatedPrefixesClient) List ¶
func (c *PublicDelegatedPrefixesClient) List(ctx context.Context, req *computepb.ListPublicDelegatedPrefixesRequest, opts ...gax.CallOption) (*computepb.PublicDelegatedPrefixList, error)
List lists the PublicDelegatedPrefixes for a project in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPublicDelegatedPrefixesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PublicDelegatedPrefixesClient) Patch ¶
func (c *PublicDelegatedPrefixesClient) Patch(ctx context.Context, req *computepb.PatchPublicDelegatedPrefixeRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchPublicDelegatedPrefixeRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionAutoscalersCallOptions ¶
type RegionAutoscalersCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
RegionAutoscalersCallOptions contains the retry settings for each method of RegionAutoscalersClient.
type RegionAutoscalersClient ¶
type RegionAutoscalersClient struct { // The call options for this service. CallOptions *RegionAutoscalersCallOptions // contains filtered or unexported fields }
RegionAutoscalersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionAutoscalers API.
func NewRegionAutoscalersRESTClient ¶
func NewRegionAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionAutoscalersClient, error)
NewRegionAutoscalersRESTClient creates a new region autoscalers rest client.
The RegionAutoscalers API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionAutoscalersClient) Close ¶
func (c *RegionAutoscalersClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionAutoscalersClient) Connection ¶
func (c *RegionAutoscalersClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionAutoscalersClient) Delete ¶
func (c *RegionAutoscalersClient) Delete(ctx context.Context, req *computepb.DeleteRegionAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified autoscaler.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionAutoscalersClient) Get ¶
func (c *RegionAutoscalersClient) Get(ctx context.Context, req *computepb.GetRegionAutoscalerRequest, opts ...gax.CallOption) (*computepb.Autoscaler, error)
Get returns the specified autoscaler.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionAutoscalersClient) Insert ¶
func (c *RegionAutoscalersClient) Insert(ctx context.Context, req *computepb.InsertRegionAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates an autoscaler in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionAutoscalersClient) List ¶
func (c *RegionAutoscalersClient) List(ctx context.Context, req *computepb.ListRegionAutoscalersRequest, opts ...gax.CallOption) (*computepb.RegionAutoscalerList, error)
List retrieves a list of autoscalers contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionAutoscalersRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionAutoscalersClient) Patch ¶
func (c *RegionAutoscalersClient) Patch(ctx context.Context, req *computepb.PatchRegionAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRegionAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionAutoscalersClient) Update ¶
func (c *RegionAutoscalersClient) Update(ctx context.Context, req *computepb.UpdateRegionAutoscalerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates an autoscaler in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateRegionAutoscalerRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionBackendServicesCallOptions ¶
type RegionBackendServicesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption GetHealth []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
RegionBackendServicesCallOptions contains the retry settings for each method of RegionBackendServicesClient.
type RegionBackendServicesClient ¶
type RegionBackendServicesClient struct { // The call options for this service. CallOptions *RegionBackendServicesCallOptions // contains filtered or unexported fields }
RegionBackendServicesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionBackendServices API.
func NewRegionBackendServicesRESTClient ¶
func NewRegionBackendServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionBackendServicesClient, error)
NewRegionBackendServicesRESTClient creates a new region backend services rest client.
The RegionBackendServices API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionBackendServicesClient) Close ¶
func (c *RegionBackendServicesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionBackendServicesClient) Connection ¶
func (c *RegionBackendServicesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionBackendServicesClient) Delete ¶
func (c *RegionBackendServicesClient) Delete(ctx context.Context, req *computepb.DeleteRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified regional BackendService resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionBackendServicesClient) Get ¶
func (c *RegionBackendServicesClient) Get(ctx context.Context, req *computepb.GetRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.BackendService, error)
Get returns the specified regional BackendService resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionBackendServicesClient) GetHealth ¶
func (c *RegionBackendServicesClient) GetHealth(ctx context.Context, req *computepb.GetHealthRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.BackendServiceGroupHealth, error)
GetHealth gets the most recent health check results for this regional BackendService.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetHealthRegionBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetHealth(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionBackendServicesClient) Insert ¶
func (c *RegionBackendServicesClient) Insert(ctx context.Context, req *computepb.InsertRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionBackendServicesClient) List ¶
func (c *RegionBackendServicesClient) List(ctx context.Context, req *computepb.ListRegionBackendServicesRequest, opts ...gax.CallOption) (*computepb.BackendServiceList, error)
List retrieves the list of regional BackendService resources available to the specified project in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionBackendServicesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionBackendServicesClient) Patch ¶
func (c *RegionBackendServicesClient) Patch(ctx context.Context, req *computepb.PatchRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRegionBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionBackendServicesClient) Update ¶
func (c *RegionBackendServicesClient) Update(ctx context.Context, req *computepb.UpdateRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateRegionBackendServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionCommitmentsCallOptions ¶
type RegionCommitmentsCallOptions struct { AggregatedList []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
RegionCommitmentsCallOptions contains the retry settings for each method of RegionCommitmentsClient.
type RegionCommitmentsClient ¶
type RegionCommitmentsClient struct { // The call options for this service. CallOptions *RegionCommitmentsCallOptions // contains filtered or unexported fields }
RegionCommitmentsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionCommitments API.
func NewRegionCommitmentsRESTClient ¶
func NewRegionCommitmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionCommitmentsClient, error)
NewRegionCommitmentsRESTClient creates a new region commitments rest client.
The RegionCommitments API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionCommitmentsClient) AggregatedList ¶
func (c *RegionCommitmentsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListRegionCommitmentsRequest, opts ...gax.CallOption) (*computepb.CommitmentAggregatedList, error)
AggregatedList retrieves an aggregated list of commitments.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListRegionCommitmentsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionCommitmentsClient) Close ¶
func (c *RegionCommitmentsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionCommitmentsClient) Connection ¶
func (c *RegionCommitmentsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionCommitmentsClient) Get ¶
func (c *RegionCommitmentsClient) Get(ctx context.Context, req *computepb.GetRegionCommitmentRequest, opts ...gax.CallOption) (*computepb.Commitment, error)
Get returns the specified commitment resource. Gets a list of available commitments by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionCommitmentRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionCommitmentsClient) Insert ¶
func (c *RegionCommitmentsClient) Insert(ctx context.Context, req *computepb.InsertRegionCommitmentRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a commitment in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionCommitmentRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionCommitmentsClient) List ¶
func (c *RegionCommitmentsClient) List(ctx context.Context, req *computepb.ListRegionCommitmentsRequest, opts ...gax.CallOption) (*computepb.CommitmentList, error)
List retrieves a list of commitments contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionCommitmentsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionDiskTypesCallOptions ¶
type RegionDiskTypesCallOptions struct { Get []gax.CallOption List []gax.CallOption }
RegionDiskTypesCallOptions contains the retry settings for each method of RegionDiskTypesClient.
type RegionDiskTypesClient ¶
type RegionDiskTypesClient struct { // The call options for this service. CallOptions *RegionDiskTypesCallOptions // contains filtered or unexported fields }
RegionDiskTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionDiskTypes API.
func NewRegionDiskTypesRESTClient ¶
func NewRegionDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionDiskTypesClient, error)
NewRegionDiskTypesRESTClient creates a new region disk types rest client.
The RegionDiskTypes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionDiskTypesClient) Close ¶
func (c *RegionDiskTypesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionDiskTypesClient) Connection ¶
func (c *RegionDiskTypesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionDiskTypesClient) Get ¶
func (c *RegionDiskTypesClient) Get(ctx context.Context, req *computepb.GetRegionDiskTypeRequest, opts ...gax.CallOption) (*computepb.DiskType, error)
Get returns the specified regional disk type. Gets a list of available disk types by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionDiskTypeRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDiskTypesClient) List ¶
func (c *RegionDiskTypesClient) List(ctx context.Context, req *computepb.ListRegionDiskTypesRequest, opts ...gax.CallOption) (*computepb.RegionDiskTypeList, error)
List retrieves a list of regional disk types available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionDiskTypesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionDisksCallOptions ¶
type RegionDisksCallOptions struct { AddResourcePolicies []gax.CallOption CreateSnapshot []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption RemoveResourcePolicies []gax.CallOption Resize []gax.CallOption SetIamPolicy []gax.CallOption SetLabels []gax.CallOption TestIamPermissions []gax.CallOption }
RegionDisksCallOptions contains the retry settings for each method of RegionDisksClient.
type RegionDisksClient ¶
type RegionDisksClient struct { // The call options for this service. CallOptions *RegionDisksCallOptions // contains filtered or unexported fields }
RegionDisksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionDisks API.
func NewRegionDisksRESTClient ¶
func NewRegionDisksRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionDisksClient, error)
NewRegionDisksRESTClient creates a new region disks rest client.
The RegionDisks API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionDisksClient) AddResourcePolicies ¶
func (c *RegionDisksClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddResourcePolicies adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddResourcePoliciesRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.AddResourcePolicies(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) Close ¶
func (c *RegionDisksClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionDisksClient) Connection ¶
func (c *RegionDisksClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionDisksClient) CreateSnapshot ¶
func (c *RegionDisksClient) CreateSnapshot(ctx context.Context, req *computepb.CreateSnapshotRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
CreateSnapshot creates a snapshot of this regional disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.CreateSnapshotRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateSnapshot(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) Delete ¶
func (c *RegionDisksClient) Delete(ctx context.Context, req *computepb.DeleteRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) Get ¶
func (c *RegionDisksClient) Get(ctx context.Context, req *computepb.GetRegionDiskRequest, opts ...gax.CallOption) (*computepb.Disk, error)
Get returns a specified regional persistent disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) GetIamPolicy ¶
func (c *RegionDisksClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyRegionDiskRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) Insert ¶
func (c *RegionDisksClient) Insert(ctx context.Context, req *computepb.InsertRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a persistent regional disk in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) List ¶
func (c *RegionDisksClient) List(ctx context.Context, req *computepb.ListRegionDisksRequest, opts ...gax.CallOption) (*computepb.DiskList, error)
List retrieves the list of persistent disks contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionDisksRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) RemoveResourcePolicies ¶
func (c *RegionDisksClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveResourcePolicies removes resource policies from a regional disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveResourcePoliciesRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveResourcePolicies(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) Resize ¶
func (c *RegionDisksClient) Resize(ctx context.Context, req *computepb.ResizeRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Resize resizes the specified regional persistent disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ResizeRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.Resize(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) SetIamPolicy ¶
func (c *RegionDisksClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyRegionDiskRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) SetLabels ¶
func (c *RegionDisksClient) SetLabels(ctx context.Context, req *computepb.SetLabelsRegionDiskRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on the target regional disk.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionDisksClient) TestIamPermissions ¶
func (c *RegionDisksClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsRegionDiskRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsRegionDiskRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionHealthCheckServicesCallOptions ¶
type RegionHealthCheckServicesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
RegionHealthCheckServicesCallOptions contains the retry settings for each method of RegionHealthCheckServicesClient.
type RegionHealthCheckServicesClient ¶
type RegionHealthCheckServicesClient struct { // The call options for this service. CallOptions *RegionHealthCheckServicesCallOptions // contains filtered or unexported fields }
RegionHealthCheckServicesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionHealthCheckServices API.
func NewRegionHealthCheckServicesRESTClient ¶
func NewRegionHealthCheckServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionHealthCheckServicesClient, error)
NewRegionHealthCheckServicesRESTClient creates a new region health check services rest client.
The RegionHealthCheckServices API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionHealthCheckServicesClient) Close ¶
func (c *RegionHealthCheckServicesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionHealthCheckServicesClient) Connection ¶
func (c *RegionHealthCheckServicesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionHealthCheckServicesClient) Delete ¶
func (c *RegionHealthCheckServicesClient) Delete(ctx context.Context, req *computepb.DeleteRegionHealthCheckServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified regional HealthCheckService.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionHealthCheckServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthCheckServicesClient) Get ¶
func (c *RegionHealthCheckServicesClient) Get(ctx context.Context, req *computepb.GetRegionHealthCheckServiceRequest, opts ...gax.CallOption) (*computepb.HealthCheckService, error)
Get returns the specified regional HealthCheckService resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionHealthCheckServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthCheckServicesClient) Insert ¶
func (c *RegionHealthCheckServicesClient) Insert(ctx context.Context, req *computepb.InsertRegionHealthCheckServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a regional HealthCheckService resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionHealthCheckServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthCheckServicesClient) List ¶
func (c *RegionHealthCheckServicesClient) List(ctx context.Context, req *computepb.ListRegionHealthCheckServicesRequest, opts ...gax.CallOption) (*computepb.HealthCheckServicesList, error)
List lists all the HealthCheckService resources that have been configured for the specified project in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionHealthCheckServicesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthCheckServicesClient) Patch ¶
func (c *RegionHealthCheckServicesClient) Patch(ctx context.Context, req *computepb.PatchRegionHealthCheckServiceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates the specified regional HealthCheckService resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRegionHealthCheckServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionHealthChecksCallOptions ¶
type RegionHealthChecksCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption }
RegionHealthChecksCallOptions contains the retry settings for each method of RegionHealthChecksClient.
type RegionHealthChecksClient ¶
type RegionHealthChecksClient struct { // The call options for this service. CallOptions *RegionHealthChecksCallOptions // contains filtered or unexported fields }
RegionHealthChecksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionHealthChecks API.
func NewRegionHealthChecksRESTClient ¶
func NewRegionHealthChecksRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionHealthChecksClient, error)
NewRegionHealthChecksRESTClient creates a new region health checks rest client.
The RegionHealthChecks API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionHealthChecksClient) Close ¶
func (c *RegionHealthChecksClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionHealthChecksClient) Connection ¶
func (c *RegionHealthChecksClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionHealthChecksClient) Delete ¶
func (c *RegionHealthChecksClient) Delete(ctx context.Context, req *computepb.DeleteRegionHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified HealthCheck resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthChecksClient) Get ¶
func (c *RegionHealthChecksClient) Get(ctx context.Context, req *computepb.GetRegionHealthCheckRequest, opts ...gax.CallOption) (*computepb.HealthCheck, error)
Get returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthChecksClient) Insert ¶
func (c *RegionHealthChecksClient) Insert(ctx context.Context, req *computepb.InsertRegionHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a HealthCheck resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthChecksClient) List ¶
func (c *RegionHealthChecksClient) List(ctx context.Context, req *computepb.ListRegionHealthChecksRequest, opts ...gax.CallOption) (*computepb.HealthCheckList, error)
List retrieves the list of HealthCheck resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionHealthChecksRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthChecksClient) Patch ¶
func (c *RegionHealthChecksClient) Patch(ctx context.Context, req *computepb.PatchRegionHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRegionHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionHealthChecksClient) Update ¶
func (c *RegionHealthChecksClient) Update(ctx context.Context, req *computepb.UpdateRegionHealthCheckRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates a HealthCheck resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateRegionHealthCheckRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionInstanceGroupManagersCallOptions ¶
type RegionInstanceGroupManagersCallOptions struct { AbandonInstances []gax.CallOption ApplyUpdatesToInstances []gax.CallOption CreateInstances []gax.CallOption Delete []gax.CallOption DeleteInstances []gax.CallOption DeletePerInstanceConfigs []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListErrors []gax.CallOption ListManagedInstances []gax.CallOption ListPerInstanceConfigs []gax.CallOption Patch []gax.CallOption PatchPerInstanceConfigs []gax.CallOption RecreateInstances []gax.CallOption Resize []gax.CallOption SetInstanceTemplate []gax.CallOption SetTargetPools []gax.CallOption UpdatePerInstanceConfigs []gax.CallOption }
RegionInstanceGroupManagersCallOptions contains the retry settings for each method of RegionInstanceGroupManagersClient.
type RegionInstanceGroupManagersClient ¶
type RegionInstanceGroupManagersClient struct { // The call options for this service. CallOptions *RegionInstanceGroupManagersCallOptions // contains filtered or unexported fields }
RegionInstanceGroupManagersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionInstanceGroupManagers API.
func NewRegionInstanceGroupManagersRESTClient ¶
func NewRegionInstanceGroupManagersRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionInstanceGroupManagersClient, error)
NewRegionInstanceGroupManagersRESTClient creates a new region instance group managers rest client.
The RegionInstanceGroupManagers API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionInstanceGroupManagersClient) AbandonInstances ¶
func (c *RegionInstanceGroupManagersClient) AbandonInstances(ctx context.Context, req *computepb.AbandonInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AbandonInstances flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
You can specify a maximum of 1000 instances with this method per request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AbandonInstancesRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.AbandonInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) ApplyUpdatesToInstances ¶
func (c *RegionInstanceGroupManagersClient) ApplyUpdatesToInstances(ctx context.Context, req *computepb.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
ApplyUpdatesToInstances apply updates to selected instances the managed instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.ApplyUpdatesToInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) Close ¶
func (c *RegionInstanceGroupManagersClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionInstanceGroupManagersClient) Connection ¶
func (c *RegionInstanceGroupManagersClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionInstanceGroupManagersClient) CreateInstances ¶
func (c *RegionInstanceGroupManagersClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
CreateInstances creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.CreateInstancesRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.CreateInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) Delete ¶
func (c *RegionInstanceGroupManagersClient) Delete(ctx context.Context, req *computepb.DeleteRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified managed instance group and all of the instances in that group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) DeleteInstances ¶
func (c *RegionInstanceGroupManagersClient) DeleteInstances(ctx context.Context, req *computepb.DeleteInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeleteInstances flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
You can specify a maximum of 1000 instances with this method per request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteInstancesRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.DeleteInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) DeletePerInstanceConfigs ¶
func (c *RegionInstanceGroupManagersClient) DeletePerInstanceConfigs(ctx context.Context, req *computepb.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.DeletePerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) Get ¶
func (c *RegionInstanceGroupManagersClient) Get(ctx context.Context, req *computepb.GetRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManager, error)
Get returns all of the details about the specified managed instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) Insert ¶
func (c *RegionInstanceGroupManagersClient) Insert(ctx context.Context, req *computepb.InsertRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
A regional managed instance group can contain up to 2000 instances.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) List ¶
func (c *RegionInstanceGroupManagersClient) List(ctx context.Context, req *computepb.ListRegionInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.RegionInstanceGroupManagerList, error)
List retrieves the list of managed instance groups that are contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) ListErrors ¶
func (c *RegionInstanceGroupManagersClient) ListErrors(ctx context.Context, req *computepb.ListErrorsRegionInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.RegionInstanceGroupManagersListErrorsResponse, error)
ListErrors lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListErrorsRegionInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.ListErrors(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) ListManagedInstances ¶
func (c *RegionInstanceGroupManagersClient) ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesRegionInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.RegionInstanceGroupManagersListInstancesResponse, error)
ListManagedInstances lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListManagedInstancesRegionInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.ListManagedInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) ListPerInstanceConfigs ¶
func (c *RegionInstanceGroupManagersClient) ListPerInstanceConfigs(ctx context.Context, req *computepb.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, opts ...gax.CallOption) (*computepb.RegionInstanceGroupManagersListInstanceConfigsResp, error)
ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPerInstanceConfigsRegionInstanceGroupManagersRequest{ // TODO: Fill request struct fields. } resp, err := c.ListPerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) Patch ¶
func (c *RegionInstanceGroupManagersClient) Patch(ctx context.Context, req *computepb.PatchRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) PatchPerInstanceConfigs ¶
func (c *RegionInstanceGroupManagersClient) PatchPerInstanceConfigs(ctx context.Context, req *computepb.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.PatchPerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) RecreateInstances ¶
func (c *RegionInstanceGroupManagersClient) RecreateInstances(ctx context.Context, req *computepb.RecreateInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RecreateInstances flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group’s current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
You can specify a maximum of 1000 instances with this method per request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RecreateInstancesRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.RecreateInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) Resize ¶
func (c *RegionInstanceGroupManagersClient) Resize(ctx context.Context, req *computepb.ResizeRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Resize changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.
The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ResizeRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.Resize(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) SetInstanceTemplate ¶
func (c *RegionInstanceGroupManagersClient) SetInstanceTemplate(ctx context.Context, req *computepb.SetInstanceTemplateRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetInstanceTemplate sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetInstanceTemplateRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.SetInstanceTemplate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) SetTargetPools ¶
func (c *RegionInstanceGroupManagersClient) SetTargetPools(ctx context.Context, req *computepb.SetTargetPoolsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetTargetPools modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetTargetPoolsRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.SetTargetPools(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupManagersClient) UpdatePerInstanceConfigs ¶
func (c *RegionInstanceGroupManagersClient) UpdatePerInstanceConfigs(ctx context.Context, req *computepb.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*computepb.Operation, error)
UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest{ // TODO: Fill request struct fields. } resp, err := c.UpdatePerInstanceConfigs(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionInstanceGroupsCallOptions ¶
type RegionInstanceGroupsCallOptions struct { Get []gax.CallOption List []gax.CallOption ListInstances []gax.CallOption SetNamedPorts []gax.CallOption }
RegionInstanceGroupsCallOptions contains the retry settings for each method of RegionInstanceGroupsClient.
type RegionInstanceGroupsClient ¶
type RegionInstanceGroupsClient struct { // The call options for this service. CallOptions *RegionInstanceGroupsCallOptions // contains filtered or unexported fields }
RegionInstanceGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionInstanceGroups API.
func NewRegionInstanceGroupsRESTClient ¶
func NewRegionInstanceGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionInstanceGroupsClient, error)
NewRegionInstanceGroupsRESTClient creates a new region instance groups rest client.
The RegionInstanceGroups API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionInstanceGroupsClient) Close ¶
func (c *RegionInstanceGroupsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionInstanceGroupsClient) Connection ¶
func (c *RegionInstanceGroupsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionInstanceGroupsClient) Get ¶
func (c *RegionInstanceGroupsClient) Get(ctx context.Context, req *computepb.GetRegionInstanceGroupRequest, opts ...gax.CallOption) (*computepb.InstanceGroup, error)
Get returns the specified instance group resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupsClient) List ¶
func (c *RegionInstanceGroupsClient) List(ctx context.Context, req *computepb.ListRegionInstanceGroupsRequest, opts ...gax.CallOption) (*computepb.RegionInstanceGroupList, error)
List retrieves the list of instance group resources contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionInstanceGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupsClient) ListInstances ¶
func (c *RegionInstanceGroupsClient) ListInstances(ctx context.Context, req *computepb.ListInstancesRegionInstanceGroupsRequest, opts ...gax.CallOption) (*computepb.RegionInstanceGroupsListInstances, error)
ListInstances lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. The orderBy query parameter is not supported.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListInstancesRegionInstanceGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.ListInstances(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstanceGroupsClient) SetNamedPorts ¶
func (c *RegionInstanceGroupsClient) SetNamedPorts(ctx context.Context, req *computepb.SetNamedPortsRegionInstanceGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetNamedPorts sets the named ports for the specified regional instance group.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetNamedPortsRegionInstanceGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.SetNamedPorts(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionInstancesCallOptions ¶
type RegionInstancesCallOptions struct {
BulkInsert []gax.CallOption
}
RegionInstancesCallOptions contains the retry settings for each method of RegionInstancesClient.
type RegionInstancesClient ¶
type RegionInstancesClient struct { // The call options for this service. CallOptions *RegionInstancesCallOptions // contains filtered or unexported fields }
RegionInstancesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionInstances API.
func NewRegionInstancesRESTClient ¶
func NewRegionInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionInstancesClient, error)
NewRegionInstancesRESTClient creates a new region instances rest client.
The RegionInstances API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionInstancesClient) BulkInsert ¶
func (c *RegionInstancesClient) BulkInsert(ctx context.Context, req *computepb.BulkInsertRegionInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
BulkInsert creates multiple instances in a given region. Count specifies the number of instances to create.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.BulkInsertRegionInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.BulkInsert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionInstancesClient) Close ¶
func (c *RegionInstancesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionInstancesClient) Connection ¶
func (c *RegionInstancesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
type RegionNetworkEndpointGroupsCallOptions ¶
type RegionNetworkEndpointGroupsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
RegionNetworkEndpointGroupsCallOptions contains the retry settings for each method of RegionNetworkEndpointGroupsClient.
type RegionNetworkEndpointGroupsClient ¶
type RegionNetworkEndpointGroupsClient struct { // The call options for this service. CallOptions *RegionNetworkEndpointGroupsCallOptions // contains filtered or unexported fields }
RegionNetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionNetworkEndpointGroups API.
func NewRegionNetworkEndpointGroupsRESTClient ¶
func NewRegionNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionNetworkEndpointGroupsClient, error)
NewRegionNetworkEndpointGroupsRESTClient creates a new region network endpoint groups rest client.
The RegionNetworkEndpointGroups API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionNetworkEndpointGroupsClient) Close ¶
func (c *RegionNetworkEndpointGroupsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionNetworkEndpointGroupsClient) Connection ¶
func (c *RegionNetworkEndpointGroupsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionNetworkEndpointGroupsClient) Delete ¶
func (c *RegionNetworkEndpointGroupsClient) Delete(ctx context.Context, req *computepb.DeleteRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionNetworkEndpointGroupsClient) Get ¶
func (c *RegionNetworkEndpointGroupsClient) Get(ctx context.Context, req *computepb.GetRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroup, error)
Get returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionNetworkEndpointGroupsClient) Insert ¶
func (c *RegionNetworkEndpointGroupsClient) Insert(ctx context.Context, req *computepb.InsertRegionNetworkEndpointGroupRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a network endpoint group in the specified project using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionNetworkEndpointGroupRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionNetworkEndpointGroupsClient) List ¶
func (c *RegionNetworkEndpointGroupsClient) List(ctx context.Context, req *computepb.ListRegionNetworkEndpointGroupsRequest, opts ...gax.CallOption) (*computepb.NetworkEndpointGroupList, error)
List retrieves the list of regional network endpoint groups available to the specified project in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionNetworkEndpointGroupsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionNotificationEndpointsCallOptions ¶
type RegionNotificationEndpointsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
RegionNotificationEndpointsCallOptions contains the retry settings for each method of RegionNotificationEndpointsClient.
type RegionNotificationEndpointsClient ¶
type RegionNotificationEndpointsClient struct { // The call options for this service. CallOptions *RegionNotificationEndpointsCallOptions // contains filtered or unexported fields }
RegionNotificationEndpointsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionNotificationEndpoints API.
func NewRegionNotificationEndpointsRESTClient ¶
func NewRegionNotificationEndpointsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionNotificationEndpointsClient, error)
NewRegionNotificationEndpointsRESTClient creates a new region notification endpoints rest client.
The RegionNotificationEndpoints API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionNotificationEndpointsClient) Close ¶
func (c *RegionNotificationEndpointsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionNotificationEndpointsClient) Connection ¶
func (c *RegionNotificationEndpointsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionNotificationEndpointsClient) Delete ¶
func (c *RegionNotificationEndpointsClient) Delete(ctx context.Context, req *computepb.DeleteRegionNotificationEndpointRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified NotificationEndpoint in the given region
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionNotificationEndpointRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionNotificationEndpointsClient) Get ¶
func (c *RegionNotificationEndpointsClient) Get(ctx context.Context, req *computepb.GetRegionNotificationEndpointRequest, opts ...gax.CallOption) (*computepb.NotificationEndpoint, error)
Get returns the specified NotificationEndpoint resource in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionNotificationEndpointRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionNotificationEndpointsClient) Insert ¶
func (c *RegionNotificationEndpointsClient) Insert(ctx context.Context, req *computepb.InsertRegionNotificationEndpointRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionNotificationEndpointRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionNotificationEndpointsClient) List ¶
func (c *RegionNotificationEndpointsClient) List(ctx context.Context, req *computepb.ListRegionNotificationEndpointsRequest, opts ...gax.CallOption) (*computepb.NotificationEndpointList, error)
List lists the NotificationEndpoints for a project in the given region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionNotificationEndpointsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionOperationsCallOptions ¶
type RegionOperationsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption List []gax.CallOption Wait []gax.CallOption }
RegionOperationsCallOptions contains the retry settings for each method of RegionOperationsClient.
type RegionOperationsClient ¶
type RegionOperationsClient struct { // The call options for this service. CallOptions *RegionOperationsCallOptions // contains filtered or unexported fields }
RegionOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionOperations API.
func NewRegionOperationsRESTClient ¶
func NewRegionOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionOperationsClient, error)
NewRegionOperationsRESTClient creates a new region operations rest client.
The RegionOperations API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionOperationsClient) Close ¶
func (c *RegionOperationsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionOperationsClient) Connection ¶
func (c *RegionOperationsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionOperationsClient) Delete ¶
func (c *RegionOperationsClient) Delete(ctx context.Context, req *computepb.DeleteRegionOperationRequest, opts ...gax.CallOption) (*computepb.DeleteRegionOperationResponse, error)
Delete deletes the specified region-specific Operations resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionOperationsClient) Get ¶
func (c *RegionOperationsClient) Get(ctx context.Context, req *computepb.GetRegionOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Get retrieves the specified region-specific Operations resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionOperationsClient) List ¶
func (c *RegionOperationsClient) List(ctx context.Context, req *computepb.ListRegionOperationsRequest, opts ...gax.CallOption) (*computepb.OperationList, error)
List retrieves a list of Operation resources contained within the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionOperationsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionOperationsClient) Wait ¶
func (c *RegionOperationsClient) Wait(ctx context.Context, req *computepb.WaitRegionOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Wait waits for the specified Operation resource to return as DONE or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the GET method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be DONE or still in progress.
This method is called on a best-effort basis. Specifically:
In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.WaitRegionOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Wait(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionSslCertificatesCallOptions ¶
type RegionSslCertificatesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
RegionSslCertificatesCallOptions contains the retry settings for each method of RegionSslCertificatesClient.
type RegionSslCertificatesClient ¶
type RegionSslCertificatesClient struct { // The call options for this service. CallOptions *RegionSslCertificatesCallOptions // contains filtered or unexported fields }
RegionSslCertificatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionSslCertificates API.
func NewRegionSslCertificatesRESTClient ¶
func NewRegionSslCertificatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionSslCertificatesClient, error)
NewRegionSslCertificatesRESTClient creates a new region ssl certificates rest client.
The RegionSslCertificates API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionSslCertificatesClient) Close ¶
func (c *RegionSslCertificatesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionSslCertificatesClient) Connection ¶
func (c *RegionSslCertificatesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionSslCertificatesClient) Delete ¶
func (c *RegionSslCertificatesClient) Delete(ctx context.Context, req *computepb.DeleteRegionSslCertificateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified SslCertificate resource in the region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionSslCertificateRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionSslCertificatesClient) Get ¶
func (c *RegionSslCertificatesClient) Get(ctx context.Context, req *computepb.GetRegionSslCertificateRequest, opts ...gax.CallOption) (*computepb.SslCertificate, error)
Get returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionSslCertificateRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionSslCertificatesClient) Insert ¶
func (c *RegionSslCertificatesClient) Insert(ctx context.Context, req *computepb.InsertRegionSslCertificateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a SslCertificate resource in the specified project and region using the data included in the request
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionSslCertificateRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionSslCertificatesClient) List ¶
func (c *RegionSslCertificatesClient) List(ctx context.Context, req *computepb.ListRegionSslCertificatesRequest, opts ...gax.CallOption) (*computepb.SslCertificateList, error)
List retrieves the list of SslCertificate resources available to the specified project in the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionSslCertificatesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionTargetHttpProxiesCallOptions ¶
type RegionTargetHttpProxiesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetUrlMap []gax.CallOption }
RegionTargetHttpProxiesCallOptions contains the retry settings for each method of RegionTargetHttpProxiesClient.
type RegionTargetHttpProxiesClient ¶
type RegionTargetHttpProxiesClient struct { // The call options for this service. CallOptions *RegionTargetHttpProxiesCallOptions // contains filtered or unexported fields }
RegionTargetHttpProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionTargetHttpProxies API.
func NewRegionTargetHttpProxiesRESTClient ¶
func NewRegionTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionTargetHttpProxiesClient, error)
NewRegionTargetHttpProxiesRESTClient creates a new region target http proxies rest client.
The RegionTargetHttpProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionTargetHttpProxiesClient) Close ¶
func (c *RegionTargetHttpProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionTargetHttpProxiesClient) Connection ¶
func (c *RegionTargetHttpProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionTargetHttpProxiesClient) Delete ¶
func (c *RegionTargetHttpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteRegionTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetHttpProxy resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpProxiesClient) Get ¶
func (c *RegionTargetHttpProxiesClient) Get(ctx context.Context, req *computepb.GetRegionTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.TargetHttpProxy, error)
Get returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpProxiesClient) Insert ¶
func (c *RegionTargetHttpProxiesClient) Insert(ctx context.Context, req *computepb.InsertRegionTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetHttpProxy resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpProxiesClient) List ¶
func (c *RegionTargetHttpProxiesClient) List(ctx context.Context, req *computepb.ListRegionTargetHttpProxiesRequest, opts ...gax.CallOption) (*computepb.TargetHttpProxyList, error)
List retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionTargetHttpProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpProxiesClient) SetUrlMap ¶
func (c *RegionTargetHttpProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapRegionTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetUrlMap changes the URL map for TargetHttpProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetUrlMapRegionTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetUrlMap(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionTargetHttpsProxiesCallOptions ¶
type RegionTargetHttpsProxiesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetSslCertificates []gax.CallOption SetUrlMap []gax.CallOption }
RegionTargetHttpsProxiesCallOptions contains the retry settings for each method of RegionTargetHttpsProxiesClient.
type RegionTargetHttpsProxiesClient ¶
type RegionTargetHttpsProxiesClient struct { // The call options for this service. CallOptions *RegionTargetHttpsProxiesCallOptions // contains filtered or unexported fields }
RegionTargetHttpsProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionTargetHttpsProxies API.
func NewRegionTargetHttpsProxiesRESTClient ¶
func NewRegionTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionTargetHttpsProxiesClient, error)
NewRegionTargetHttpsProxiesRESTClient creates a new region target https proxies rest client.
The RegionTargetHttpsProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionTargetHttpsProxiesClient) Close ¶
func (c *RegionTargetHttpsProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionTargetHttpsProxiesClient) Connection ¶
func (c *RegionTargetHttpsProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionTargetHttpsProxiesClient) Delete ¶
func (c *RegionTargetHttpsProxiesClient) Delete(ctx context.Context, req *computepb.DeleteRegionTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetHttpsProxy resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpsProxiesClient) Get ¶
func (c *RegionTargetHttpsProxiesClient) Get(ctx context.Context, req *computepb.GetRegionTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.TargetHttpsProxy, error)
Get returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpsProxiesClient) Insert ¶
func (c *RegionTargetHttpsProxiesClient) Insert(ctx context.Context, req *computepb.InsertRegionTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpsProxiesClient) List ¶
func (c *RegionTargetHttpsProxiesClient) List(ctx context.Context, req *computepb.ListRegionTargetHttpsProxiesRequest, opts ...gax.CallOption) (*computepb.TargetHttpsProxyList, error)
List retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionTargetHttpsProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpsProxiesClient) SetSslCertificates ¶
func (c *RegionTargetHttpsProxiesClient) SetSslCertificates(ctx context.Context, req *computepb.SetSslCertificatesRegionTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetSslCertificates replaces SslCertificates for TargetHttpsProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSslCertificatesRegionTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetSslCertificates(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionTargetHttpsProxiesClient) SetUrlMap ¶
func (c *RegionTargetHttpsProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapRegionTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetUrlMap changes the URL map for TargetHttpsProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetUrlMapRegionTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetUrlMap(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionUrlMapsCallOptions ¶
type RegionUrlMapsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption Validate []gax.CallOption }
RegionUrlMapsCallOptions contains the retry settings for each method of RegionUrlMapsClient.
type RegionUrlMapsClient ¶
type RegionUrlMapsClient struct { // The call options for this service. CallOptions *RegionUrlMapsCallOptions // contains filtered or unexported fields }
RegionUrlMapsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The RegionUrlMaps API.
func NewRegionUrlMapsRESTClient ¶
func NewRegionUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionUrlMapsClient, error)
NewRegionUrlMapsRESTClient creates a new region url maps rest client.
The RegionUrlMaps API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionUrlMapsClient) Close ¶
func (c *RegionUrlMapsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionUrlMapsClient) Connection ¶
func (c *RegionUrlMapsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionUrlMapsClient) Delete ¶
func (c *RegionUrlMapsClient) Delete(ctx context.Context, req *computepb.DeleteRegionUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified UrlMap resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRegionUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionUrlMapsClient) Get ¶
func (c *RegionUrlMapsClient) Get(ctx context.Context, req *computepb.GetRegionUrlMapRequest, opts ...gax.CallOption) (*computepb.UrlMap, error)
Get returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionUrlMapsClient) Insert ¶
func (c *RegionUrlMapsClient) Insert(ctx context.Context, req *computepb.InsertRegionUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a UrlMap resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRegionUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionUrlMapsClient) List ¶
func (c *RegionUrlMapsClient) List(ctx context.Context, req *computepb.ListRegionUrlMapsRequest, opts ...gax.CallOption) (*computepb.UrlMapList, error)
List retrieves the list of UrlMap resources available to the specified project in the specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionUrlMapsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionUrlMapsClient) Patch ¶
func (c *RegionUrlMapsClient) Patch(ctx context.Context, req *computepb.PatchRegionUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRegionUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionUrlMapsClient) Update ¶
func (c *RegionUrlMapsClient) Update(ctx context.Context, req *computepb.UpdateRegionUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified UrlMap resource with the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateRegionUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionUrlMapsClient) Validate ¶
func (c *RegionUrlMapsClient) Validate(ctx context.Context, req *computepb.ValidateRegionUrlMapRequest, opts ...gax.CallOption) (*computepb.UrlMapsValidateResponse, error)
Validate runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ValidateRegionUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Validate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RegionsCallOptions ¶
type RegionsCallOptions struct { Get []gax.CallOption List []gax.CallOption }
RegionsCallOptions contains the retry settings for each method of RegionsClient.
type RegionsClient ¶
type RegionsClient struct { // The call options for this service. CallOptions *RegionsCallOptions // contains filtered or unexported fields }
RegionsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Regions API.
func NewRegionsRESTClient ¶
func NewRegionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionsClient, error)
NewRegionsRESTClient creates a new regions rest client.
The Regions API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRegionsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RegionsClient) Close ¶
func (c *RegionsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RegionsClient) Connection ¶
func (c *RegionsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RegionsClient) Get ¶
func (c *RegionsClient) Get(ctx context.Context, req *computepb.GetRegionRequest, opts ...gax.CallOption) (*computepb.Region, error)
Get returns the specified Region resource. Gets a list of available regions by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRegionRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RegionsClient) List ¶
func (c *RegionsClient) List(ctx context.Context, req *computepb.ListRegionsRequest, opts ...gax.CallOption) (*computepb.RegionList, error)
List retrieves the list of region resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRegionsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRegionsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ReservationsCallOptions ¶
type ReservationsCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption Resize []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
ReservationsCallOptions contains the retry settings for each method of ReservationsClient.
type ReservationsClient ¶
type ReservationsClient struct { // The call options for this service. CallOptions *ReservationsCallOptions // contains filtered or unexported fields }
ReservationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Reservations API.
func NewReservationsRESTClient ¶
func NewReservationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ReservationsClient, error)
NewReservationsRESTClient creates a new reservations rest client.
The Reservations API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ReservationsClient) AggregatedList ¶
func (c *ReservationsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListReservationsRequest, opts ...gax.CallOption) (*computepb.ReservationAggregatedList, error)
AggregatedList retrieves an aggregated list of reservations.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListReservationsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) Close ¶
func (c *ReservationsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ReservationsClient) Connection ¶
func (c *ReservationsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ReservationsClient) Delete ¶
func (c *ReservationsClient) Delete(ctx context.Context, req *computepb.DeleteReservationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified reservation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) Get ¶
func (c *ReservationsClient) Get(ctx context.Context, req *computepb.GetReservationRequest, opts ...gax.CallOption) (*computepb.Reservation, error)
Get retrieves information about the specified reservation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) GetIamPolicy ¶
func (c *ReservationsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyReservationRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) Insert ¶
func (c *ReservationsClient) Insert(ctx context.Context, req *computepb.InsertReservationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a new reservation. For more information, read Reserving zonal resources.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) List ¶
func (c *ReservationsClient) List(ctx context.Context, req *computepb.ListReservationsRequest, opts ...gax.CallOption) (*computepb.ReservationList, error)
List a list of all the reservations that have been configured for the specified project in specified zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListReservationsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) Resize ¶
func (c *ReservationsClient) Resize(ctx context.Context, req *computepb.ResizeReservationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Resize resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ResizeReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.Resize(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) SetIamPolicy ¶
func (c *ReservationsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyReservationRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ReservationsClient) TestIamPermissions ¶
func (c *ReservationsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsReservationRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsReservationRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ResourcePoliciesCallOptions ¶
type ResourcePoliciesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
ResourcePoliciesCallOptions contains the retry settings for each method of ResourcePoliciesClient.
type ResourcePoliciesClient ¶
type ResourcePoliciesClient struct { // The call options for this service. CallOptions *ResourcePoliciesCallOptions // contains filtered or unexported fields }
ResourcePoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The ResourcePolicies API.
func NewResourcePoliciesRESTClient ¶
func NewResourcePoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ResourcePoliciesClient, error)
NewResourcePoliciesRESTClient creates a new resource policies rest client.
The ResourcePolicies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ResourcePoliciesClient) AggregatedList ¶
func (c *ResourcePoliciesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListResourcePoliciesRequest, opts ...gax.CallOption) (*computepb.ResourcePolicyAggregatedList, error)
AggregatedList retrieves an aggregated list of resource policies.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListResourcePoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) Close ¶
func (c *ResourcePoliciesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ResourcePoliciesClient) Connection ¶
func (c *ResourcePoliciesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ResourcePoliciesClient) Delete ¶
func (c *ResourcePoliciesClient) Delete(ctx context.Context, req *computepb.DeleteResourcePolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified resource policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteResourcePolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) Get ¶
func (c *ResourcePoliciesClient) Get(ctx context.Context, req *computepb.GetResourcePolicyRequest, opts ...gax.CallOption) (*computepb.ResourcePolicy, error)
Get retrieves all information of the specified resource policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetResourcePolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) GetIamPolicy ¶
func (c *ResourcePoliciesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyResourcePolicyRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicyResourcePolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) Insert ¶
func (c *ResourcePoliciesClient) Insert(ctx context.Context, req *computepb.InsertResourcePolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a new resource policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertResourcePolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) List ¶
func (c *ResourcePoliciesClient) List(ctx context.Context, req *computepb.ListResourcePoliciesRequest, opts ...gax.CallOption) (*computepb.ResourcePolicyList, error)
List a list all the resource policies that have been configured for the specified project in specified region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListResourcePoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) SetIamPolicy ¶
func (c *ResourcePoliciesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyResourcePolicyRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicyResourcePolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ResourcePoliciesClient) TestIamPermissions ¶
func (c *ResourcePoliciesClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsResourcePolicyRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsResourcePolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RoutersCallOptions ¶
type RoutersCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetNatMappingInfo []gax.CallOption GetRouterStatus []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption Preview []gax.CallOption Update []gax.CallOption }
RoutersCallOptions contains the retry settings for each method of RoutersClient.
type RoutersClient ¶
type RoutersClient struct { // The call options for this service. CallOptions *RoutersCallOptions // contains filtered or unexported fields }
RoutersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Routers API.
func NewRoutersRESTClient ¶
func NewRoutersRESTClient(ctx context.Context, opts ...option.ClientOption) (*RoutersClient, error)
NewRoutersRESTClient creates a new routers rest client.
The Routers API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RoutersClient) AggregatedList ¶
func (c *RoutersClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListRoutersRequest, opts ...gax.CallOption) (*computepb.RouterAggregatedList, error)
AggregatedList retrieves an aggregated list of routers.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListRoutersRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) Close ¶
func (c *RoutersClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RoutersClient) Connection ¶
func (c *RoutersClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RoutersClient) Delete ¶
func (c *RoutersClient) Delete(ctx context.Context, req *computepb.DeleteRouterRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified Router resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) Get ¶
func (c *RoutersClient) Get(ctx context.Context, req *computepb.GetRouterRequest, opts ...gax.CallOption) (*computepb.Router, error)
Get returns the specified Router resource. Gets a list of available routers by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) GetNatMappingInfo ¶
func (c *RoutersClient) GetNatMappingInfo(ctx context.Context, req *computepb.GetNatMappingInfoRoutersRequest, opts ...gax.CallOption) (*computepb.VmEndpointNatMappingsList, error)
GetNatMappingInfo retrieves runtime Nat mapping information of VM endpoints.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetNatMappingInfoRoutersRequest{ // TODO: Fill request struct fields. } resp, err := c.GetNatMappingInfo(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) GetRouterStatus ¶
func (c *RoutersClient) GetRouterStatus(ctx context.Context, req *computepb.GetRouterStatusRouterRequest, opts ...gax.CallOption) (*computepb.RouterStatusResponse, error)
GetRouterStatus retrieves runtime information of the specified router.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRouterStatusRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.GetRouterStatus(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) Insert ¶
func (c *RoutersClient) Insert(ctx context.Context, req *computepb.InsertRouterRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a Router resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) List ¶
func (c *RoutersClient) List(ctx context.Context, req *computepb.ListRoutersRequest, opts ...gax.CallOption) (*computepb.RouterList, error)
List retrieves a list of Router resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRoutersRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) Patch ¶
func (c *RoutersClient) Patch(ctx context.Context, req *computepb.PatchRouterRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) Preview ¶
func (c *RoutersClient) Preview(ctx context.Context, req *computepb.PreviewRouterRequest, opts ...gax.CallOption) (*computepb.RoutersPreviewResponse, error)
Preview preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PreviewRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.Preview(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutersClient) Update ¶
func (c *RoutersClient) Update(ctx context.Context, req *computepb.UpdateRouterRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateRouterRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type RoutesCallOptions ¶
type RoutesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
RoutesCallOptions contains the retry settings for each method of RoutesClient.
type RoutesClient ¶
type RoutesClient struct { // The call options for this service. CallOptions *RoutesCallOptions // contains filtered or unexported fields }
RoutesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Routes API.
func NewRoutesRESTClient ¶
func NewRoutesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RoutesClient, error)
NewRoutesRESTClient creates a new routes rest client.
The Routes API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*RoutesClient) Close ¶
func (c *RoutesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RoutesClient) Connection ¶
func (c *RoutesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*RoutesClient) Delete ¶
func (c *RoutesClient) Delete(ctx context.Context, req *computepb.DeleteRouteRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified Route resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteRouteRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutesClient) Get ¶
func (c *RoutesClient) Get(ctx context.Context, req *computepb.GetRouteRequest, opts ...gax.CallOption) (*computepb.Route, error)
Get returns the specified Route resource. Gets a list of available routes by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRouteRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutesClient) Insert ¶
func (c *RoutesClient) Insert(ctx context.Context, req *computepb.InsertRouteRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a Route resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertRouteRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*RoutesClient) List ¶
func (c *RoutesClient) List(ctx context.Context, req *computepb.ListRoutesRequest, opts ...gax.CallOption) (*computepb.RouteList, error)
List retrieves the list of Route resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListRoutesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type SecurityPoliciesCallOptions ¶
type SecurityPoliciesCallOptions struct { AddRule []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetRule []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListPreconfiguredExpressionSets []gax.CallOption Patch []gax.CallOption PatchRule []gax.CallOption RemoveRule []gax.CallOption }
SecurityPoliciesCallOptions contains the retry settings for each method of SecurityPoliciesClient.
type SecurityPoliciesClient ¶
type SecurityPoliciesClient struct { // The call options for this service. CallOptions *SecurityPoliciesCallOptions // contains filtered or unexported fields }
SecurityPoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The SecurityPolicies API.
func NewSecurityPoliciesRESTClient ¶
func NewSecurityPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SecurityPoliciesClient, error)
NewSecurityPoliciesRESTClient creates a new security policies rest client.
The SecurityPolicies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*SecurityPoliciesClient) AddRule ¶
func (c *SecurityPoliciesClient) AddRule(ctx context.Context, req *computepb.AddRuleSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddRule inserts a rule into a security policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddRuleSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.AddRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) Close ¶
func (c *SecurityPoliciesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*SecurityPoliciesClient) Connection ¶
func (c *SecurityPoliciesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*SecurityPoliciesClient) Delete ¶
func (c *SecurityPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) Get ¶
func (c *SecurityPoliciesClient) Get(ctx context.Context, req *computepb.GetSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.SecurityPolicy, error)
Get list all of the ordered rules present in a single specified policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) GetRule ¶
func (c *SecurityPoliciesClient) GetRule(ctx context.Context, req *computepb.GetRuleSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.SecurityPolicyRule, error)
GetRule gets a rule at the specified priority.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetRuleSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.GetRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) Insert ¶
func (c *SecurityPoliciesClient) Insert(ctx context.Context, req *computepb.InsertSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a new policy in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) List ¶
func (c *SecurityPoliciesClient) List(ctx context.Context, req *computepb.ListSecurityPoliciesRequest, opts ...gax.CallOption) (*computepb.SecurityPolicyList, error)
List list all the policies that have been configured for the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListSecurityPoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) ListPreconfiguredExpressionSets ¶
func (c *SecurityPoliciesClient) ListPreconfiguredExpressionSets(ctx context.Context, req *computepb.ListPreconfiguredExpressionSetsSecurityPoliciesRequest, opts ...gax.CallOption) (*computepb.SecurityPoliciesListPreconfiguredExpressionSetsResponse, error)
ListPreconfiguredExpressionSets gets the current list of preconfigured Web Application Firewall (WAF) expressions.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListPreconfiguredExpressionSetsSecurityPoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.ListPreconfiguredExpressionSets(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) Patch ¶
func (c *SecurityPoliciesClient) Patch(ctx context.Context, req *computepb.PatchSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) PatchRule ¶
func (c *SecurityPoliciesClient) PatchRule(ctx context.Context, req *computepb.PatchRuleSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
PatchRule patches a rule at the specified priority.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchRuleSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.PatchRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SecurityPoliciesClient) RemoveRule ¶
func (c *SecurityPoliciesClient) RemoveRule(ctx context.Context, req *computepb.RemoveRuleSecurityPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveRule deletes a rule at the specified priority.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveRuleSecurityPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type SnapshotsCallOptions ¶
type SnapshotsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption List []gax.CallOption SetIamPolicy []gax.CallOption SetLabels []gax.CallOption TestIamPermissions []gax.CallOption }
SnapshotsCallOptions contains the retry settings for each method of SnapshotsClient.
type SnapshotsClient ¶
type SnapshotsClient struct { // The call options for this service. CallOptions *SnapshotsCallOptions // contains filtered or unexported fields }
SnapshotsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Snapshots API.
func NewSnapshotsRESTClient ¶
func NewSnapshotsRESTClient(ctx context.Context, opts ...option.ClientOption) (*SnapshotsClient, error)
NewSnapshotsRESTClient creates a new snapshots rest client.
The Snapshots API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*SnapshotsClient) Close ¶
func (c *SnapshotsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*SnapshotsClient) Connection ¶
func (c *SnapshotsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*SnapshotsClient) Delete ¶
func (c *SnapshotsClient) Delete(ctx context.Context, req *computepb.DeleteSnapshotRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.
For more information, see Deleting snapshots.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSnapshotRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SnapshotsClient) Get ¶
func (c *SnapshotsClient) Get(ctx context.Context, req *computepb.GetSnapshotRequest, opts ...gax.CallOption) (*computepb.Snapshot, error)
Get returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetSnapshotRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SnapshotsClient) GetIamPolicy ¶
func (c *SnapshotsClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicySnapshotRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicySnapshotRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SnapshotsClient) List ¶
func (c *SnapshotsClient) List(ctx context.Context, req *computepb.ListSnapshotsRequest, opts ...gax.CallOption) (*computepb.SnapshotList, error)
List retrieves the list of Snapshot resources contained within the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListSnapshotsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SnapshotsClient) SetIamPolicy ¶
func (c *SnapshotsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicySnapshotRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicySnapshotRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SnapshotsClient) SetLabels ¶
func (c *SnapshotsClient) SetLabels(ctx context.Context, req *computepb.SetLabelsSnapshotRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsSnapshotRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SnapshotsClient) TestIamPermissions ¶
func (c *SnapshotsClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsSnapshotRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsSnapshotRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type SslCertificatesCallOptions ¶
type SslCertificatesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
SslCertificatesCallOptions contains the retry settings for each method of SslCertificatesClient.
type SslCertificatesClient ¶
type SslCertificatesClient struct { // The call options for this service. CallOptions *SslCertificatesCallOptions // contains filtered or unexported fields }
SslCertificatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The SslCertificates API.
func NewSslCertificatesRESTClient ¶
func NewSslCertificatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SslCertificatesClient, error)
NewSslCertificatesRESTClient creates a new ssl certificates rest client.
The SslCertificates API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*SslCertificatesClient) AggregatedList ¶
func (c *SslCertificatesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListSslCertificatesRequest, opts ...gax.CallOption) (*computepb.SslCertificateAggregatedList, error)
AggregatedList retrieves the list of all SslCertificate resources, regional and global, available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListSslCertificatesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslCertificatesClient) Close ¶
func (c *SslCertificatesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*SslCertificatesClient) Connection ¶
func (c *SslCertificatesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*SslCertificatesClient) Delete ¶
func (c *SslCertificatesClient) Delete(ctx context.Context, req *computepb.DeleteSslCertificateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified SslCertificate resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSslCertificateRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslCertificatesClient) Get ¶
func (c *SslCertificatesClient) Get(ctx context.Context, req *computepb.GetSslCertificateRequest, opts ...gax.CallOption) (*computepb.SslCertificate, error)
Get returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetSslCertificateRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslCertificatesClient) Insert ¶
func (c *SslCertificatesClient) Insert(ctx context.Context, req *computepb.InsertSslCertificateRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a SslCertificate resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertSslCertificateRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslCertificatesClient) List ¶
func (c *SslCertificatesClient) List(ctx context.Context, req *computepb.ListSslCertificatesRequest, opts ...gax.CallOption) (*computepb.SslCertificateList, error)
List retrieves the list of SslCertificate resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListSslCertificatesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type SslPoliciesCallOptions ¶
type SslPoliciesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListAvailableFeatures []gax.CallOption Patch []gax.CallOption }
SslPoliciesCallOptions contains the retry settings for each method of SslPoliciesClient.
type SslPoliciesClient ¶
type SslPoliciesClient struct { // The call options for this service. CallOptions *SslPoliciesCallOptions // contains filtered or unexported fields }
SslPoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The SslPolicies API.
func NewSslPoliciesRESTClient ¶
func NewSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SslPoliciesClient, error)
NewSslPoliciesRESTClient creates a new ssl policies rest client.
The SslPolicies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*SslPoliciesClient) Close ¶
func (c *SslPoliciesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*SslPoliciesClient) Connection ¶
func (c *SslPoliciesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*SslPoliciesClient) Delete ¶
func (c *SslPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteSslPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSslPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslPoliciesClient) Get ¶
func (c *SslPoliciesClient) Get(ctx context.Context, req *computepb.GetSslPolicyRequest, opts ...gax.CallOption) (*computepb.SslPolicy, error)
Get lists all of the ordered rules present in a single specified policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetSslPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslPoliciesClient) Insert ¶
func (c *SslPoliciesClient) Insert(ctx context.Context, req *computepb.InsertSslPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertSslPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslPoliciesClient) List ¶
func (c *SslPoliciesClient) List(ctx context.Context, req *computepb.ListSslPoliciesRequest, opts ...gax.CallOption) (*computepb.SslPoliciesList, error)
List lists all the SSL policies that have been configured for the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListSslPoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslPoliciesClient) ListAvailableFeatures ¶
func (c *SslPoliciesClient) ListAvailableFeatures(ctx context.Context, req *computepb.ListAvailableFeaturesSslPoliciesRequest, opts ...gax.CallOption) (*computepb.SslPoliciesListAvailableFeaturesResponse, error)
ListAvailableFeatures lists all features that can be specified in the SSL policy when using custom profile.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListAvailableFeaturesSslPoliciesRequest{ // TODO: Fill request struct fields. } resp, err := c.ListAvailableFeatures(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SslPoliciesClient) Patch ¶
func (c *SslPoliciesClient) Patch(ctx context.Context, req *computepb.PatchSslPolicyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified SSL policy with the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchSslPolicyRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type SubnetworksCallOptions ¶
type SubnetworksCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption ExpandIpCidrRange []gax.CallOption Get []gax.CallOption GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption ListUsable []gax.CallOption Patch []gax.CallOption SetIamPolicy []gax.CallOption SetPrivateIpGoogleAccess []gax.CallOption TestIamPermissions []gax.CallOption }
SubnetworksCallOptions contains the retry settings for each method of SubnetworksClient.
type SubnetworksClient ¶
type SubnetworksClient struct { // The call options for this service. CallOptions *SubnetworksCallOptions // contains filtered or unexported fields }
SubnetworksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Subnetworks API.
func NewSubnetworksRESTClient ¶
func NewSubnetworksRESTClient(ctx context.Context, opts ...option.ClientOption) (*SubnetworksClient, error)
NewSubnetworksRESTClient creates a new subnetworks rest client.
The Subnetworks API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*SubnetworksClient) AggregatedList ¶
func (c *SubnetworksClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListSubnetworksRequest, opts ...gax.CallOption) (*computepb.SubnetworkAggregatedList, error)
AggregatedList retrieves an aggregated list of subnetworks.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListSubnetworksRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) Close ¶
func (c *SubnetworksClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*SubnetworksClient) Connection ¶
func (c *SubnetworksClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*SubnetworksClient) Delete ¶
func (c *SubnetworksClient) Delete(ctx context.Context, req *computepb.DeleteSubnetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified subnetwork.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) ExpandIpCidrRange ¶
func (c *SubnetworksClient) ExpandIpCidrRange(ctx context.Context, req *computepb.ExpandIpCidrRangeSubnetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
ExpandIpCidrRange expands the IP CIDR range of the subnetwork to a specified value.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ExpandIpCidrRangeSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.ExpandIpCidrRange(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) Get ¶
func (c *SubnetworksClient) Get(ctx context.Context, req *computepb.GetSubnetworkRequest, opts ...gax.CallOption) (*computepb.Subnetwork, error)
Get returns the specified subnetwork. Gets a list of available subnetworks list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) GetIamPolicy ¶
func (c *SubnetworksClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicySubnetworkRequest, opts ...gax.CallOption) (*computepb.Policy, error)
GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetIamPolicySubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.GetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) Insert ¶
func (c *SubnetworksClient) Insert(ctx context.Context, req *computepb.InsertSubnetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a subnetwork in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) List ¶
func (c *SubnetworksClient) List(ctx context.Context, req *computepb.ListSubnetworksRequest, opts ...gax.CallOption) (*computepb.SubnetworkList, error)
List retrieves a list of subnetworks available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListSubnetworksRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) ListUsable ¶
func (c *SubnetworksClient) ListUsable(ctx context.Context, req *computepb.ListUsableSubnetworksRequest, opts ...gax.CallOption) (*computepb.UsableSubnetworksAggregatedList, error)
ListUsable retrieves an aggregated list of all usable subnetworks in the project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListUsableSubnetworksRequest{ // TODO: Fill request struct fields. } resp, err := c.ListUsable(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) Patch ¶
func (c *SubnetworksClient) Patch(ctx context.Context, req *computepb.PatchSubnetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) SetIamPolicy ¶
func (c *SubnetworksClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicySubnetworkRequest, opts ...gax.CallOption) (*computepb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetIamPolicySubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.SetIamPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) SetPrivateIpGoogleAccess ¶
func (c *SubnetworksClient) SetPrivateIpGoogleAccess(ctx context.Context, req *computepb.SetPrivateIpGoogleAccessSubnetworkRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetPrivateIpGoogleAccess set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetPrivateIpGoogleAccessSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.SetPrivateIpGoogleAccess(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SubnetworksClient) TestIamPermissions ¶
func (c *SubnetworksClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsSubnetworkRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsSubnetworkRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetGrpcProxiesCallOptions ¶
type TargetGrpcProxiesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption }
TargetGrpcProxiesCallOptions contains the retry settings for each method of TargetGrpcProxiesClient.
type TargetGrpcProxiesClient ¶
type TargetGrpcProxiesClient struct { // The call options for this service. CallOptions *TargetGrpcProxiesCallOptions // contains filtered or unexported fields }
TargetGrpcProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetGrpcProxies API.
func NewTargetGrpcProxiesRESTClient ¶
func NewTargetGrpcProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetGrpcProxiesClient, error)
NewTargetGrpcProxiesRESTClient creates a new target grpc proxies rest client.
The TargetGrpcProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetGrpcProxiesClient) Close ¶
func (c *TargetGrpcProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetGrpcProxiesClient) Connection ¶
func (c *TargetGrpcProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetGrpcProxiesClient) Delete ¶
func (c *TargetGrpcProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetGrpcProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetGrpcProxy in the given scope
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetGrpcProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetGrpcProxiesClient) Get ¶
func (c *TargetGrpcProxiesClient) Get(ctx context.Context, req *computepb.GetTargetGrpcProxyRequest, opts ...gax.CallOption) (*computepb.TargetGrpcProxy, error)
Get returns the specified TargetGrpcProxy resource in the given scope.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetGrpcProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetGrpcProxiesClient) Insert ¶
func (c *TargetGrpcProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetGrpcProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetGrpcProxy in the specified project in the given scope using the parameters that are included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetGrpcProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetGrpcProxiesClient) List ¶
func (c *TargetGrpcProxiesClient) List(ctx context.Context, req *computepb.ListTargetGrpcProxiesRequest, opts ...gax.CallOption) (*computepb.TargetGrpcProxyList, error)
List lists the TargetGrpcProxies for a project in the given scope.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetGrpcProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetGrpcProxiesClient) Patch ¶
func (c *TargetGrpcProxiesClient) Patch(ctx context.Context, req *computepb.PatchTargetGrpcProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified TargetGrpcProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchTargetGrpcProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetHttpProxiesCallOptions ¶
type TargetHttpProxiesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetUrlMap []gax.CallOption }
TargetHttpProxiesCallOptions contains the retry settings for each method of TargetHttpProxiesClient.
type TargetHttpProxiesClient ¶
type TargetHttpProxiesClient struct { // The call options for this service. CallOptions *TargetHttpProxiesCallOptions // contains filtered or unexported fields }
TargetHttpProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetHttpProxies API.
func NewTargetHttpProxiesRESTClient ¶
func NewTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetHttpProxiesClient, error)
NewTargetHttpProxiesRESTClient creates a new target http proxies rest client.
The TargetHttpProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetHttpProxiesClient) AggregatedList ¶
func (c *TargetHttpProxiesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetHttpProxiesRequest, opts ...gax.CallOption) (*computepb.TargetHttpProxyAggregatedList, error)
AggregatedList retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListTargetHttpProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpProxiesClient) Close ¶
func (c *TargetHttpProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetHttpProxiesClient) Connection ¶
func (c *TargetHttpProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetHttpProxiesClient) Delete ¶
func (c *TargetHttpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetHttpProxy resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpProxiesClient) Get ¶
func (c *TargetHttpProxiesClient) Get(ctx context.Context, req *computepb.GetTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.TargetHttpProxy, error)
Get returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpProxiesClient) Insert ¶
func (c *TargetHttpProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetHttpProxy resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpProxiesClient) List ¶
func (c *TargetHttpProxiesClient) List(ctx context.Context, req *computepb.ListTargetHttpProxiesRequest, opts ...gax.CallOption) (*computepb.TargetHttpProxyList, error)
List retrieves the list of TargetHttpProxy resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetHttpProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpProxiesClient) Patch ¶
func (c *TargetHttpProxiesClient) Patch(ctx context.Context, req *computepb.PatchTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpProxiesClient) SetUrlMap ¶
func (c *TargetHttpProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapTargetHttpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetUrlMap changes the URL map for TargetHttpProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetUrlMapTargetHttpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetUrlMap(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetHttpsProxiesCallOptions ¶
type TargetHttpsProxiesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetQuicOverride []gax.CallOption SetSslCertificates []gax.CallOption SetSslPolicy []gax.CallOption SetUrlMap []gax.CallOption }
TargetHttpsProxiesCallOptions contains the retry settings for each method of TargetHttpsProxiesClient.
type TargetHttpsProxiesClient ¶
type TargetHttpsProxiesClient struct { // The call options for this service. CallOptions *TargetHttpsProxiesCallOptions // contains filtered or unexported fields }
TargetHttpsProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetHttpsProxies API.
func NewTargetHttpsProxiesRESTClient ¶
func NewTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetHttpsProxiesClient, error)
NewTargetHttpsProxiesRESTClient creates a new target https proxies rest client.
The TargetHttpsProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetHttpsProxiesClient) AggregatedList ¶
func (c *TargetHttpsProxiesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetHttpsProxiesRequest, opts ...gax.CallOption) (*computepb.TargetHttpsProxyAggregatedList, error)
AggregatedList retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListTargetHttpsProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) Close ¶
func (c *TargetHttpsProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetHttpsProxiesClient) Connection ¶
func (c *TargetHttpsProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetHttpsProxiesClient) Delete ¶
func (c *TargetHttpsProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetHttpsProxy resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) Get ¶
func (c *TargetHttpsProxiesClient) Get(ctx context.Context, req *computepb.GetTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.TargetHttpsProxy, error)
Get returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) Insert ¶
func (c *TargetHttpsProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetHttpsProxy resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) List ¶
func (c *TargetHttpsProxiesClient) List(ctx context.Context, req *computepb.ListTargetHttpsProxiesRequest, opts ...gax.CallOption) (*computepb.TargetHttpsProxyList, error)
List retrieves the list of TargetHttpsProxy resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetHttpsProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) Patch ¶
func (c *TargetHttpsProxiesClient) Patch(ctx context.Context, req *computepb.PatchTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) SetQuicOverride ¶
func (c *TargetHttpsProxiesClient) SetQuicOverride(ctx context.Context, req *computepb.SetQuicOverrideTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetQuicOverride sets the QUIC override policy for TargetHttpsProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetQuicOverrideTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetQuicOverride(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) SetSslCertificates ¶
func (c *TargetHttpsProxiesClient) SetSslCertificates(ctx context.Context, req *computepb.SetSslCertificatesTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetSslCertificates replaces SslCertificates for TargetHttpsProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSslCertificatesTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetSslCertificates(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) SetSslPolicy ¶
func (c *TargetHttpsProxiesClient) SetSslPolicy(ctx context.Context, req *computepb.SetSslPolicyTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetSslPolicy sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSslPolicyTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetSslPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetHttpsProxiesClient) SetUrlMap ¶
func (c *TargetHttpsProxiesClient) SetUrlMap(ctx context.Context, req *computepb.SetUrlMapTargetHttpsProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetUrlMap changes the URL map for TargetHttpsProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetUrlMapTargetHttpsProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetUrlMap(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetInstancesCallOptions ¶
type TargetInstancesCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
TargetInstancesCallOptions contains the retry settings for each method of TargetInstancesClient.
type TargetInstancesClient ¶
type TargetInstancesClient struct { // The call options for this service. CallOptions *TargetInstancesCallOptions // contains filtered or unexported fields }
TargetInstancesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetInstances API.
func NewTargetInstancesRESTClient ¶
func NewTargetInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetInstancesClient, error)
NewTargetInstancesRESTClient creates a new target instances rest client.
The TargetInstances API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetInstancesClient) AggregatedList ¶
func (c *TargetInstancesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetInstancesRequest, opts ...gax.CallOption) (*computepb.TargetInstanceAggregatedList, error)
AggregatedList retrieves an aggregated list of target instances.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListTargetInstancesRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetInstancesClient) Close ¶
func (c *TargetInstancesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetInstancesClient) Connection ¶
func (c *TargetInstancesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetInstancesClient) Delete ¶
func (c *TargetInstancesClient) Delete(ctx context.Context, req *computepb.DeleteTargetInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetInstance resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetInstancesClient) Get ¶
func (c *TargetInstancesClient) Get(ctx context.Context, req *computepb.GetTargetInstanceRequest, opts ...gax.CallOption) (*computepb.TargetInstance, error)
Get returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetInstancesClient) Insert ¶
func (c *TargetInstancesClient) Insert(ctx context.Context, req *computepb.InsertTargetInstanceRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetInstance resource in the specified project and zone using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetInstanceRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetInstancesClient) List ¶
func (c *TargetInstancesClient) List(ctx context.Context, req *computepb.ListTargetInstancesRequest, opts ...gax.CallOption) (*computepb.TargetInstanceList, error)
List retrieves a list of TargetInstance resources available to the specified project and zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetInstancesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetPoolsCallOptions ¶
type TargetPoolsCallOptions struct { AddHealthCheck []gax.CallOption AddInstance []gax.CallOption AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetHealth []gax.CallOption Insert []gax.CallOption List []gax.CallOption RemoveHealthCheck []gax.CallOption RemoveInstance []gax.CallOption SetBackup []gax.CallOption }
TargetPoolsCallOptions contains the retry settings for each method of TargetPoolsClient.
type TargetPoolsClient ¶
type TargetPoolsClient struct { // The call options for this service. CallOptions *TargetPoolsCallOptions // contains filtered or unexported fields }
TargetPoolsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetPools API.
func NewTargetPoolsRESTClient ¶
func NewTargetPoolsRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetPoolsClient, error)
NewTargetPoolsRESTClient creates a new target pools rest client.
The TargetPools API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetPoolsClient) AddHealthCheck ¶
func (c *TargetPoolsClient) AddHealthCheck(ctx context.Context, req *computepb.AddHealthCheckTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddHealthCheck adds health check URLs to a target pool.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddHealthCheckTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.AddHealthCheck(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) AddInstance ¶
func (c *TargetPoolsClient) AddInstance(ctx context.Context, req *computepb.AddInstanceTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
AddInstance adds an instance to a target pool.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AddInstanceTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.AddInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) AggregatedList ¶
func (c *TargetPoolsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetPoolsRequest, opts ...gax.CallOption) (*computepb.TargetPoolAggregatedList, error)
AggregatedList retrieves an aggregated list of target pools.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListTargetPoolsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) Close ¶
func (c *TargetPoolsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetPoolsClient) Connection ¶
func (c *TargetPoolsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetPoolsClient) Delete ¶
func (c *TargetPoolsClient) Delete(ctx context.Context, req *computepb.DeleteTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified target pool.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) Get ¶
func (c *TargetPoolsClient) Get(ctx context.Context, req *computepb.GetTargetPoolRequest, opts ...gax.CallOption) (*computepb.TargetPool, error)
Get returns the specified target pool. Gets a list of available target pools by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) GetHealth ¶
func (c *TargetPoolsClient) GetHealth(ctx context.Context, req *computepb.GetHealthTargetPoolRequest, opts ...gax.CallOption) (*computepb.TargetPoolInstanceHealth, error)
GetHealth gets the most recent health check results for each IP for the instance that is referenced by the given target pool.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetHealthTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.GetHealth(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) Insert ¶
func (c *TargetPoolsClient) Insert(ctx context.Context, req *computepb.InsertTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a target pool in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) List ¶
func (c *TargetPoolsClient) List(ctx context.Context, req *computepb.ListTargetPoolsRequest, opts ...gax.CallOption) (*computepb.TargetPoolList, error)
List retrieves a list of target pools available to the specified project and region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetPoolsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) RemoveHealthCheck ¶
func (c *TargetPoolsClient) RemoveHealthCheck(ctx context.Context, req *computepb.RemoveHealthCheckTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveHealthCheck removes health check URL from a target pool.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveHealthCheckTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveHealthCheck(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) RemoveInstance ¶
func (c *TargetPoolsClient) RemoveInstance(ctx context.Context, req *computepb.RemoveInstanceTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
RemoveInstance removes instance URL from a target pool.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.RemoveInstanceTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.RemoveInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetPoolsClient) SetBackup ¶
func (c *TargetPoolsClient) SetBackup(ctx context.Context, req *computepb.SetBackupTargetPoolRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetBackup changes a backup target pool’s configurations.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetBackupTargetPoolRequest{ // TODO: Fill request struct fields. } resp, err := c.SetBackup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetSslProxiesCallOptions ¶
type TargetSslProxiesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetBackendService []gax.CallOption SetProxyHeader []gax.CallOption SetSslCertificates []gax.CallOption SetSslPolicy []gax.CallOption }
TargetSslProxiesCallOptions contains the retry settings for each method of TargetSslProxiesClient.
type TargetSslProxiesClient ¶
type TargetSslProxiesClient struct { // The call options for this service. CallOptions *TargetSslProxiesCallOptions // contains filtered or unexported fields }
TargetSslProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetSslProxies API.
func NewTargetSslProxiesRESTClient ¶
func NewTargetSslProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetSslProxiesClient, error)
NewTargetSslProxiesRESTClient creates a new target ssl proxies rest client.
The TargetSslProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetSslProxiesClient) Close ¶
func (c *TargetSslProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetSslProxiesClient) Connection ¶
func (c *TargetSslProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetSslProxiesClient) Delete ¶
func (c *TargetSslProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetSslProxy resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) Get ¶
func (c *TargetSslProxiesClient) Get(ctx context.Context, req *computepb.GetTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.TargetSslProxy, error)
Get returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) Insert ¶
func (c *TargetSslProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetSslProxy resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) List ¶
func (c *TargetSslProxiesClient) List(ctx context.Context, req *computepb.ListTargetSslProxiesRequest, opts ...gax.CallOption) (*computepb.TargetSslProxyList, error)
List retrieves the list of TargetSslProxy resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetSslProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) SetBackendService ¶
func (c *TargetSslProxiesClient) SetBackendService(ctx context.Context, req *computepb.SetBackendServiceTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetBackendService changes the BackendService for TargetSslProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetBackendServiceTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetBackendService(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) SetProxyHeader ¶
func (c *TargetSslProxiesClient) SetProxyHeader(ctx context.Context, req *computepb.SetProxyHeaderTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetProxyHeader changes the ProxyHeaderType for TargetSslProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetProxyHeaderTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetProxyHeader(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) SetSslCertificates ¶
func (c *TargetSslProxiesClient) SetSslCertificates(ctx context.Context, req *computepb.SetSslCertificatesTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetSslCertificates changes SslCertificates for TargetSslProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSslCertificatesTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetSslCertificates(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetSslProxiesClient) SetSslPolicy ¶
func (c *TargetSslProxiesClient) SetSslPolicy(ctx context.Context, req *computepb.SetSslPolicyTargetSslProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetSslPolicy sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetSslPolicyTargetSslProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetSslPolicy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetTcpProxiesCallOptions ¶
type TargetTcpProxiesCallOptions struct { Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetBackendService []gax.CallOption SetProxyHeader []gax.CallOption }
TargetTcpProxiesCallOptions contains the retry settings for each method of TargetTcpProxiesClient.
type TargetTcpProxiesClient ¶
type TargetTcpProxiesClient struct { // The call options for this service. CallOptions *TargetTcpProxiesCallOptions // contains filtered or unexported fields }
TargetTcpProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetTcpProxies API.
func NewTargetTcpProxiesRESTClient ¶
func NewTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetTcpProxiesClient, error)
NewTargetTcpProxiesRESTClient creates a new target tcp proxies rest client.
The TargetTcpProxies API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetTcpProxiesClient) Close ¶
func (c *TargetTcpProxiesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetTcpProxiesClient) Connection ¶
func (c *TargetTcpProxiesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetTcpProxiesClient) Delete ¶
func (c *TargetTcpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified TargetTcpProxy resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetTcpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetTcpProxiesClient) Get ¶
func (c *TargetTcpProxiesClient) Get(ctx context.Context, req *computepb.GetTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.TargetTcpProxy, error)
Get returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetTcpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetTcpProxiesClient) Insert ¶
func (c *TargetTcpProxiesClient) Insert(ctx context.Context, req *computepb.InsertTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a TargetTcpProxy resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetTcpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetTcpProxiesClient) List ¶
func (c *TargetTcpProxiesClient) List(ctx context.Context, req *computepb.ListTargetTcpProxiesRequest, opts ...gax.CallOption) (*computepb.TargetTcpProxyList, error)
List retrieves the list of TargetTcpProxy resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetTcpProxiesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetTcpProxiesClient) SetBackendService ¶
func (c *TargetTcpProxiesClient) SetBackendService(ctx context.Context, req *computepb.SetBackendServiceTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetBackendService changes the BackendService for TargetTcpProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetBackendServiceTargetTcpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetBackendService(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetTcpProxiesClient) SetProxyHeader ¶
func (c *TargetTcpProxiesClient) SetProxyHeader(ctx context.Context, req *computepb.SetProxyHeaderTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetProxyHeader changes the ProxyHeaderType for TargetTcpProxy.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetProxyHeaderTargetTcpProxyRequest{ // TODO: Fill request struct fields. } resp, err := c.SetProxyHeader(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type TargetVpnGatewaysCallOptions ¶
type TargetVpnGatewaysCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
TargetVpnGatewaysCallOptions contains the retry settings for each method of TargetVpnGatewaysClient.
type TargetVpnGatewaysClient ¶
type TargetVpnGatewaysClient struct { // The call options for this service. CallOptions *TargetVpnGatewaysCallOptions // contains filtered or unexported fields }
TargetVpnGatewaysClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The TargetVpnGateways API.
func NewTargetVpnGatewaysRESTClient ¶
func NewTargetVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetVpnGatewaysClient, error)
NewTargetVpnGatewaysRESTClient creates a new target vpn gateways rest client.
The TargetVpnGateways API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*TargetVpnGatewaysClient) AggregatedList ¶
func (c *TargetVpnGatewaysClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListTargetVpnGatewaysRequest, opts ...gax.CallOption) (*computepb.TargetVpnGatewayAggregatedList, error)
AggregatedList retrieves an aggregated list of target VPN gateways.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListTargetVpnGatewaysRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetVpnGatewaysClient) Close ¶
func (c *TargetVpnGatewaysClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*TargetVpnGatewaysClient) Connection ¶
func (c *TargetVpnGatewaysClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*TargetVpnGatewaysClient) Delete ¶
func (c *TargetVpnGatewaysClient) Delete(ctx context.Context, req *computepb.DeleteTargetVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified target VPN gateway.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteTargetVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetVpnGatewaysClient) Get ¶
func (c *TargetVpnGatewaysClient) Get(ctx context.Context, req *computepb.GetTargetVpnGatewayRequest, opts ...gax.CallOption) (*computepb.TargetVpnGateway, error)
Get returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetTargetVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetVpnGatewaysClient) Insert ¶
func (c *TargetVpnGatewaysClient) Insert(ctx context.Context, req *computepb.InsertTargetVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a target VPN gateway in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertTargetVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*TargetVpnGatewaysClient) List ¶
func (c *TargetVpnGatewaysClient) List(ctx context.Context, req *computepb.ListTargetVpnGatewaysRequest, opts ...gax.CallOption) (*computepb.TargetVpnGatewayList, error)
List retrieves a list of target VPN gateways available to the specified project and region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListTargetVpnGatewaysRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type UrlMapsCallOptions ¶
type UrlMapsCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption InvalidateCache []gax.CallOption List []gax.CallOption Patch []gax.CallOption Update []gax.CallOption Validate []gax.CallOption }
UrlMapsCallOptions contains the retry settings for each method of UrlMapsClient.
type UrlMapsClient ¶
type UrlMapsClient struct { // The call options for this service. CallOptions *UrlMapsCallOptions // contains filtered or unexported fields }
UrlMapsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The UrlMaps API.
func NewUrlMapsRESTClient ¶
func NewUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption) (*UrlMapsClient, error)
NewUrlMapsRESTClient creates a new url maps rest client.
The UrlMaps API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*UrlMapsClient) AggregatedList ¶
func (c *UrlMapsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListUrlMapsRequest, opts ...gax.CallOption) (*computepb.UrlMapsAggregatedList, error)
AggregatedList retrieves the list of all UrlMap resources, regional and global, available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListUrlMapsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) Close ¶
func (c *UrlMapsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*UrlMapsClient) Connection ¶
func (c *UrlMapsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*UrlMapsClient) Delete ¶
func (c *UrlMapsClient) Delete(ctx context.Context, req *computepb.DeleteUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified UrlMap resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) Get ¶
func (c *UrlMapsClient) Get(ctx context.Context, req *computepb.GetUrlMapRequest, opts ...gax.CallOption) (*computepb.UrlMap, error)
Get returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) Insert ¶
func (c *UrlMapsClient) Insert(ctx context.Context, req *computepb.InsertUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a UrlMap resource in the specified project using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) InvalidateCache ¶
func (c *UrlMapsClient) InvalidateCache(ctx context.Context, req *computepb.InvalidateCacheUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
InvalidateCache initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
For more information, see Invalidating cached content (at /cdn/docs/invalidating-cached-content).
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InvalidateCacheUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.InvalidateCache(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) List ¶
func (c *UrlMapsClient) List(ctx context.Context, req *computepb.ListUrlMapsRequest, opts ...gax.CallOption) (*computepb.UrlMapList, error)
List retrieves the list of UrlMap resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListUrlMapsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) Patch ¶
func (c *UrlMapsClient) Patch(ctx context.Context, req *computepb.PatchUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Patch patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.PatchUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Patch(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) Update ¶
func (c *UrlMapsClient) Update(ctx context.Context, req *computepb.UpdateUrlMapRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Update updates the specified UrlMap resource with the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.UpdateUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Update(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*UrlMapsClient) Validate ¶
func (c *UrlMapsClient) Validate(ctx context.Context, req *computepb.ValidateUrlMapRequest, opts ...gax.CallOption) (*computepb.UrlMapsValidateResponse, error)
Validate runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ValidateUrlMapRequest{ // TODO: Fill request struct fields. } resp, err := c.Validate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type VpnGatewaysCallOptions ¶
type VpnGatewaysCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption GetStatus []gax.CallOption Insert []gax.CallOption List []gax.CallOption SetLabels []gax.CallOption TestIamPermissions []gax.CallOption }
VpnGatewaysCallOptions contains the retry settings for each method of VpnGatewaysClient.
type VpnGatewaysClient ¶
type VpnGatewaysClient struct { // The call options for this service. CallOptions *VpnGatewaysCallOptions // contains filtered or unexported fields }
VpnGatewaysClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The VpnGateways API.
func NewVpnGatewaysRESTClient ¶
func NewVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) (*VpnGatewaysClient, error)
NewVpnGatewaysRESTClient creates a new vpn gateways rest client.
The VpnGateways API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*VpnGatewaysClient) AggregatedList ¶
func (c *VpnGatewaysClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListVpnGatewaysRequest, opts ...gax.CallOption) (*computepb.VpnGatewayAggregatedList, error)
AggregatedList retrieves an aggregated list of VPN gateways.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListVpnGatewaysRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) Close ¶
func (c *VpnGatewaysClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*VpnGatewaysClient) Connection ¶
func (c *VpnGatewaysClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*VpnGatewaysClient) Delete ¶
func (c *VpnGatewaysClient) Delete(ctx context.Context, req *computepb.DeleteVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified VPN gateway.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) Get ¶
func (c *VpnGatewaysClient) Get(ctx context.Context, req *computepb.GetVpnGatewayRequest, opts ...gax.CallOption) (*computepb.VpnGateway, error)
Get returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) GetStatus ¶
func (c *VpnGatewaysClient) GetStatus(ctx context.Context, req *computepb.GetStatusVpnGatewayRequest, opts ...gax.CallOption) (*computepb.VpnGatewaysGetStatusResponse, error)
GetStatus returns the status for the specified VPN gateway.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetStatusVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.GetStatus(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) Insert ¶
func (c *VpnGatewaysClient) Insert(ctx context.Context, req *computepb.InsertVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a VPN gateway in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) List ¶
func (c *VpnGatewaysClient) List(ctx context.Context, req *computepb.ListVpnGatewaysRequest, opts ...gax.CallOption) (*computepb.VpnGatewayList, error)
List retrieves a list of VPN gateways available to the specified project and region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListVpnGatewaysRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) SetLabels ¶
func (c *VpnGatewaysClient) SetLabels(ctx context.Context, req *computepb.SetLabelsVpnGatewayRequest, opts ...gax.CallOption) (*computepb.Operation, error)
SetLabels sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.SetLabelsVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.SetLabels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnGatewaysClient) TestIamPermissions ¶
func (c *VpnGatewaysClient) TestIamPermissions(ctx context.Context, req *computepb.TestIamPermissionsVpnGatewayRequest, opts ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.TestIamPermissionsVpnGatewayRequest{ // TODO: Fill request struct fields. } resp, err := c.TestIamPermissions(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type VpnTunnelsCallOptions ¶
type VpnTunnelsCallOptions struct { AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption }
VpnTunnelsCallOptions contains the retry settings for each method of VpnTunnelsClient.
type VpnTunnelsClient ¶
type VpnTunnelsClient struct { // The call options for this service. CallOptions *VpnTunnelsCallOptions // contains filtered or unexported fields }
VpnTunnelsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The VpnTunnels API.
func NewVpnTunnelsRESTClient ¶
func NewVpnTunnelsRESTClient(ctx context.Context, opts ...option.ClientOption) (*VpnTunnelsClient, error)
NewVpnTunnelsRESTClient creates a new vpn tunnels rest client.
The VpnTunnels API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*VpnTunnelsClient) AggregatedList ¶
func (c *VpnTunnelsClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListVpnTunnelsRequest, opts ...gax.CallOption) (*computepb.VpnTunnelAggregatedList, error)
AggregatedList retrieves an aggregated list of VPN tunnels.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.AggregatedListVpnTunnelsRequest{ // TODO: Fill request struct fields. } resp, err := c.AggregatedList(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnTunnelsClient) Close ¶
func (c *VpnTunnelsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*VpnTunnelsClient) Connection ¶
func (c *VpnTunnelsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*VpnTunnelsClient) Delete ¶
func (c *VpnTunnelsClient) Delete(ctx context.Context, req *computepb.DeleteVpnTunnelRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Delete deletes the specified VpnTunnel resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteVpnTunnelRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnTunnelsClient) Get ¶
func (c *VpnTunnelsClient) Get(ctx context.Context, req *computepb.GetVpnTunnelRequest, opts ...gax.CallOption) (*computepb.VpnTunnel, error)
Get returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetVpnTunnelRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnTunnelsClient) Insert ¶
func (c *VpnTunnelsClient) Insert(ctx context.Context, req *computepb.InsertVpnTunnelRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Insert creates a VpnTunnel resource in the specified project and region using the data included in the request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.InsertVpnTunnelRequest{ // TODO: Fill request struct fields. } resp, err := c.Insert(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VpnTunnelsClient) List ¶
func (c *VpnTunnelsClient) List(ctx context.Context, req *computepb.ListVpnTunnelsRequest, opts ...gax.CallOption) (*computepb.VpnTunnelList, error)
List retrieves a list of VpnTunnel resources contained in the specified project and region.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListVpnTunnelsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ZoneOperationsCallOptions ¶
type ZoneOperationsCallOptions struct { Delete []gax.CallOption Get []gax.CallOption List []gax.CallOption Wait []gax.CallOption }
ZoneOperationsCallOptions contains the retry settings for each method of ZoneOperationsClient.
type ZoneOperationsClient ¶
type ZoneOperationsClient struct { // The call options for this service. CallOptions *ZoneOperationsCallOptions // contains filtered or unexported fields }
ZoneOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The ZoneOperations API.
func NewZoneOperationsRESTClient ¶
func NewZoneOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ZoneOperationsClient, error)
NewZoneOperationsRESTClient creates a new zone operations rest client.
The ZoneOperations API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ZoneOperationsClient) Close ¶
func (c *ZoneOperationsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ZoneOperationsClient) Connection ¶
func (c *ZoneOperationsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ZoneOperationsClient) Delete ¶
func (c *ZoneOperationsClient) Delete(ctx context.Context, req *computepb.DeleteZoneOperationRequest, opts ...gax.CallOption) (*computepb.DeleteZoneOperationResponse, error)
Delete deletes the specified zone-specific Operations resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.DeleteZoneOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Delete(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ZoneOperationsClient) Get ¶
func (c *ZoneOperationsClient) Get(ctx context.Context, req *computepb.GetZoneOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Get retrieves the specified zone-specific Operations resource.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetZoneOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ZoneOperationsClient) List ¶
func (c *ZoneOperationsClient) List(ctx context.Context, req *computepb.ListZoneOperationsRequest, opts ...gax.CallOption) (*computepb.OperationList, error)
List retrieves a list of Operation resources contained within the specified zone.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListZoneOperationsRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ZoneOperationsClient) Wait ¶
func (c *ZoneOperationsClient) Wait(ctx context.Context, req *computepb.WaitZoneOperationRequest, opts ...gax.CallOption) (*computepb.Operation, error)
Wait waits for the specified Operation resource to return as DONE or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the GET method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be DONE or still in progress.
This method is called on a best-effort basis. Specifically:
In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.WaitZoneOperationRequest{ // TODO: Fill request struct fields. } resp, err := c.Wait(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type ZonesCallOptions ¶
type ZonesCallOptions struct { Get []gax.CallOption List []gax.CallOption }
ZonesCallOptions contains the retry settings for each method of ZonesClient.
type ZonesClient ¶
type ZonesClient struct { // The call options for this service. CallOptions *ZonesCallOptions // contains filtered or unexported fields }
ZonesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The Zones API.
func NewZonesRESTClient ¶
func NewZonesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ZonesClient, error)
NewZonesRESTClient creates a new zones rest client.
The Zones API.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" ) func main() { ctx := context.Background() c, err := compute.NewZonesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ZonesClient) Close ¶
func (c *ZonesClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ZonesClient) Connection ¶
func (c *ZonesClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ZonesClient) Get ¶
func (c *ZonesClient) Get(ctx context.Context, req *computepb.GetZoneRequest, opts ...gax.CallOption) (*computepb.Zone, error)
Get returns the specified Zone resource. Gets a list of available zones by making a list() request.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewZonesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.GetZoneRequest{ // TODO: Fill request struct fields. } resp, err := c.Get(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ZonesClient) List ¶
func (c *ZonesClient) List(ctx context.Context, req *computepb.ListZonesRequest, opts ...gax.CallOption) (*computepb.ZoneList, error)
List retrieves the list of Zone resources available to the specified project.
Example ¶
package main import ( "context" compute "cloud.google.com/go/compute/apiv1" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" ) func main() { ctx := context.Background() c, err := compute.NewZonesRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &computepb.ListZonesRequest{ // TODO: Fill request struct fields. } resp, err := c.List(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
Source Files ¶
- accelerator_types_client.go
- addresses_client.go
- autoscalers_client.go
- backend_buckets_client.go
- backend_services_client.go
- disk_types_client.go
- disks_client.go
- doc.go
- external_vpn_gateways_client.go
- firewall_policies_client.go
- firewalls_client.go
- forwarding_rules_client.go
- global_addresses_client.go
- global_forwarding_rules_client.go
- global_network_endpoint_groups_client.go
- global_operations_client.go
- global_organization_operations_client.go
- global_public_delegated_prefixes_client.go
- health_checks_client.go
- images_client.go
- instance_group_managers_client.go
- instance_groups_client.go
- instance_templates_client.go
- instances_client.go
- interconnect_attachments_client.go
- interconnect_locations_client.go
- interconnects_client.go
- license_codes_client.go
- licenses_client.go
- machine_types_client.go
- network_endpoint_groups_client.go
- networks_client.go
- node_groups_client.go
- node_templates_client.go
- node_types_client.go
- packet_mirrorings_client.go
- projects_client.go
- public_advertised_prefixes_client.go
- public_delegated_prefixes_client.go
- region_autoscalers_client.go
- region_backend_services_client.go
- region_commitments_client.go
- region_disk_types_client.go
- region_disks_client.go
- region_health_check_services_client.go
- region_health_checks_client.go
- region_instance_group_managers_client.go
- region_instance_groups_client.go
- region_instances_client.go
- region_network_endpoint_groups_client.go
- region_notification_endpoints_client.go
- region_operations_client.go
- region_ssl_certificates_client.go
- region_target_http_proxies_client.go
- region_target_https_proxies_client.go
- region_url_maps_client.go
- regions_client.go
- reservations_client.go
- resource_policies_client.go
- routers_client.go
- routes_client.go
- security_policies_client.go
- snapshots_client.go
- ssl_certificates_client.go
- ssl_policies_client.go
- subnetworks_client.go
- target_grpc_proxies_client.go
- target_http_proxies_client.go
- target_https_proxies_client.go
- target_instances_client.go
- target_pools_client.go
- target_ssl_proxies_client.go
- target_tcp_proxies_client.go
- target_vpn_gateways_client.go
- url_maps_client.go
- vpn_gateways_client.go
- vpn_tunnels_client.go
- zone_operations_client.go
- zones_client.go