Minor schema/docs update to SslCertificate. (#89)

<!-- This change is generated by MagicModules. -->
/cc @rileykarson
This commit is contained in:
The Magician 2018-09-12 14:50:22 -07:00 committed by Alex Stephen
parent 0a18332815
commit dae82b274d
2 changed files with 113 additions and 116 deletions

View file

@ -31,9 +31,9 @@ DOCUMENTATION = '''
--- ---
module: gcp_compute_ssl_certificate module: gcp_compute_ssl_certificate
description: description:
- An SslCertificate resource, used for HTTPS load balancing. This resource provides - An SslCertificate resource, used for HTTPS load balancing. This resource provides
a mechanism to upload an SSL key and certificate to the load balancer to serve secure a mechanism to upload an SSL key and certificate to the load balancer to serve secure
connections from the user. connections from the user.
short_description: Creates a GCP SslCertificate short_description: Creates a GCP SslCertificate
version_added: 2.6 version_added: 2.6
author: Google Inc. (@googlecloudplatform) author: Google Inc. (@googlecloudplatform)
@ -42,40 +42,38 @@ requirements:
- requests >= 2.18.4 - requests >= 2.18.4
- google-auth >= 1.3.0 - google-auth >= 1.3.0
options: options:
state: state:
description:
- Whether the given object should exist in GCP
choices: ['present', 'absent']
default: 'present'
certificate:
description:
- The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert.
required: true
description: description:
- Whether the given object should exist in GCP description:
choices: - An optional description of this resource.
- present required: false
- absent name:
default: present description:
certificate: - Name of the resource. Provided by the client when the resource is created. The name
description: must be 1-63 characters long, and comply with RFC1035. Specifically, the name must
- The certificate in PEM format. be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`
- The certificate chain must be no greater than 5 certs long. which means the first character must be a lowercase letter, and all following characters
- The chain must include at least one intermediate cert. must be a dash, lowercase letter, or digit, except the last character, which cannot
required: true be a dash.
description: required: false
description: private_key:
- An optional description of this resource. description:
required: false - The write-only private key in PEM format.
name: required: true
description:
- Name of the resource. Provided by the client when the resource is created. The
name must be 1-63 characters long, and comply with RFC1035. Specifically, the
name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`
which means the first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash.
required: false
private_key:
description:
- The write-only private key in PEM format.
required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/sslCertificates)' - "API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/sslCertificates)"
- 'Official Documentation: U(https://cloud.google.com/load-balancing/docs/ssl-certificates)' - "Official Documentation: U(https://cloud.google.com/load-balancing/docs/ssl-certificates)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -114,43 +112,43 @@ EXAMPLES = '''
''' '''
RETURN = ''' RETURN = '''
certificate: certificate:
description: description:
- The certificate in PEM format. - The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long. - The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert. - The chain must include at least one intermediate cert.
returned: success returned: success
type: str type: str
creationTimestamp: creation_timestamp:
description: description:
- Creation timestamp in RFC3339 text format. - Creation timestamp in RFC3339 text format.
returned: success returned: success
type: str type: str
description: description:
description: description:
- An optional description of this resource. - An optional description of this resource.
returned: success returned: success
type: str type: str
id: id:
description: description:
- The unique identifier for the resource. - The unique identifier for the resource.
returned: success returned: success
type: int type: int
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The name
name must be 1-63 characters long, and comply with RFC1035. Specifically, the must be 1-63 characters long, and comply with RFC1035. Specifically, the name must
name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`
which means the first character must be a lowercase letter, and all following which means the first character must be a lowercase letter, and all following characters
characters must be a dash, lowercase letter, or digit, except the last character, must be a dash, lowercase letter, or digit, except the last character, which cannot
which cannot be a dash. be a dash.
returned: success returned: success
type: str type: str
privateKey: private_key:
description: description:
- The write-only private key in PEM format. - The write-only private key in PEM format.
returned: success returned: success
type: str type: str
''' '''
################################################################################ ################################################################################
@ -175,7 +173,7 @@ def main():
certificate=dict(required=True, type='str'), certificate=dict(required=True, type='str'),
description=dict(type='str'), description=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
private_key=dict(required=True, type='str'), private_key=dict(required=True, type='str')
) )
) )
@ -216,8 +214,7 @@ def create(module, link, kind):
def update(module, link, kind): def update(module, link, kind):
delete(module, self_link(module), kind) module.fail_json(msg="SslCertificate cannot be edited")
create(module, collection(module), kind)
def delete(module, link, kind): def delete(module, link, kind):

View file

@ -59,48 +59,48 @@ EXAMPLES = '''
''' '''
RETURN = ''' RETURN = '''
resources: items:
description: List of resources description: List of items
returned: always returned: always
type: complex type: complex
contains: contains:
certificate: certificate:
description: description:
- The certificate in PEM format. - The certificate in PEM format.
- The certificate chain must be no greater than 5 certs long. - The certificate chain must be no greater than 5 certs long.
- The chain must include at least one intermediate cert. - The chain must include at least one intermediate cert.
returned: success returned: success
type: str type: str
creationTimestamp: creation_timestamp:
description: description:
- Creation timestamp in RFC3339 text format. - Creation timestamp in RFC3339 text format.
returned: success returned: success
type: str type: str
description: description:
description: description:
- An optional description of this resource. - An optional description of this resource.
returned: success returned: success
type: str type: str
id: id:
description: description:
- The unique identifier for the resource. - The unique identifier for the resource.
returned: success returned: success
type: int type: int
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. - Name of the resource. Provided by the client when the resource is created. The name
The name must be 1-63 characters long, and comply with RFC1035. Specifically, must be 1-63 characters long, and comply with RFC1035. Specifically, the name must
the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`
which means the first character must be a lowercase letter, and all following which means the first character must be a lowercase letter, and all following characters
characters must be a dash, lowercase letter, or digit, except the last character, must be a dash, lowercase letter, or digit, except the last character, which cannot
which cannot be a dash. be a dash.
returned: success returned: success
type: str type: str
privateKey: private_key:
description: description:
- The write-only private key in PEM format. - The write-only private key in PEM format.
returned: success returned: success
type: str type: str
''' '''
################################################################################ ################################################################################