Contents

googleapis/swift-google-cloud-compute-v1

Creates and runs virtual machines on Google Cloud Platform.

Overview

The following types provide methods to make RPCs. They are a good starting point to learn about this library.

  • AcceleratorTypesClient: Service for the acceleratorTypes resource. (enabled by the AcceleratorTypes trait)
  • AddressesClient: Service for the addresses resource. (enabled by the Addresses trait)
  • AdviceClient: Service for the advice resource. (enabled by the Advice trait)
  • AutoscalersClient: Service for the autoscalers resource. (enabled by the Autoscalers trait)
  • BackendBucketsClient: Service for the backendBuckets resource. (enabled by the BackendBuckets trait)
  • BackendServicesClient: Service for the backendServices resource. (enabled by the BackendServices trait)
  • CrossSiteNetworksClient: Service for the crossSiteNetworks resource. (enabled by the CrossSiteNetworks trait)
  • DiskTypesClient: Service for the diskTypes resource. (enabled by the DiskTypes trait)
  • DisksClient: Service for the disks resource. (enabled by the Disks trait)
  • ExternalVpnGatewaysClient: Service for the externalVpnGateways resource. (enabled by the ExternalVpnGateways trait)
  • FirewallPoliciesClient: Service for the firewallPolicies resource. (enabled by the FirewallPolicies trait)
  • FirewallsClient: Service for the firewalls resource. (enabled by the Firewalls trait)
  • ForwardingRulesClient: Service for the forwardingRules resource. (enabled by the ForwardingRules trait)
  • FutureReservationsClient: Service for the futureReservations resource. (enabled by the FutureReservations trait)
  • GlobalAddressesClient: Service for the globalAddresses resource. (enabled by the GlobalAddresses trait)
  • GlobalForwardingRulesClient: Service for the globalForwardingRules resource. (enabled by the GlobalForwardingRules trait)
  • GlobalFrontendSettingsClient: Service for the globalFrontendSettings resource. (enabled by the GlobalFrontendSettings trait)
  • GlobalNetworkEndpointGroupsClient: Service for the globalNetworkEndpointGroups resource. (enabled by the GlobalNetworkEndpointGroups trait)
  • GlobalOperationsClient: Service for the globalOperations resource. (enabled by the GlobalOperations trait)
  • GlobalOrganizationOperationsClient: Service for the globalOrganizationOperations resource. (enabled by the GlobalOrganizationOperations trait)
  • GlobalPublicDelegatedPrefixesClient: Service for the globalPublicDelegatedPrefixes resource. (enabled by the GlobalPublicDelegatedPrefixes trait)
  • GlobalVmExtensionPoliciesClient: Service for the globalVmExtensionPolicies resource. (enabled by the GlobalVmExtensionPolicies trait)
  • HealthChecksClient: Service for the healthChecks resource. (enabled by the HealthChecks trait)
  • HostsClient: Service for the hosts resource. (enabled by the Hosts trait)
  • HttpHealthChecksClient: Service for the httpHealthChecks resource. (enabled by the HttpHealthChecks trait)
  • HttpsHealthChecksClient: Service for the httpsHealthChecks resource. (enabled by the HttpsHealthChecks trait)
  • ImageFamilyViewsClient: Service for the imageFamilyViews resource. (enabled by the ImageFamilyViews trait)
  • ImageViewsClient: Service for the imageViews resource. (enabled by the ImageViews trait)
  • ImagesClient: Service for the images resource. (enabled by the Images trait)
  • InstanceGroupManagerResizeRequestsClient: Service for the instanceGroupManagerResizeRequests resource. (enabled by the InstanceGroupManagerResizeRequests trait)
  • InstanceGroupManagersClient: Service for the instanceGroupManagers resource. (enabled by the InstanceGroupManagers trait)
  • InstanceGroupsClient: Service for the instanceGroups resource. (enabled by the InstanceGroups trait)
  • InstanceSettingsClient: Service for the instanceSettings resource. (enabled by the InstanceSettings trait)
  • InstanceTemplatesClient: Service for the instanceTemplates resource. (enabled by the InstanceTemplates trait)
  • InstancesClient: Service for the instances resource. (enabled by the Instances trait)
  • InstantSnapshotGroupsClient: Service for the instantSnapshotGroups resource. (enabled by the InstantSnapshotGroups trait)
  • InstantSnapshotsClient: Service for the instantSnapshots resource. (enabled by the InstantSnapshots trait)
  • InterconnectAttachmentGroupsClient: Service for the interconnectAttachmentGroups resource. (enabled by the InterconnectAttachmentGroups trait)
  • InterconnectAttachmentsClient: Service for the interconnectAttachments resource. (enabled by the InterconnectAttachments trait)
  • InterconnectGroupsClient: Service for the interconnectGroups resource. (enabled by the InterconnectGroups trait)
  • InterconnectLocationsClient: Service for the interconnectLocations resource. (enabled by the InterconnectLocations trait)
  • InterconnectRemoteLocationsClient: Service for the interconnectRemoteLocations resource. (enabled by the InterconnectRemoteLocations trait)
  • InterconnectsClient: Service for the interconnects resource. (enabled by the Interconnects trait)
  • LicenseCodesClient: Service for the licenseCodes resource. (enabled by the LicenseCodes trait)
  • LicensesClient: Service for the licenses resource. (enabled by the Licenses trait)
  • MachineImagesClient: Service for the machineImages resource. (enabled by the MachineImages trait)
  • MachineTypesClient: Service for the machineTypes resource. (enabled by the MachineTypes trait)
  • ManagedRulesetsClient: Service for the managedRulesets resource. (enabled by the ManagedRulesets trait)
  • NetworkAttachmentsClient: Service for the networkAttachments resource. (enabled by the NetworkAttachments trait)
  • NetworkEdgeSecurityServicesClient: Service for the networkEdgeSecurityServices resource. (enabled by the NetworkEdgeSecurityServices trait)
  • NetworkEndpointGroupsClient: Service for the networkEndpointGroups resource. (enabled by the NetworkEndpointGroups trait)
  • NetworkFirewallPoliciesClient: Service for the networkFirewallPolicies resource. (enabled by the NetworkFirewallPolicies trait)
  • NetworkProfilesClient: Service for the networkProfiles resource. (enabled by the NetworkProfiles trait)
  • NetworksClient: Service for the networks resource. (enabled by the Networks trait)
  • NodeGroupsClient: Service for the nodeGroups resource. (enabled by the NodeGroups trait)
  • NodeTemplatesClient: Service for the nodeTemplates resource. (enabled by the NodeTemplates trait)
  • NodeTypesClient: Service for the nodeTypes resource. (enabled by the NodeTypes trait)
  • OrganizationSecurityPoliciesClient: Service for the organizationSecurityPolicies resource. (enabled by the OrganizationSecurityPolicies trait)
  • PacketMirroringsClient: Service for the packetMirrorings resource. (enabled by the PacketMirrorings trait)
  • PreviewFeaturesClient: Service for the previewFeatures resource. (enabled by the PreviewFeatures trait)
  • ProjectViewsClient: Service for the projectViews resource. (enabled by the ProjectViews trait)
  • ProjectsClient: Service for the projects resource. (enabled by the Projects trait)
  • PublicAdvertisedPrefixesClient: Service for the publicAdvertisedPrefixes resource. (enabled by the PublicAdvertisedPrefixes trait)
  • PublicDelegatedPrefixesClient: Service for the publicDelegatedPrefixes resource. (enabled by the PublicDelegatedPrefixes trait)
  • RegionAutoscalersClient: Service for the regionAutoscalers resource. (enabled by the RegionAutoscalers trait)
  • RegionBackendBucketsClient: Service for the regionBackendBuckets resource. (enabled by the RegionBackendBuckets trait)
  • RegionBackendServicesClient: Service for the regionBackendServices resource. (enabled by the RegionBackendServices trait)
  • RegionCommitmentsClient: Service for the regionCommitments resource. (enabled by the RegionCommitments trait)
  • RegionCompositeHealthChecksClient: Service for the regionCompositeHealthChecks resource. (enabled by the RegionCompositeHealthChecks trait)
  • RegionDiskTypesClient: Service for the regionDiskTypes resource. (enabled by the RegionDiskTypes trait)
  • RegionDisksClient: Service for the regionDisks resource. (enabled by the RegionDisks trait)
  • RegionHealthAggregationPoliciesClient: Service for the regionHealthAggregationPolicies resource. (enabled by the RegionHealthAggregationPolicies trait)
  • RegionHealthCheckServicesClient: Service for the regionHealthCheckServices resource. (enabled by the RegionHealthCheckServices trait)
  • RegionHealthChecksClient: Service for the regionHealthChecks resource. (enabled by the RegionHealthChecks trait)
  • RegionHealthSourcesClient: Service for the regionHealthSources resource. (enabled by the RegionHealthSources trait)
  • RegionInstanceGroupManagerResizeRequestsClient: Service for the regionInstanceGroupManagerResizeRequests resource. (enabled by the RegionInstanceGroupManagerResizeRequests trait)
  • RegionInstanceGroupManagersClient: Service for the regionInstanceGroupManagers resource. (enabled by the RegionInstanceGroupManagers trait)
  • RegionInstanceGroupsClient: Service for the regionInstanceGroups resource. (enabled by the RegionInstanceGroups trait)
  • RegionInstanceTemplatesClient: Service for the regionInstanceTemplates resource. (enabled by the RegionInstanceTemplates trait)
  • RegionInstancesClient: Service for the regionInstances resource. (enabled by the RegionInstances trait)
  • RegionInstantSnapshotGroupsClient: Service for the regionInstantSnapshotGroups resource. (enabled by the RegionInstantSnapshotGroups trait)
  • RegionInstantSnapshotsClient: Service for the regionInstantSnapshots resource. (enabled by the RegionInstantSnapshots trait)
  • RegionNetworkEndpointGroupsClient: Service for the regionNetworkEndpointGroups resource. (enabled by the RegionNetworkEndpointGroups trait)
  • RegionNetworkFirewallPoliciesClient: Service for the regionNetworkFirewallPolicies resource. (enabled by the RegionNetworkFirewallPolicies trait)
  • RegionNotificationEndpointsClient: Service for the regionNotificationEndpoints resource. (enabled by the RegionNotificationEndpoints trait)
  • RegionOperationsClient: Service for the regionOperations resource. (enabled by the RegionOperations trait)
  • RegionSecurityPoliciesClient: Service for the regionSecurityPolicies resource. (enabled by the RegionSecurityPolicies trait)
  • RegionSnapshotSettingsClient: Service for the regionSnapshotSettings resource. (enabled by the RegionSnapshotSettings trait)
  • RegionSnapshotsClient: Service for the regionSnapshots resource. (enabled by the RegionSnapshots trait)
  • RegionSslCertificatesClient: Service for the regionSslCertificates resource. (enabled by the RegionSslCertificates trait)
  • RegionSslPoliciesClient: Service for the regionSslPolicies resource. (enabled by the RegionSslPolicies trait)
  • RegionTargetHttpProxiesClient: Service for the regionTargetHttpProxies resource. (enabled by the RegionTargetHttpProxies trait)
  • RegionTargetHttpsProxiesClient: Service for the regionTargetHttpsProxies resource. (enabled by the RegionTargetHttpsProxies trait)
  • RegionTargetTcpProxiesClient: Service for the regionTargetTcpProxies resource. (enabled by the RegionTargetTcpProxies trait)
  • RegionUrlMapsClient: Service for the regionUrlMaps resource. (enabled by the RegionUrlMaps trait)
  • RegionZonesClient: Service for the regionZones resource. (enabled by the RegionZones trait)
  • RegionsClient: Service for the regions resource. (enabled by the Regions trait)
  • ReliabilityRisksClient: Service for the reliabilityRisks resource. (enabled by the ReliabilityRisks trait)
  • ReservationBlocksClient: Service for the reservationBlocks resource. (enabled by the ReservationBlocks trait)
  • ReservationSlotsClient: Service for the reservationSlots resource. (enabled by the ReservationSlots trait)
  • ReservationSubBlocksClient: Service for the reservationSubBlocks resource. (enabled by the ReservationSubBlocks trait)
  • ReservationsClient: Service for the reservations resource. (enabled by the Reservations trait)
  • ResourcePoliciesClient: Service for the resourcePolicies resource. (enabled by the ResourcePolicies trait)
  • RolloutPlansClient: Service for the rolloutPlans resource. (enabled by the RolloutPlans trait)
  • RolloutsClient: Service for the rollouts resource. (enabled by the Rollouts trait)
  • RoutersClient: Service for the routers resource. (enabled by the Routers trait)
  • RoutesClient: Service for the routes resource. (enabled by the Routes trait)
  • SecurityPoliciesClient: Service for the securityPolicies resource. (enabled by the SecurityPolicies trait)
  • ServiceAttachmentsClient: Service for the serviceAttachments resource. (enabled by the ServiceAttachments trait)
  • SnapshotSettingsClient: Service for the snapshotSettings resource. (enabled by the SnapshotSettings trait)
  • SnapshotsClient: Service for the snapshots resource. (enabled by the Snapshots trait)
  • SslCertificatesClient: Service for the sslCertificates resource. (enabled by the SslCertificates trait)
  • SslPoliciesClient: Service for the sslPolicies resource. (enabled by the SslPolicies trait)
  • StoragePoolTypesClient: Service for the storagePoolTypes resource. (enabled by the StoragePoolTypes trait)
  • StoragePoolsClient: Service for the storagePools resource. (enabled by the StoragePools trait)
  • SubnetworksClient: Service for the subnetworks resource. (enabled by the Subnetworks trait)
  • TargetGrpcProxiesClient: Service for the targetGrpcProxies resource. (enabled by the TargetGrpcProxies trait)
  • TargetHttpProxiesClient: Service for the targetHttpProxies resource. (enabled by the TargetHttpProxies trait)
  • TargetHttpsProxiesClient: Service for the targetHttpsProxies resource. (enabled by the TargetHttpsProxies trait)
  • TargetInstancesClient: Service for the targetInstances resource. (enabled by the TargetInstances trait)
  • TargetPoolsClient: Service for the targetPools resource. (enabled by the TargetPools trait)
  • TargetSslProxiesClient: Service for the targetSslProxies resource. (enabled by the TargetSslProxies trait)
  • TargetTcpProxiesClient: Service for the targetTcpProxies resource. (enabled by the TargetTcpProxies trait)
  • TargetVpnGatewaysClient: Service for the targetVpnGateways resource. (enabled by the TargetVpnGateways trait)
  • UrlMapsClient: Service for the urlMaps resource. (enabled by the UrlMaps trait)
  • VpnGatewaysClient: Service for the vpnGateways resource. (enabled by the VpnGateways trait)
  • VpnTunnelsClient: Service for the vpnTunnels resource. (enabled by the VpnTunnels trait)
  • WireGroupsClient: Service for the wireGroups resource. (enabled by the WireGroups trait)
  • ZoneOperationsClient: Service for the zoneOperations resource. (enabled by the ZoneOperations trait)
  • ZoneVmExtensionPoliciesClient: Service for the zoneVmExtensionPolicies resource. (enabled by the ZoneVmExtensionPolicies trait)
  • ZonesClient: Service for the zones resource. (enabled by the Zones trait)

Quickstart

The following example demonstrates using InstancesClient:

import Foundation
import GoogleCloudComputeV1

func sample() async throws {
  let client = try GoogleCloudComputeV1.InstancesClient()
  let response = try await client.addAccessConfigPollingUntilDone(
    request: InstancesClient.AddAccessConfigRequest()
  /* set fields using .with { $0... } */
)
  print("Success: \(response)")
}

Requirements

For the minimum supported Swift version and platform requirements, see the Requirements section in the google-cloud-swift repository.

Installation

Add swift-google-cloud-compute-v1 as a package dependency:

swift package add-dependency https://github.com/googleapis/swift-google-cloud-compute-v1.git --from 0.6.0

Then add GoogleCloudComputeV1 to your target's dependencies:

swift package add-target-dependency GoogleCloudComputeV1 <target-name> --package swift-google-cloud-compute-v1

Package Traits

This package uses Swift package traits to conditionally compile individual service clients and their associated types. Enabling a trait enables the corresponding client and all the request, response, and model types needed to use that client.

The following traits are enabled by default:

  • Instances

To enable additional traits alongside the defaults, specify them in Package.swift:

.package(url: "https://github.com/googleapis/swift-google-cloud-compute-v1.git", from: "0.6.0", traits: [".defaults", "<TraitName>"])

| Trait | Default | Enabled Client | |---|:---:|---| | AcceleratorTypes | No | AcceleratorTypesClient | | Addresses | No | AddressesClient | | Advice | No | AdviceClient | | Autoscalers | No | AutoscalersClient | | BackendBuckets | No | BackendBucketsClient | | BackendServices | No | BackendServicesClient | | CrossSiteNetworks | No | CrossSiteNetworksClient | | DiskTypes | No | DiskTypesClient | | Disks | No | DisksClient | | ExternalVpnGateways | No | ExternalVpnGatewaysClient | | FirewallPolicies | No | FirewallPoliciesClient | | Firewalls | No | FirewallsClient | | ForwardingRules | No | ForwardingRulesClient | | FutureReservations | No | FutureReservationsClient | | GlobalAddresses | No | GlobalAddressesClient | | GlobalForwardingRules | No | GlobalForwardingRulesClient | | GlobalFrontendSettings | No | GlobalFrontendSettingsClient | | GlobalNetworkEndpointGroups | No | GlobalNetworkEndpointGroupsClient | | GlobalOperations | No | GlobalOperationsClient | | GlobalOrganizationOperations | No | GlobalOrganizationOperationsClient | | GlobalPublicDelegatedPrefixes | No | GlobalPublicDelegatedPrefixesClient | | GlobalVmExtensionPolicies | No | GlobalVmExtensionPoliciesClient | | HealthChecks | No | HealthChecksClient | | Hosts | No | HostsClient | | HttpHealthChecks | No | HttpHealthChecksClient | | HttpsHealthChecks | No | HttpsHealthChecksClient | | ImageFamilyViews | No | ImageFamilyViewsClient | | ImageViews | No | ImageViewsClient | | Images | No | ImagesClient | | InstanceGroupManagerResizeRequests | No | InstanceGroupManagerResizeRequestsClient | | InstanceGroupManagers | No | InstanceGroupManagersClient | | InstanceGroups | No | InstanceGroupsClient | | InstanceSettings | No | InstanceSettingsClient | | InstanceTemplates | No | InstanceTemplatesClient | | Instances | Yes | InstancesClient | | InstantSnapshotGroups | No | InstantSnapshotGroupsClient | | InstantSnapshots | No | InstantSnapshotsClient | | InterconnectAttachmentGroups | No | InterconnectAttachmentGroupsClient | | InterconnectAttachments | No | InterconnectAttachmentsClient | | InterconnectGroups | No | InterconnectGroupsClient | | InterconnectLocations | No | InterconnectLocationsClient | | InterconnectRemoteLocations | No | InterconnectRemoteLocationsClient | | Interconnects | No | InterconnectsClient | | LicenseCodes | No | LicenseCodesClient | | Licenses | No | LicensesClient | | MachineImages | No | MachineImagesClient | | MachineTypes | No | MachineTypesClient | | ManagedRulesets | No | ManagedRulesetsClient | | NetworkAttachments | No | NetworkAttachmentsClient | | NetworkEdgeSecurityServices | No | NetworkEdgeSecurityServicesClient | | NetworkEndpointGroups | No | NetworkEndpointGroupsClient | | NetworkFirewallPolicies | No | NetworkFirewallPoliciesClient | | NetworkProfiles | No | NetworkProfilesClient | | Networks | No | NetworksClient | | NodeGroups | No | NodeGroupsClient | | NodeTemplates | No | NodeTemplatesClient | | NodeTypes | No | NodeTypesClient | | OrganizationSecurityPolicies | No | OrganizationSecurityPoliciesClient | | PacketMirrorings | No | PacketMirroringsClient | | PreviewFeatures | No | PreviewFeaturesClient | | ProjectViews | No | ProjectViewsClient | | Projects | No | ProjectsClient | | PublicAdvertisedPrefixes | No | PublicAdvertisedPrefixesClient | | PublicDelegatedPrefixes | No | PublicDelegatedPrefixesClient | | RegionAutoscalers | No | RegionAutoscalersClient | | RegionBackendBuckets | No | RegionBackendBucketsClient | | RegionBackendServices | No | RegionBackendServicesClient | | RegionCommitments | No | RegionCommitmentsClient | | RegionCompositeHealthChecks | No | RegionCompositeHealthChecksClient | | RegionDiskTypes | No | RegionDiskTypesClient | | RegionDisks | No | RegionDisksClient | | RegionHealthAggregationPolicies | No | RegionHealthAggregationPoliciesClient | | RegionHealthCheckServices | No | RegionHealthCheckServicesClient | | RegionHealthChecks | No | RegionHealthChecksClient | | RegionHealthSources | No | RegionHealthSourcesClient | | RegionInstanceGroupManagerResizeRequests | No | RegionInstanceGroupManagerResizeRequestsClient | | RegionInstanceGroupManagers | No | RegionInstanceGroupManagersClient | | RegionInstanceGroups | No | RegionInstanceGroupsClient | | RegionInstanceTemplates | No | RegionInstanceTemplatesClient | | RegionInstances | No | RegionInstancesClient | | RegionInstantSnapshotGroups | No | RegionInstantSnapshotGroupsClient | | RegionInstantSnapshots | No | RegionInstantSnapshotsClient | | RegionNetworkEndpointGroups | No | RegionNetworkEndpointGroupsClient | | RegionNetworkFirewallPolicies | No | RegionNetworkFirewallPoliciesClient | | RegionNotificationEndpoints | No | RegionNotificationEndpointsClient | | RegionOperations | No | RegionOperationsClient | | RegionSecurityPolicies | No | RegionSecurityPoliciesClient | | RegionSnapshotSettings | No | RegionSnapshotSettingsClient | | RegionSnapshots | No | RegionSnapshotsClient | | RegionSslCertificates | No | RegionSslCertificatesClient | | RegionSslPolicies | No | RegionSslPoliciesClient | | RegionTargetHttpProxies | No | RegionTargetHttpProxiesClient | | RegionTargetHttpsProxies | No | RegionTargetHttpsProxiesClient | | RegionTargetTcpProxies | No | RegionTargetTcpProxiesClient | | RegionUrlMaps | No | RegionUrlMapsClient | | RegionZones | No | RegionZonesClient | | Regions | No | RegionsClient | | ReliabilityRisks | No | ReliabilityRisksClient | | ReservationBlocks | No | ReservationBlocksClient | | ReservationSlots | No | ReservationSlotsClient | | ReservationSubBlocks | No | ReservationSubBlocksClient | | Reservations | No | ReservationsClient | | ResourcePolicies | No | ResourcePoliciesClient | | RolloutPlans | No | RolloutPlansClient | | Rollouts | No | RolloutsClient | | Routers | No | RoutersClient | | Routes | No | RoutesClient | | SecurityPolicies | No | SecurityPoliciesClient | | ServiceAttachments | No | ServiceAttachmentsClient | | SnapshotSettings | No | SnapshotSettingsClient | | Snapshots | No | SnapshotsClient | | SslCertificates | No | SslCertificatesClient | | SslPolicies | No | SslPoliciesClient | | StoragePoolTypes | No | StoragePoolTypesClient | | StoragePools | No | StoragePoolsClient | | Subnetworks | No | SubnetworksClient | | TargetGrpcProxies | No | TargetGrpcProxiesClient | | TargetHttpProxies | No | TargetHttpProxiesClient | | TargetHttpsProxies | No | TargetHttpsProxiesClient | | TargetInstances | No | TargetInstancesClient | | TargetPools | No | TargetPoolsClient | | TargetSslProxies | No | TargetSslProxiesClient | | TargetTcpProxies | No | TargetTcpProxiesClient | | TargetVpnGateways | No | TargetVpnGatewaysClient | | UrlMaps | No | UrlMapsClient | | VpnGateways | No | VpnGatewaysClient | | VpnTunnels | No | VpnTunnelsClient | | WireGroups | No | WireGroupsClient | | ZoneOperations | No | ZoneOperationsClient | | ZoneVmExtensionPolicies | No | ZoneVmExtensionPoliciesClient | | Zones | No | ZonesClient |

Troubleshooting

For questions, bug reports, or feature requests, please open an issue in the google-cloud-swift repository.

Contributing

Contributions to this library are always welcome and highly encouraged.

All development, issues, and pull requests are managed in the google-cloud-swift monorepo. See CONTRIBUTING.md for details on getting started.

License

Apache 2.0 - See LICENSE for more information.

Package Metadata

Repository: googleapis/swift-google-cloud-compute-v1

Default branch: main

README: README.md