text: # coding=utf-8
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
  
  import pulumi
  import pulumi.runtime
  from .. import utilities, tables
  
  class Key(pulumi.CustomResource):
      """
      Creates and manages service account key-pairs, which allow the user to establish identity of a service account outside of GCP. For more information, see [the official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and [API](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys).
      
      """
      def __init__(__self__, __name__, __opts__=None, key_algorithm=None, pgp_key=None, private_key_type=None, public_key_type=None, service_account_id=None):
          """Create a Key resource with the given unique name, props, and options."""
          if not __name__:
              raise TypeError('Missing resource name argument (for URN creation)')
          if not isinstance(__name__, str):
              raise TypeError('Expected resource name to be a string')
          if __opts__ and not isinstance(__opts__, pulumi.ResourceOptions):
              raise TypeError('Expected resource options to be a ResourceOptions instance')
  
          __props__ = dict()
  
          __props__['key_algorithm'] = key_algorithm
  
          __props__['pgp_key'] = pgp_key
  
          __props__['private_key_type'] = private_key_type
  
          __props__['public_key_type'] = public_key_type
  
          if not service_account_id:
              raise TypeError('Missing required property service_account_id')
          __props__['service_account_id'] = service_account_id
  
          __props__['name'] = None
          __props__['private_key'] = None
          __props__['private_key_encrypted'] = None
          __props__['private_key_fingerprint'] = None
          __props__['public_key'] = None
          __props__['valid_after'] = None
          __props__['valid_before'] = None
  
          super(Key, __self__).__init__(
              'gcp:serviceAccount/key:Key',
              __name__,
              __props__,
              __opts__)
  
  
      def translate_output_property(self, prop):
          return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop
  
      def translate_input_property(self, prop):
          return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
  
  