mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 10:50:28 -07:00
add storage bucket access control (#13)
add storage bucket access control
This commit is contained in:
commit
d28884ddfc
1 changed files with 2 additions and 28 deletions
|
@ -77,28 +77,6 @@ options:
|
|||
the entity would be domain-example.com.
|
||||
required: true
|
||||
type: str
|
||||
entity_id:
|
||||
description:
|
||||
- The ID for the entity.
|
||||
required: false
|
||||
type: str
|
||||
project_team:
|
||||
description:
|
||||
- The project team associated with the entity.
|
||||
required: false
|
||||
type: dict
|
||||
suboptions:
|
||||
project_number:
|
||||
description:
|
||||
- The project team associated with the entity.
|
||||
required: false
|
||||
type: str
|
||||
team:
|
||||
description:
|
||||
- The team.
|
||||
- 'Some valid choices include: "editors", "owners", "viewers"'
|
||||
required: false
|
||||
type: str
|
||||
role:
|
||||
description:
|
||||
- The access permission for the entity.
|
||||
|
@ -251,8 +229,6 @@ def main():
|
|||
state=dict(default='present', choices=['present', 'absent'], type='str'),
|
||||
bucket=dict(required=True, type='dict'),
|
||||
entity=dict(required=True, type='str'),
|
||||
entity_id=dict(type='str'),
|
||||
project_team=dict(type='dict', options=dict(project_number=dict(type='str'), team=dict(type='str'))),
|
||||
role=dict(type='str'),
|
||||
)
|
||||
)
|
||||
|
@ -308,8 +284,6 @@ def resource_to_request(module):
|
|||
u'kind': 'storage#bucketAccessControl',
|
||||
u'bucket': replace_resource_dict(module.params.get(u'bucket', {}), 'name'),
|
||||
u'entity': module.params.get('entity'),
|
||||
u'entityId': module.params.get('entity_id'),
|
||||
u'projectTeam': BucketAccessControlProjectteam(module.params.get('project_team', {}), module).to_request(),
|
||||
u'role': module.params.get('role'),
|
||||
}
|
||||
return_vals = {}
|
||||
|
@ -378,10 +352,10 @@ def is_different(module, response):
|
|||
# This is for doing comparisons with Ansible's current parameters.
|
||||
def response_to_hash(module, response):
|
||||
return {
|
||||
u'bucket': response.get(u'bucket'),
|
||||
u'bucket': replace_resource_dict(module.params.get(u'bucket', {}), 'name'),
|
||||
u'domain': response.get(u'domain'),
|
||||
u'email': response.get(u'email'),
|
||||
u'entity': response.get(u'entity'),
|
||||
u'entity': module.params.get('entity'),
|
||||
u'entityId': response.get(u'entityId'),
|
||||
u'id': response.get(u'id'),
|
||||
u'projectTeam': BucketAccessControlProjectteam(response.get(u'projectTeam', {}), module).from_response(),
|
||||
|
|
Loading…
Add table
Reference in a new issue