The google-compute1
library allows access to all features of the Google compute service.
This documentation was generated from compute crate version 3.1.0+20220224, where 20220224 is the exact revision of the compute:v1 schema built by the mako code generator v3.1.0.
Everything else about the compute v1 API can be found at the official documentation site.
Features
Handle the following Resources with ease from the central hub ...
- accelerator types
- aggregated list, get and list
- addresses
- aggregated list, delete, get, insert and list
- autoscalers
- aggregated list, delete, get, insert, list, patch and update
- backend buckets
- add signed url key, delete, delete signed url key, get, insert, list, patch, set edge security policy and update
- backend services
- add signed url key, aggregated list, delete, delete signed url key, get, get health, insert, list, patch, set edge security policy, set security policy and update
- disk types
- aggregated list, get and list
- disks
- add resource policies, aggregated list, create snapshot, delete, get, get iam policy, insert, list, remove resource policies, resize, set iam policy, set labels and test iam permissions
- external vpn gateways
- delete, get, insert, list, set labels and test iam permissions
- firewall policies
- add association, add rule, clone rules, delete, get, get association, get iam policy, get rule, insert, list, list associations, move, patch, patch rule, remove association, remove rule, set iam policy and test iam permissions
- firewalls
- delete, get, insert, list, patch and update
- forwarding rules
- aggregated list, delete, get, insert, list, patch, set labels and set target
- global addresses
- delete, get, insert and list
- global forwarding rules
- delete, get, insert, list, patch, set labels and set target
- global network endpoint groups
- attach network endpoints, delete, detach network endpoints, get, insert, list and list network endpoints
- global operations
- aggregated list, delete, get, list and wait
- global organization operations
- delete, get and list
- global public delegated prefixes
- delete, get, insert, list and patch
- health checks
- aggregated list, delete, get, insert, list, patch and update
- http health checks
- delete, get, insert, list, patch and update
- https health checks
- delete, get, insert, list, patch and update
- image family views
- get
- images
- delete, deprecate, get, get from family, get iam policy, insert, list, patch, set iam policy, set labels and test iam permissions
- instance group managers
- abandon instances, aggregated list, apply updates to instances, create instances, delete, delete instances, delete per instance configs, get, insert, list, list errors, list managed instances, list per instance configs, patch, patch per instance configs, recreate instances, resize, set instance template, set target pools and update per instance configs
- instance groups
- add instances, aggregated list, delete, get, insert, list, list instances, remove instances and set named ports
- instance templates
- delete, get, get iam policy, insert, list, set iam policy and test iam permissions
- instances
- add access config, add resource policies, aggregated list, attach disk, bulk insert, delete, delete access config, detach disk, get, get effective firewalls, get guest attributes, get iam policy, get screenshot, get serial port output, get shielded instance identity, insert, list, list referrers, remove resource policies, reset, resume, send diagnostic interrupt, set deletion protection, set disk auto delete, set iam policy, set labels, set machine resources, set machine type, set metadata, set min cpu platform, set scheduling, set service account, set shielded instance integrity policy, set tags, simulate maintenance event, start, start with encryption key, stop, suspend, test iam permissions, update, update access config, update display device, update network interface and update shielded instance config
- interconnect attachments
- aggregated list, delete, get, insert, list and patch
- interconnect locations
- get and list
- interconnects
- delete, get, get diagnostics, insert, list and patch
- license codes
- get and test iam permissions
- licenses
- delete, get, get iam policy, insert, list, set iam policy and test iam permissions
- machine images
- delete, get, get iam policy, insert, list, set iam policy and test iam permissions
- machine types
- aggregated list, get and list
- network endpoint groups
- aggregated list, attach network endpoints, delete, detach network endpoints, get, insert, list, list network endpoints and test iam permissions
- network firewall policies
- add association, add rule, clone rules, delete, get, get association, get iam policy, get rule, insert, list, patch, patch rule, remove association, remove rule, set iam policy and test iam permissions
- networks
- add peering, delete, get, get effective firewalls, insert, list, list peering routes, patch, remove peering, switch to custom mode and update peering
- node groups
- add nodes, aggregated list, delete, delete nodes, get, get iam policy, insert, list, list nodes, patch, set iam policy, set node template and test iam permissions
- node templates
- aggregated list, delete, get, get iam policy, insert, list, set iam policy and test iam permissions
- node types
- aggregated list, get and list
- packet mirrorings
- aggregated list, delete, get, insert, list, patch and test iam permissions
- projects
- disable xpn host, disable xpn resource, enable xpn host, enable xpn resource, get, get xpn host, get xpn resources, list xpn hosts, move disk, move instance, set common instance metadata, set default network tier and set usage export bucket
- public advertised prefixes
- delete, get, insert, list and patch
- public delegated prefixes
- aggregated list, delete, get, insert, list and patch
- region autoscalers
- delete, get, insert, list, patch and update
- region backend services
- delete, get, get health, insert, list, patch and update
- region commitments
- aggregated list, get, insert, list and update
- region disk types
- get and list
- region disks
- add resource policies, create snapshot, delete, get, get iam policy, insert, list, remove resource policies, resize, set iam policy, set labels and test iam permissions
- region health check services
- delete, get, insert, list and patch
- region health checks
- delete, get, insert, list, patch and update
- region instance group managers
- abandon instances, apply updates to instances, create instances, delete, delete instances, delete per instance configs, get, insert, list, list errors, list managed instances, list per instance configs, patch, patch per instance configs, recreate instances, resize, set instance template, set target pools and update per instance configs
- region instance groups
- get, list, list instances and set named ports
- region instances
- bulk insert
- region network endpoint groups
- delete, get, insert and list
- region network firewall policies
- add association, add rule, clone rules, delete, get, get association, get effective firewalls, get iam policy, get rule, insert, list, patch, patch rule, remove association, remove rule, set iam policy and test iam permissions
- region notification endpoints
- delete, get, insert and list
- region operations
- delete, get, list and wait
- region ssl certificates
- delete, get, insert and list
- region target http proxies
- delete, get, insert, list and set url map
- region target https proxies
- delete, get, insert, list, set ssl certificates and set url map
- region url maps
- delete, get, insert, list, patch, update and validate
- regions
- get and list
- reservations
- aggregated list, delete, get, get iam policy, insert, list, resize, set iam policy, test iam permissions and update
- resource policies
- aggregated list, delete, get, get iam policy, insert, list, set iam policy and test iam permissions
- routers
- aggregated list, delete, get, get nat mapping info, get router status, insert, list, patch, preview and update
- routes
- delete, get, insert and list
- security policies
- add rule, delete, get, get rule, insert, list, list preconfigured expression sets, patch, patch rule and remove rule
- service attachments
- aggregated list, delete, get, get iam policy, insert, list, patch, set iam policy and test iam permissions
- snapshots
- delete, get, get iam policy, insert, list, set iam policy, set labels and test iam permissions
- ssl certificates
- aggregated list, delete, get, insert and list
- ssl policies
- delete, get, insert, list, list available features and patch
- subnetworks
- aggregated list, delete, expand ip cidr range, get, get iam policy, insert, list, list usable, patch, set iam policy, set private ip google access and test iam permissions
- target grpc proxies
- delete, get, insert, list and patch
- target http proxies
- aggregated list, delete, get, insert, list, patch and set url map
- target https proxies
- aggregated list, delete, get, insert, list, patch, set quic override, set ssl certificates, set ssl policy and set url map
- target instances
- aggregated list, delete, get, insert and list
- target pools
- add health check, add instance, aggregated list, delete, get, get health, insert, list, remove health check, remove instance and set backup
- target ssl proxies
- delete, get, insert, list, set backend service, set proxy header, set ssl certificates and set ssl policy
- target tcp proxies
- delete, get, insert, list, set backend service and set proxy header
- target vpn gateways
- aggregated list, delete, get, insert and list
- url maps
- aggregated list, delete, get, insert, invalidate cache, list, patch, update and validate
- vpn gateways
- aggregated list, delete, get, get status, insert, list, set labels and test iam permissions
- vpn tunnels
- aggregated list, delete, get, insert and list
- zone operations
- delete, get, list and wait
- zones
- get and list
Structure of this Library
The API is structured into the following primary items:
- Hub
- a central object to maintain state and allow accessing all Activities
- creates Method Builders which in turn allow access to individual Call Builders
- Resources
- primary types that you can apply Activities to
- a collection of properties and Parts
- Parts
- a collection of properties
- never directly used in Activities
- Activities
- operations to apply to Resources
All structures are marked with applicable traits to further categorize them and ease browsing.
Generally speaking, you can invoke Activities like this:
let r = hub.resource.activity.doit.await
Or specifically ...
let r = hub.addresses().delete(...).doit().await
let r = hub.addresses().insert(...).doit().await
let r = hub.autoscalers().delete(...).doit().await
let r = hub.autoscalers().insert(...).doit().await
let r = hub.autoscalers().patch(...).doit().await
let r = hub.autoscalers().update(...).doit().await
let r = hub.backend_buckets().add_signed_url_key(...).doit().await
let r = hub.backend_buckets().delete(...).doit().await
let r = hub.backend_buckets().delete_signed_url_key(...).doit().await
let r = hub.backend_buckets().insert(...).doit().await
let r = hub.backend_buckets().patch(...).doit().await
let r = hub.backend_buckets().set_edge_security_policy(...).doit().await
let r = hub.backend_buckets().update(...).doit().await
let r = hub.backend_services().add_signed_url_key(...).doit().await
let r = hub.backend_services().delete(...).doit().await
let r = hub.backend_services().delete_signed_url_key(...).doit().await
let r = hub.backend_services().insert(...).doit().await
let r = hub.backend_services().patch(...).doit().await
let r = hub.backend_services().set_edge_security_policy(...).doit().await
let r = hub.backend_services().set_security_policy(...).doit().await
let r = hub.backend_services().update(...).doit().await
let r = hub.disks().add_resource_policies(...).doit().await
let r = hub.disks().create_snapshot(...).doit().await
let r = hub.disks().delete(...).doit().await
let r = hub.disks().insert(...).doit().await
let r = hub.disks().remove_resource_policies(...).doit().await
let r = hub.disks().resize(...).doit().await
let r = hub.disks().set_labels(...).doit().await
let r = hub.external_vpn_gateways().delete(...).doit().await
let r = hub.external_vpn_gateways().insert(...).doit().await
let r = hub.external_vpn_gateways().set_labels(...).doit().await
let r = hub.firewall_policies().add_association(...).doit().await
let r = hub.firewall_policies().add_rule(...).doit().await
let r = hub.firewall_policies().clone_rules(...).doit().await
let r = hub.firewall_policies().delete(...).doit().await
let r = hub.firewall_policies().insert(...).doit().await
let r = hub.firewall_policies().move_(...).doit().await
let r = hub.firewall_policies().patch(...).doit().await
let r = hub.firewall_policies().patch_rule(...).doit().await
let r = hub.firewall_policies().remove_association(...).doit().await
let r = hub.firewall_policies().remove_rule(...).doit().await
let r = hub.firewalls().delete(...).doit().await
let r = hub.firewalls().insert(...).doit().await
let r = hub.firewalls().patch(...).doit().await
let r = hub.firewalls().update(...).doit().await
let r = hub.forwarding_rules().delete(...).doit().await
let r = hub.forwarding_rules().insert(...).doit().await
let r = hub.forwarding_rules().patch(...).doit().await
let r = hub.forwarding_rules().set_labels(...).doit().await
let r = hub.forwarding_rules().set_target(...).doit().await
let r = hub.global_addresses().delete(...).doit().await
let r = hub.global_addresses().insert(...).doit().await
let r = hub.global_forwarding_rules().delete(...).doit().await
let r = hub.global_forwarding_rules().insert(...).doit().await
let r = hub.global_forwarding_rules().patch(...).doit().await
let r = hub.global_forwarding_rules().set_labels(...).doit().await
let r = hub.global_forwarding_rules().set_target(...).doit().await
let r = hub.global_network_endpoint_groups().attach_network_endpoints(...).doit().await
let r = hub.global_network_endpoint_groups().delete(...).doit().await
let r = hub.global_network_endpoint_groups().detach_network_endpoints(...).doit().await
let r = hub.global_network_endpoint_groups().insert(...).doit().await
let r = hub.global_operations().get(...).doit().await
let r = hub.global_operations().wait(...).doit().await
let r = hub.global_organization_operations().get(...).doit().await
let r = hub.global_public_delegated_prefixes().delete(...).doit().await
let r = hub.global_public_delegated_prefixes().insert(...).doit().await
let r = hub.global_public_delegated_prefixes().patch(...).doit().await
let r = hub.health_checks().delete(...).doit().await
let r = hub.health_checks().insert(...).doit().await
let r = hub.health_checks().patch(...).doit().await
let r = hub.health_checks().update(...).doit().await
let r = hub.http_health_checks().delete(...).doit().await
let r = hub.http_health_checks().insert(...).doit().await
let r = hub.http_health_checks().patch(...).doit().await
let r = hub.http_health_checks().update(...).doit().await
let r = hub.https_health_checks().delete(...).doit().await
let r = hub.https_health_checks().insert(...).doit().await
let r = hub.https_health_checks().patch(...).doit().await
let r = hub.https_health_checks().update(...).doit().await
let r = hub.images().delete(...).doit().await
let r = hub.images().deprecate(...).doit().await
let r = hub.images().insert(...).doit().await
let r = hub.images().patch(...).doit().await
let r = hub.images().set_labels(...).doit().await
let r = hub.instance_group_managers().abandon_instances(...).doit().await
let r = hub.instance_group_managers().apply_updates_to_instances(...).doit().await
let r = hub.instance_group_managers().create_instances(...).doit().await
let r = hub.instance_group_managers().delete(...).doit().await
let r = hub.instance_group_managers().delete_instances(...).doit().await
let r = hub.instance_group_managers().delete_per_instance_configs(...).doit().await
let r = hub.instance_group_managers().insert(...).doit().await
let r = hub.instance_group_managers().patch(...).doit().await
let r = hub.instance_group_managers().patch_per_instance_configs(...).doit().await
let r = hub.instance_group_managers().recreate_instances(...).doit().await
let r = hub.instance_group_managers().resize(...).doit().await
let r = hub.instance_group_managers().set_instance_template(...).doit().await
let r = hub.instance_group_managers().set_target_pools(...).doit().await
let r = hub.instance_group_managers().update_per_instance_configs(...).doit().await
let r = hub.instance_groups().add_instances(...).doit().await
let r = hub.instance_groups().delete(...).doit().await
let r = hub.instance_groups().insert(...).doit().await
let r = hub.instance_groups().remove_instances(...).doit().await
let r = hub.instance_groups().set_named_ports(...).doit().await
let r = hub.instance_templates().delete(...).doit().await
let r = hub.instance_templates().insert(...).doit().await
let r = hub.instances().add_access_config(...).doit().await
let r = hub.instances().add_resource_policies(...).doit().await
let r = hub.instances().attach_disk(...).doit().await
let r = hub.instances().bulk_insert(...).doit().await
let r = hub.instances().delete(...).doit().await
let r = hub.instances().delete_access_config(...).doit().await
let r = hub.instances().detach_disk(...).doit().await
let r = hub.instances().insert(...).doit().await
let r = hub.instances().remove_resource_policies(...).doit().await
let r = hub.instances().reset(...).doit().await
let r = hub.instances().resume(...).doit().await
let r = hub.instances().set_deletion_protection(...).doit().await
let r = hub.instances().set_disk_auto_delete(...).doit().await
let r = hub.instances().set_labels(...).doit().await
let r = hub.instances().set_machine_resources(...).doit().await
let r = hub.instances().set_machine_type(...).doit().await
let r = hub.instances().set_metadata(...).doit().await
let r = hub.instances().set_min_cpu_platform(...).doit().await
let r = hub.instances().set_scheduling(...).doit().await
let r = hub.instances().set_service_account(...).doit().await
let r = hub.instances().set_shielded_instance_integrity_policy(...).doit().await
let r = hub.instances().set_tags(...).doit().await
let r = hub.instances().simulate_maintenance_event(...).doit().await
let r = hub.instances().start(...).doit().await
let r = hub.instances().start_with_encryption_key(...).doit().await
let r = hub.instances().stop(...).doit().await
let r = hub.instances().suspend(...).doit().await
let r = hub.instances().update(...).doit().await
let r = hub.instances().update_access_config(...).doit().await
let r = hub.instances().update_display_device(...).doit().await
let r = hub.instances().update_network_interface(...).doit().await
let r = hub.instances().update_shielded_instance_config(...).doit().await
let r = hub.interconnect_attachments().delete(...).doit().await
let r = hub.interconnect_attachments().insert(...).doit().await
let r = hub.interconnect_attachments().patch(...).doit().await
let r = hub.interconnects().delete(...).doit().await
let r = hub.interconnects().insert(...).doit().await
let r = hub.interconnects().patch(...).doit().await
let r = hub.licenses().delete(...).doit().await
let r = hub.licenses().insert(...).doit().await
let r = hub.machine_images().delete(...).doit().await
let r = hub.machine_images().insert(...).doit().await
let r = hub.network_endpoint_groups().attach_network_endpoints(...).doit().await
let r = hub.network_endpoint_groups().delete(...).doit().await
let r = hub.network_endpoint_groups().detach_network_endpoints(...).doit().await
let r = hub.network_endpoint_groups().insert(...).doit().await
let r = hub.network_firewall_policies().add_association(...).doit().await
let r = hub.network_firewall_policies().add_rule(...).doit().await
let r = hub.network_firewall_policies().clone_rules(...).doit().await
let r = hub.network_firewall_policies().delete(...).doit().await
let r = hub.network_firewall_policies().insert(...).doit().await
let r = hub.network_firewall_policies().patch(...).doit().await
let r = hub.network_firewall_policies().patch_rule(...).doit().await
let r = hub.network_firewall_policies().remove_association(...).doit().await
let r = hub.network_firewall_policies().remove_rule(...).doit().await
let r = hub.networks().add_peering(...).doit().await
let r = hub.networks().delete(...).doit().await
let r = hub.networks().insert(...).doit().await
let r = hub.networks().patch(...).doit().await
let r = hub.networks().remove_peering(...).doit().await
let r = hub.networks().switch_to_custom_mode(...).doit().await
let r = hub.networks().update_peering(...).doit().await
let r = hub.node_groups().add_nodes(...).doit().await
let r = hub.node_groups().delete(...).doit().await
let r = hub.node_groups().delete_nodes(...).doit().await
let r = hub.node_groups().insert(...).doit().await
let r = hub.node_groups().patch(...).doit().await
let r = hub.node_groups().set_node_template(...).doit().await
let r = hub.node_templates().delete(...).doit().await
let r = hub.node_templates().insert(...).doit().await
let r = hub.packet_mirrorings().delete(...).doit().await
let r = hub.packet_mirrorings().insert(...).doit().await
let r = hub.packet_mirrorings().patch(...).doit().await
let r = hub.projects().disable_xpn_host(...).doit().await
let r = hub.projects().disable_xpn_resource(...).doit().await
let r = hub.projects().enable_xpn_host(...).doit().await
let r = hub.projects().enable_xpn_resource(...).doit().await
let r = hub.projects().move_disk(...).doit().await
let r = hub.projects().move_instance(...).doit().await
let r = hub.projects().set_common_instance_metadata(...).doit().await
let r = hub.projects().set_default_network_tier(...).doit().await
let r = hub.projects().set_usage_export_bucket(...).doit().await
let r = hub.public_advertised_prefixes().delete(...).doit().await
let r = hub.public_advertised_prefixes().insert(...).doit().await
let r = hub.public_advertised_prefixes().patch(...).doit().await
let r = hub.public_delegated_prefixes().delete(...).doit().await
let r = hub.public_delegated_prefixes().insert(...).doit().await
let r = hub.public_delegated_prefixes().patch(...).doit().await
let r = hub.region_autoscalers().delete(...).doit().await
let r = hub.region_autoscalers().insert(...).doit().await
let r = hub.region_autoscalers().patch(...).doit().await
let r = hub.region_autoscalers().update(...).doit().await
let r = hub.region_backend_services().delete(...).doit().await
let r = hub.region_backend_services().insert(...).doit().await
let r = hub.region_backend_services().patch(...).doit().await
let r = hub.region_backend_services().update(...).doit().await
let r = hub.region_commitments().insert(...).doit().await
let r = hub.region_commitments().update(...).doit().await
let r = hub.region_disks().add_resource_policies(...).doit().await
let r = hub.region_disks().create_snapshot(...).doit().await
let r = hub.region_disks().delete(...).doit().await
let r = hub.region_disks().insert(...).doit().await
let r = hub.region_disks().remove_resource_policies(...).doit().await
let r = hub.region_disks().resize(...).doit().await
let r = hub.region_disks().set_labels(...).doit().await
let r = hub.region_health_check_services().delete(...).doit().await
let r = hub.region_health_check_services().insert(...).doit().await
let r = hub.region_health_check_services().patch(...).doit().await
let r = hub.region_health_checks().delete(...).doit().await
let r = hub.region_health_checks().insert(...).doit().await
let r = hub.region_health_checks().patch(...).doit().await
let r = hub.region_health_checks().update(...).doit().await
let r = hub.region_instance_group_managers().abandon_instances(...).doit().await
let r = hub.region_instance_group_managers().apply_updates_to_instances(...).doit().await
let r = hub.region_instance_group_managers().create_instances(...).doit().await
let r = hub.region_instance_group_managers().delete(...).doit().await
let r = hub.region_instance_group_managers().delete_instances(...).doit().await
let r = hub.region_instance_group_managers().delete_per_instance_configs(...).doit().await
let r = hub.region_instance_group_managers().insert(...).doit().await
let r = hub.region_instance_group_managers().patch(...).doit().await
let r = hub.region_instance_group_managers().patch_per_instance_configs(...).doit().await
let r = hub.region_instance_group_managers().recreate_instances(...).doit().await
let r = hub.region_instance_group_managers().resize(...).doit().await
let r = hub.region_instance_group_managers().set_instance_template(...).doit().await
let r = hub.region_instance_group_managers().set_target_pools(...).doit().await
let r = hub.region_instance_group_managers().update_per_instance_configs(...).doit().await
let r = hub.region_instance_groups().set_named_ports(...).doit().await
let r = hub.region_instances().bulk_insert(...).doit().await
let r = hub.region_network_endpoint_groups().delete(...).doit().await
let r = hub.region_network_endpoint_groups().insert(...).doit().await
let r = hub.region_network_firewall_policies().add_association(...).doit().await
let r = hub.region_network_firewall_policies().add_rule(...).doit().await
let r = hub.region_network_firewall_policies().clone_rules(...).doit().await
let r = hub.region_network_firewall_policies().delete(...).doit().await
let r = hub.region_network_firewall_policies().insert(...).doit().await
let r = hub.region_network_firewall_policies().patch(...).doit().await
let r = hub.region_network_firewall_policies().patch_rule(...).doit().await
let r = hub.region_network_firewall_policies().remove_association(...).doit().await
let r = hub.region_network_firewall_policies().remove_rule(...).doit().await
let r = hub.region_notification_endpoints().delete(...).doit().await
let r = hub.region_notification_endpoints().insert(...).doit().await
let r = hub.region_operations().get(...).doit().await
let r = hub.region_operations().wait(...).doit().await
let r = hub.region_ssl_certificates().delete(...).doit().await
let r = hub.region_ssl_certificates().insert(...).doit().await
let r = hub.region_target_http_proxies().delete(...).doit().await
let r = hub.region_target_http_proxies().insert(...).doit().await
let r = hub.region_target_http_proxies().set_url_map(...).doit().await
let r = hub.region_target_https_proxies().delete(...).doit().await
let r = hub.region_target_https_proxies().insert(...).doit().await
let r = hub.region_target_https_proxies().set_ssl_certificates(...).doit().await
let r = hub.region_target_https_proxies().set_url_map(...).doit().await
let r = hub.region_url_maps().delete(...).doit().await
let r = hub.region_url_maps().insert(...).doit().await
let r = hub.region_url_maps().patch(...).doit().await
let r = hub.region_url_maps().update(...).doit().await
let r = hub.reservations().delete(...).doit().await
let r = hub.reservations().insert(...).doit().await
let r = hub.reservations().resize(...).doit().await
let r = hub.reservations().update(...).doit().await
let r = hub.resource_policies().delete(...).doit().await
let r = hub.resource_policies().insert(...).doit().await
let r = hub.routers().delete(...).doit().await
let r = hub.routers().insert(...).doit().await
let r = hub.routers().patch(...).doit().await
let r = hub.routers().update(...).doit().await
let r = hub.routes().delete(...).doit().await
let r = hub.routes().insert(...).doit().await
let r = hub.security_policies().add_rule(...).doit().await
let r = hub.security_policies().delete(...).doit().await
let r = hub.security_policies().insert(...).doit().await
let r = hub.security_policies().patch(...).doit().await
let r = hub.security_policies().patch_rule(...).doit().await
let r = hub.security_policies().remove_rule(...).doit().await
let r = hub.service_attachments().delete(...).doit().await
let r = hub.service_attachments().insert(...).doit().await
let r = hub.service_attachments().patch(...).doit().await
let r = hub.snapshots().delete(...).doit().await
let r = hub.snapshots().insert(...).doit().await
let r = hub.snapshots().set_labels(...).doit().await
let r = hub.ssl_certificates().delete(...).doit().await
let r = hub.ssl_certificates().insert(...).doit().await
let r = hub.ssl_policies().delete(...).doit().await
let r = hub.ssl_policies().insert(...).doit().await
let r = hub.ssl_policies().patch(...).doit().await
let r = hub.subnetworks().delete(...).doit().await
let r = hub.subnetworks().expand_ip_cidr_range(...).doit().await
let r = hub.subnetworks().insert(...).doit().await
let r = hub.subnetworks().patch(...).doit().await
let r = hub.subnetworks().set_private_ip_google_access(...).doit().await
let r = hub.target_grpc_proxies().delete(...).doit().await
let r = hub.target_grpc_proxies().insert(...).doit().await
let r = hub.target_grpc_proxies().patch(...).doit().await
let r = hub.target_http_proxies().delete(...).doit().await
let r = hub.target_http_proxies().insert(...).doit().await
let r = hub.target_http_proxies().patch(...).doit().await
let r = hub.target_http_proxies().set_url_map(...).doit().await
let r = hub.target_https_proxies().delete(...).doit().await
let r = hub.target_https_proxies().insert(...).doit().await
let r = hub.target_https_proxies().patch(...).doit().await
let r = hub.target_https_proxies().set_quic_override(...).doit().await
let r = hub.target_https_proxies().set_ssl_certificates(...).doit().await
let r = hub.target_https_proxies().set_ssl_policy(...).doit().await
let r = hub.target_https_proxies().set_url_map(...).doit().await
let r = hub.target_instances().delete(...).doit().await
let r = hub.target_instances().insert(...).doit().await
let r = hub.target_pools().add_health_check(...).doit().await
let r = hub.target_pools().add_instance(...).doit().await
let r = hub.target_pools().delete(...).doit().await
let r = hub.target_pools().insert(...).doit().await
let r = hub.target_pools().remove_health_check(...).doit().await
let r = hub.target_pools().remove_instance(...).doit().await
let r = hub.target_pools().set_backup(...).doit().await
let r = hub.target_ssl_proxies().delete(...).doit().await
let r = hub.target_ssl_proxies().insert(...).doit().await
let r = hub.target_ssl_proxies().set_backend_service(...).doit().await
let r = hub.target_ssl_proxies().set_proxy_header(...).doit().await
let r = hub.target_ssl_proxies().set_ssl_certificates(...).doit().await
let r = hub.target_ssl_proxies().set_ssl_policy(...).doit().await
let r = hub.target_tcp_proxies().delete(...).doit().await
let r = hub.target_tcp_proxies().insert(...).doit().await
let r = hub.target_tcp_proxies().set_backend_service(...).doit().await
let r = hub.target_tcp_proxies().set_proxy_header(...).doit().await
let r = hub.target_vpn_gateways().delete(...).doit().await
let r = hub.target_vpn_gateways().insert(...).doit().await
let r = hub.url_maps().delete(...).doit().await
let r = hub.url_maps().insert(...).doit().await
let r = hub.url_maps().invalidate_cache(...).doit().await
let r = hub.url_maps().patch(...).doit().await
let r = hub.url_maps().update(...).doit().await
let r = hub.vpn_gateways().delete(...).doit().await
let r = hub.vpn_gateways().insert(...).doit().await
let r = hub.vpn_gateways().set_labels(...).doit().await
let r = hub.vpn_tunnels().delete(...).doit().await
let r = hub.vpn_tunnels().insert(...).doit().await
let r = hub.zone_operations().get(...).doit().await
let r = hub.zone_operations().wait(...).doit().await
The resource()
and activity(...)
calls create builders. The second one dealing with Activities
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
specified right away (i.e. (...)
), whereas all optional ones can be build up as desired.
The doit()
method performs the actual communication with the server and returns the respective result.
Usage
Setting up your Project
To use this library, you would put the following lines into your Cargo.toml
file:
[]
= "*"
= "^1.0"
= "^1.0"
A complete example
extern crate hyper;
extern crate hyper_rustls;
extern crate google_compute1 as compute1;
use Instance;
use ;
use Default;
use ;
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
// `client_secret`, among other things.
let secret: ApplicationSecret = Default default;
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
// unless you replace `None` with the desired Flow.
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
// retrieve them from storage.
let auth = builder.build.await.unwrap;
let mut hub = new;
// As the method needs a request, you would usually fill it with the desired information
// into the respective structure. Some of the parts shown here might not be applicable !
// Values shown here are possibly random and not representative !
let mut req = default;
// You can configure optional parameters by calling the respective setters at will, and
// execute the final call using `doit()`.
// Values shown here are possibly random and not representative !
let result = hub.instances.update
.request_id
.most_disruptive_allowed_action
.minimal_action
.doit.await;
match result
Handling Errors
All errors produced by the system are provided either as Result enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the Hub Delegate, or the Authenticator Delegate.
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors.
Uploads and Downloads
If a method supports downloads, the response body, which is part of the Result, should be
read by you to obtain the media.
If such a method also supports a Response Result, it will return that by default.
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
this call: .param("alt", "media")
.
Methods supporting uploads can do so using up to 2 different protocols:
simple and resumable. The distinctiveness of each is represented by customized
doit(...)
methods, which are then named upload(...)
and upload_resumable(...)
respectively.
Customization and Callbacks
You may alter the way an doit()
method is called by providing a delegate to the
Method Builder before making the final doit()
call.
Respective methods will be called to provide progress information, as well as determine whether the system should
retry on failure.
The delegate trait is default-implemented, allowing you to customize it with minimal effort.
Optional Parts in Server-Requests
All structures provided by this library are made to be encodable and decodable via json. Optionals are used to indicate that partial requests are responses are valid. Most optionals are are considered Parts which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response.
Builder Arguments
Using method builders, you are able to prepare an action call by repeatedly calling it's methods. These will always take a single argument, for which the following statements are true.
- PODs are handed by copy
- strings are passed as
&str
- request values are moved
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
License
The compute1 library was generated by Sebastian Thiel, and is placed under the MIT license. You can read the full text at the repository's license file.