code: def to_cloudformation(self, **kwargs):
          
          resources = []
  
          api_generator = ApiGenerator(self.logical_id,
                                       self.CacheClusterEnabled,
                                       self.CacheClusterSize,
                                       self.Variables,
                                       self.depends_on,
                                       self.DefinitionBody,
                                       self.DefinitionUri,
                                       self.Name,
                                       self.StageName,
                                       endpoint_configuration=self.EndpointConfiguration,
                                       method_settings=self.MethodSettings,
                                       binary_media=self.BinaryMediaTypes,
                                       minimum_compression_size=self.MinimumCompressionSize,
                                       cors=self.Cors,
                                       auth=self.Auth,
                                       gateway_responses=self.GatewayResponses,
                                       access_log_setting=self.AccessLogSetting,
                                       canary_setting=self.CanarySetting,
                                       tracing_enabled=self.TracingEnabled,
                                       resource_attributes=self.resource_attributes,
                                       passthrough_resource_attributes=self.get_passthrough_resource_attributes())
  
          rest_api, deployment, stage, permissions = api_generator.to_cloudformation()
  
          resources.extend([rest_api, deployment, stage])
          resources.extend(permissions)
  
          return resources
docs: Returns the API Gateway RestApi, Deployment, and Stage to which this SAM Api corresponds.
  
          :param dict kwargs: already-converted resources that may need to be modified when converting this \
          macro to pure CloudFormation
          :returns: a list of vanilla CloudFormation Resources, to which this Function expands
          :rtype: list