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
description:
- 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
connections from the user.
- 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
connections from the user.
short_description: Creates a GCP SslCertificate
version_added: 2.6
author: Google Inc. (@googlecloudplatform)
@ -42,40 +42,38 @@ requirements:
- requests >= 2.18.4
- google-auth >= 1.3.0
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:
- 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:
- An optional description of this resource.
required: false
name:
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
description:
- An optional description of this resource.
required: false
name:
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
notes:
- '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)'
- "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)"
'''
EXAMPLES = '''
@ -114,43 +112,43 @@ EXAMPLES = '''
'''
RETURN = '''
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.
returned: success
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
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.
returned: success
type: str
privateKey:
description:
- The write-only private key in PEM format.
returned: success
type: str
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.
returned: success
type: str
creation_timestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
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.
returned: success
type: str
private_key:
description:
- The write-only private key in PEM format.
returned: success
type: str
'''
################################################################################
@ -175,7 +173,7 @@ def main():
certificate=dict(required=True, type='str'),
description=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):
delete(module, self_link(module), kind)
create(module, collection(module), kind)
module.fail_json(msg="SslCertificate cannot be edited")
def delete(module, link, kind):

View file

@ -59,48 +59,48 @@ EXAMPLES = '''
'''
RETURN = '''
resources:
description: List of resources
returned: always
type: complex
contains:
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.
returned: success
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
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.
returned: success
type: str
privateKey:
description:
- The write-only private key in PEM format.
returned: success
type: str
items:
description: List of items
returned: always
type: complex
contains:
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.
returned: success
type: str
creation_timestamp:
description:
- Creation timestamp in RFC3339 text format.
returned: success
type: str
description:
description:
- An optional description of this resource.
returned: success
type: str
id:
description:
- The unique identifier for the resource.
returned: success
type: int
name:
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.
returned: success
type: str
private_key:
description:
- The write-only private key in PEM format.
returned: success
type: str
'''
################################################################################