examples showing an improper auth value (#87)

<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
This commit is contained in:
The Magician 2018-09-07 14:15:36 -07:00 committed by Alex Stephen
commit 0a18332815
98 changed files with 2171 additions and 1727 deletions

View file

@ -61,18 +61,11 @@ options:
description:
- The name of the bucket.
- 'This field represents a link to a Bucket resource in GCP. It can be specified
in two ways. First, you can place in the name of the resource here as a
string Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket
task and then set this bucket field to "{{ name-of-resource }}"'
in two ways. First, you can place a dictionary with key ''name'' and value
of your resource''s name Alternatively, you can add `register: name-of-resource`
to a gcp_storage_bucket task and then set this bucket field to "{{ name-of-resource
}}"'
required: true
domain:
description:
- The domain associated with the entity.
required: false
email:
description:
- The email address associated with the entity.
required: false
entity:
description:
- 'The entity holding the permission, in one of the following forms: user-userId
@ -87,10 +80,6 @@ options:
description:
- The ID for the entity.
required: false
id:
description:
- The ID of the access-control entry.
required: false
project_team:
description:
- The project team associated with the entity.
@ -152,18 +141,11 @@ options:
description:
- The name of the bucket.
- 'This field represents a link to a Bucket resource in GCP. It can be specified
in two ways. First, you can place in the name of the resource here as a
string Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket
task and then set this bucket field to "{{ name-of-resource }}"'
in two ways. First, you can place a dictionary with key ''name'' and value
of your resource''s name Alternatively, you can add `register: name-of-resource`
to a gcp_storage_bucket task and then set this bucket field to "{{ name-of-resource
}}"'
required: true
domain:
description:
- The domain associated with the entity.
required: false
email:
description:
- The email address associated with the entity.
required: false
entity:
description:
- 'The entity holding the permission, in one of the following forms: * user-{{userId}}
@ -172,39 +154,10 @@ options:
(such as "domain-example.com") * project-team-{{projectId}} * allUsers *
allAuthenticatedUsers .'
required: true
entity_id:
description:
- The ID for the entity.
required: false
generation:
description:
- The content generation of the object, if applied to an object.
required: false
id:
description:
- The ID of the access-control entry.
required: false
object:
description:
- The name of the object, if applied to an object.
required: false
project_team:
description:
- The project team associated with the entity.
required: false
suboptions:
project_number:
description:
- The project team associated with the entity.
required: false
team:
description:
- The team.
required: false
choices:
- editors
- owners
- viewers
role:
description:
- The access permission for the entity.
@ -313,10 +266,6 @@ options:
description:
- The entity, in the form project-owner-projectId.
required: false
entity_id:
description:
- The ID for the entity.
required: false
storage_class:
description:
- The bucket's default storage class, used whenever no storageClass is specified
@ -412,7 +361,7 @@ acl:
description:
- The name of the bucket.
returned: success
type: str
type: dict
domain:
description:
- The domain associated with the entity.
@ -506,7 +455,7 @@ defaultObjectAcl:
description:
- The name of the bucket.
returned: success
type: str
type: dict
domain:
description:
- The domain associated with the entity.
@ -793,12 +742,9 @@ def main():
type='list',
elements='dict',
options=dict(
bucket=dict(required=True),
domain=dict(type='str'),
email=dict(type='str'),
bucket=dict(required=True, type='dict'),
entity=dict(required=True, type='str'),
entity_id=dict(type='str'),
id=dict(type='str'),
project_team=dict(
type='dict', options=dict(project_number=dict(type='str'), team=dict(type='str', choices=['editors', 'owners', 'viewers']))
),
@ -819,17 +765,9 @@ def main():
type='list',
elements='dict',
options=dict(
bucket=dict(required=True),
domain=dict(type='str'),
email=dict(type='str'),
bucket=dict(required=True, type='dict'),
entity=dict(required=True, type='str'),
entity_id=dict(type='str'),
generation=dict(type='int'),
id=dict(type='str'),
object=dict(type='str'),
project_team=dict(
type='dict', options=dict(project_number=dict(type='str'), team=dict(type='str', choices=['editors', 'owners', 'viewers']))
),
role=dict(required=True, type='str', choices=['OWNER', 'READER']),
),
),
@ -861,7 +799,7 @@ def main():
logging=dict(type='dict', options=dict(log_bucket=dict(type='str'), log_object_prefix=dict(type='str'))),
metageneration=dict(type='int'),
name=dict(type='str'),
owner=dict(type='dict', options=dict(entity=dict(type='str'), entity_id=dict(type='str'))),
owner=dict(type='dict', options=dict(entity=dict(type='str'))),
storage_class=dict(type='str', choices=['MULTI_REGIONAL', 'REGIONAL', 'STANDARD', 'NEARLINE', 'COLDLINE', 'DURABLE_REDUCED_AVAILABILITY']),
versioning=dict(type='dict', options=dict(enabled=dict(type='bool'))),
website=dict(type='dict', options=dict(main_page_suffix=dict(type='str'), not_found_page=dict(type='str'))),
@ -1043,11 +981,8 @@ class BucketAclArray(object):
return remove_nones_from_dict(
{
u'bucket': replace_resource_dict(item.get(u'bucket', {}), 'name'),
u'domain': item.get('domain'),
u'email': item.get('email'),
u'entity': item.get('entity'),
u'entityId': item.get('entity_id'),
u'id': item.get('id'),
u'projectTeam': BucketProjectteam(item.get('project_team', {}), self.module).to_request(),
u'role': item.get('role'),
}
@ -1057,11 +992,8 @@ class BucketAclArray(object):
return remove_nones_from_dict(
{
u'bucket': item.get(u'bucket'),
u'domain': item.get(u'domain'),
u'email': item.get(u'email'),
u'entity': item.get(u'entity'),
u'entityId': item.get(u'entityId'),
u'id': item.get(u'id'),
u'projectTeam': BucketProjectteam(item.get(u'projectTeam', {}), self.module).from_response(),
u'role': item.get(u'role'),
}
@ -1148,32 +1080,15 @@ class BucketDefaultobjectaclArray(object):
return remove_nones_from_dict(
{
u'bucket': replace_resource_dict(item.get(u'bucket', {}), 'name'),
u'domain': item.get('domain'),
u'email': item.get('email'),
u'entity': item.get('entity'),
u'entityId': item.get('entity_id'),
u'generation': item.get('generation'),
u'id': item.get('id'),
u'object': item.get('object'),
u'projectTeam': BucketProjectteam(item.get('project_team', {}), self.module).to_request(),
u'role': item.get('role'),
}
)
def _response_from_item(self, item):
return remove_nones_from_dict(
{
u'bucket': item.get(u'bucket'),
u'domain': item.get(u'domain'),
u'email': item.get(u'email'),
u'entity': item.get(u'entity'),
u'entityId': item.get(u'entityId'),
u'generation': item.get(u'generation'),
u'id': item.get(u'id'),
u'object': item.get(u'object'),
u'projectTeam': BucketProjectteam(item.get(u'projectTeam', {}), self.module).from_response(),
u'role': item.get(u'role'),
}
{u'bucket': item.get(u'bucket'), u'entity': item.get(u'entity'), u'object': item.get(u'object'), u'role': item.get(u'role')}
)
@ -1314,10 +1229,10 @@ class BucketOwner(object):
self.request = {}
def to_request(self):
return remove_nones_from_dict({u'entity': self.request.get('entity'), u'entityId': self.request.get('entity_id')})
return remove_nones_from_dict({u'entity': self.request.get('entity')})
def from_response(self):
return remove_nones_from_dict({u'entity': self.request.get(u'entity'), u'entityId': self.request.get(u'entityId')})
return remove_nones_from_dict({u'entity': self.request.get(u'entity')})
class BucketVersioning(object):