blob: 3ab5cc6cb6a0f4bca62efb59e2a2b4cbb75333e7 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="sqladmin_v1.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1.connect.html">connect</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#generateEphemeralCert">generateEphemeralCert(project, instance, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.</p>
<p class="toc_element">
<code><a href="#get">get(project, instance, readTime=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves connect settings about a Cloud SQL instance.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="generateEphemeralCert">generateEphemeralCert(project, instance, body=None, x__xgafv=None)</code>
<pre>Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.
Args:
project: string, Project ID of the project that contains the instance. (required)
instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
body: object, The request body.
The object takes the form of:
{ # Ephemeral certificate creation request.
&quot;access_token&quot;: &quot;A String&quot;, # Optional. Access token to include in the signed certificate.
&quot;public_key&quot;: &quot;A String&quot;, # PEM encoded public key to include in the signed certificate.
&quot;readTime&quot;: &quot;A String&quot;, # Optional. Optional snapshot read timestamp to trade freshness for performance.
&quot;validDuration&quot;: &quot;A String&quot;, # Optional. If set, it will contain the cert valid duration.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Ephemeral certificate creation request.
&quot;ephemeralCert&quot;: { # SslCerts Resource # Generated cert
&quot;cert&quot;: &quot;A String&quot;, # PEM representation.
&quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
&quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
&quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**
&quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
&quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
&quot;kind&quot;: &quot;A String&quot;, # This is always **sql#sslCert**.
&quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
&quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
},
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(project, instance, readTime=None, x__xgafv=None)</code>
<pre>Retrieves connect settings about a Cloud SQL instance.
Args:
project: string, Project ID of the project that contains the instance. (required)
instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
readTime: string, Optional. Optional snapshot read timestamp to trade freshness for performance.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Connect settings retrieval response.
&quot;backendType&quot;: &quot;A String&quot;, # **SECOND_GEN**: Cloud SQL database instance. **EXTERNAL**: A database server that is not managed by Google. This property is read-only; use the **tier** property in the **settings** object to determine the database type.
&quot;databaseVersion&quot;: &quot;A String&quot;, # The database engine type and version. The **databaseVersion** field cannot be changed after instance creation. MySQL instances: **MYSQL_8_0**, **MYSQL_5_7** (default), or **MYSQL_5_6**. PostgreSQL instances: **POSTGRES_9_6**, **POSTGRES_10**, **POSTGRES_11** or **POSTGRES_12** (default). SQL Server instances: **SQLSERVER_2017_STANDARD** (default), **SQLSERVER_2017_ENTERPRISE**, **SQLSERVER_2017_EXPRESS**, or **SQLSERVER_2017_WEB**.
&quot;ipAddresses&quot;: [ # The assigned IP addresses for the instance.
{ # Database instance IP Mapping.
&quot;ipAddress&quot;: &quot;A String&quot;, # The IP address assigned.
&quot;timeToRetire&quot;: &quot;A String&quot;, # The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. This field is only available when the IP is scheduled to be retired.
&quot;type&quot;: &quot;A String&quot;, # The type of this IP address. A **PRIMARY** address is a public address that can accept incoming connections. A **PRIVATE** address is a private address that can accept incoming connections. An **OUTGOING** address is the source address of connections originating from the instance, if supported.
},
],
&quot;kind&quot;: &quot;A String&quot;, # This is always `sql#connectSettings`.
&quot;region&quot;: &quot;A String&quot;, # The cloud region for the instance. e.g. **us-central1**, **europe-west1**. The region cannot be changed after instance creation.
&quot;serverCaCert&quot;: { # SslCerts Resource # SSL configuration.
&quot;cert&quot;: &quot;A String&quot;, # PEM representation.
&quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
&quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
&quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**
&quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
&quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
&quot;kind&quot;: &quot;A String&quot;, # This is always **sql#sslCert**.
&quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
&quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
},
}</pre>
</div>
</body></html>