Update azure_rm_storageaccount related document (#58313)
* Update azure_rm_storageaccount and azure_rm_storageblob module documentation
This commit is contained in:
parent
3a919d4bec
commit
c86c079837
3 changed files with 259 additions and 108 deletions
|
@ -18,7 +18,7 @@ DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: azure_rm_storageaccount
|
module: azure_rm_storageaccount
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
short_description: Manage Azure storage accounts.
|
short_description: Manage Azure storage accounts
|
||||||
description:
|
description:
|
||||||
- Create, update or delete a storage account.
|
- Create, update or delete a storage account.
|
||||||
options:
|
options:
|
||||||
|
@ -33,20 +33,19 @@ options:
|
||||||
- Name of the storage account to update or create.
|
- Name of the storage account to update or create.
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Assert the state of the storage account. Use C(present) to create or update a storage account and
|
- State of the storage account. Use C(present) to create or update a storage account and use C(absent) to delete an account.
|
||||||
C(absent) to delete an account.
|
|
||||||
default: present
|
default: present
|
||||||
choices:
|
choices:
|
||||||
- absent
|
- absent
|
||||||
- present
|
- present
|
||||||
location:
|
location:
|
||||||
description:
|
description:
|
||||||
- Valid azure location. Defaults to location of the resource group.
|
- Valid Azure location. Defaults to location of the resource group.
|
||||||
account_type:
|
account_type:
|
||||||
description:
|
description:
|
||||||
- "Type of storage account. Required when creating a storage account. NOTE: Standard_ZRS and Premium_LRS
|
- Type of storage account. Required when creating a storage account.
|
||||||
accounts cannot be changed to other account types, and other account types cannot be changed to
|
- C(Standard_ZRS) and C(Premium_LRS) accounts cannot be changed to other account types.
|
||||||
Standard_ZRS or Premium_LRS."
|
- Other account types cannot be changed to C(Standard_ZRS) or C(Premium_LRS).
|
||||||
choices:
|
choices:
|
||||||
- Premium_LRS
|
- Premium_LRS
|
||||||
- Standard_GRS
|
- Standard_GRS
|
||||||
|
@ -59,15 +58,16 @@ options:
|
||||||
- type
|
- type
|
||||||
custom_domain:
|
custom_domain:
|
||||||
description:
|
description:
|
||||||
- User domain assigned to the storage account. Must be a dictionary with 'name' and 'use_sub_domain'
|
- User domain assigned to the storage account.
|
||||||
keys where 'name' is the CNAME source. Only one custom domain is supported per storage account at this
|
- Must be a dictionary with I(name) and I(use_sub_domain) keys where I(name) is the CNAME source.
|
||||||
time. To clear the existing custom domain, use an empty string for the custom domain name property.
|
- Only one custom domain is supported per storage account at this time.
|
||||||
|
- To clear the existing custom domain, use an empty string for the custom domain name property.
|
||||||
- Can be added to an existing storage account. Will be ignored during storage account creation.
|
- Can be added to an existing storage account. Will be ignored during storage account creation.
|
||||||
aliases:
|
aliases:
|
||||||
- custom_dns_domain_suffix
|
- custom_dns_domain_suffix
|
||||||
kind:
|
kind:
|
||||||
description:
|
description:
|
||||||
- The 'kind' of storage.
|
- The kind of storage.
|
||||||
default: 'Storage'
|
default: 'Storage'
|
||||||
choices:
|
choices:
|
||||||
- Storage
|
- Storage
|
||||||
|
@ -76,20 +76,20 @@ options:
|
||||||
version_added: "2.2"
|
version_added: "2.2"
|
||||||
access_tier:
|
access_tier:
|
||||||
description:
|
description:
|
||||||
- The access tier for this storage account. Required for a storage account of kind 'BlobStorage'.
|
- The access tier for this storage account. Required when I(kind=BlobStorage).
|
||||||
choices:
|
choices:
|
||||||
- Hot
|
- Hot
|
||||||
- Cool
|
- Cool
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
force_delete_nonempty:
|
force_delete_nonempty:
|
||||||
description:
|
description:
|
||||||
- Attempt deletion if resource already exists and cannot be updated
|
- Attempt deletion if resource already exists and cannot be updated.
|
||||||
type: bool
|
type: bool
|
||||||
aliases:
|
aliases:
|
||||||
- force
|
- force
|
||||||
https_only:
|
https_only:
|
||||||
description:
|
description:
|
||||||
- Allows https traffic only to storage service if sets to true.
|
- Allows https traffic only to storage service when set to C(true).
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
blob_cors:
|
blob_cors:
|
||||||
|
@ -97,7 +97,7 @@ options:
|
||||||
- Specifies CORS rules for the Blob service.
|
- Specifies CORS rules for the Blob service.
|
||||||
- You can include up to five CorsRule elements in the request.
|
- You can include up to five CorsRule elements in the request.
|
||||||
- If no blob_cors elements are included in the argument list, nothing about CORS will be changed.
|
- If no blob_cors elements are included in the argument list, nothing about CORS will be changed.
|
||||||
- "If you want to delete all CORS rules and disable CORS for the Blob service, explicitly set blob_cors: []."
|
- If you want to delete all CORS rules and disable CORS for the Blob service, explicitly set I(blob_cors=[]).
|
||||||
type: list
|
type: list
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
suboptions:
|
suboptions:
|
||||||
|
@ -132,8 +132,8 @@ extends_documentation_fragment:
|
||||||
- azure_tags
|
- azure_tags
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht)"
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- "Matt Davis (@nitzmahone)"
|
- Matt Davis (@nitzmahone)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -175,34 +175,122 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
state:
|
state:
|
||||||
description: Current state of the storage account.
|
description:
|
||||||
|
- Current state of the storage account.
|
||||||
returned: always
|
returned: always
|
||||||
type: dict
|
type: complex
|
||||||
sample: {
|
contains:
|
||||||
"account_type": "Standard_RAGRS",
|
account_type:
|
||||||
"custom_domain": null,
|
description:
|
||||||
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/clh0003",
|
- Type of storage account.
|
||||||
"location": "eastus2",
|
returned: always
|
||||||
"name": "clh0003",
|
type: str
|
||||||
"primary_endpoints": {
|
sample: Standard_RAGRS
|
||||||
"blob": "https://clh0003.blob.core.windows.net/",
|
custom_domain:
|
||||||
"queue": "https://clh0003.queue.core.windows.net/",
|
description:
|
||||||
"table": "https://clh0003.table.core.windows.net/"
|
- User domain assigned to the storage account.
|
||||||
},
|
returned: always
|
||||||
"primary_location": "eastus2",
|
type: complex
|
||||||
"provisioning_state": "Succeeded",
|
contains:
|
||||||
"resource_group": "Testing",
|
name:
|
||||||
"secondary_endpoints": {
|
description:
|
||||||
"blob": "https://clh0003-secondary.blob.core.windows.net/",
|
- CNAME source.
|
||||||
"queue": "https://clh0003-secondary.queue.core.windows.net/",
|
returned: always
|
||||||
"table": "https://clh0003-secondary.table.core.windows.net/"
|
type: str
|
||||||
},
|
sample: testaccount
|
||||||
"secondary_location": "centralus",
|
use_sub_domain:
|
||||||
"status_of_primary": "Available",
|
description:
|
||||||
"status_of_secondary": "Available",
|
- Whether to use sub domain.
|
||||||
"tags": null,
|
returned: always
|
||||||
"type": "Microsoft.Storage/storageAccounts"
|
type: bool
|
||||||
}
|
sample: true
|
||||||
|
id:
|
||||||
|
description:
|
||||||
|
- Resource ID.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/clh0003"
|
||||||
|
location:
|
||||||
|
description:
|
||||||
|
- Valid Azure location. Defaults to location of the resource group.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: eastus2
|
||||||
|
name:
|
||||||
|
description:
|
||||||
|
- Name of the storage account to update or create.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: clh0003
|
||||||
|
primary_endpoints:
|
||||||
|
description:
|
||||||
|
- The URLs to retrieve the public I(blob), I(queue), or I(table) object from the primary location.
|
||||||
|
returned: always
|
||||||
|
type: dict
|
||||||
|
sample: {
|
||||||
|
"blob": "https://clh0003.blob.core.windows.net/",
|
||||||
|
"queue": "https://clh0003.queue.core.windows.net/",
|
||||||
|
"table": "https://clh0003.table.core.windows.net/"
|
||||||
|
}
|
||||||
|
primary_location:
|
||||||
|
description:
|
||||||
|
- The location of the primary data center for the storage account.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: eastus2
|
||||||
|
provisioning_state:
|
||||||
|
description:
|
||||||
|
- The status of the storage account.
|
||||||
|
- Possible values include C(Creating), C(ResolvingDNS), C(Succeeded).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: Succeeded
|
||||||
|
resource_group:
|
||||||
|
description:
|
||||||
|
- The resource group's name.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: Testing
|
||||||
|
secondary_endpoints:
|
||||||
|
description:
|
||||||
|
- The URLs to retrieve the public I(blob), I(queue), or I(table) object from the secondary location.
|
||||||
|
returned: always
|
||||||
|
type: dict
|
||||||
|
sample: {
|
||||||
|
"blob": "https://clh0003-secondary.blob.core.windows.net/",
|
||||||
|
"queue": "https://clh0003-secondary.queue.core.windows.net/",
|
||||||
|
"table": "https://clh0003-secondary.table.core.windows.net/"
|
||||||
|
}
|
||||||
|
secondary_location:
|
||||||
|
description:
|
||||||
|
- The location of the geo-replicated secondary for the storage account.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: centralus
|
||||||
|
status_of_primary:
|
||||||
|
description:
|
||||||
|
- The status of the primary location of the storage account; either C(available) or C(unavailable).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: available
|
||||||
|
status_of_secondary:
|
||||||
|
description:
|
||||||
|
- The status of the secondary location of the storage account; either C(available) or C(unavailable).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: available
|
||||||
|
tags:
|
||||||
|
description:
|
||||||
|
- Resource tags.
|
||||||
|
returned: always
|
||||||
|
type: dict
|
||||||
|
sample: { 'tags1': 'value1' }
|
||||||
|
type:
|
||||||
|
description:
|
||||||
|
- The storage account type.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: "Microsoft.Storage/storageAccounts"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -20,7 +20,7 @@ module: azure_rm_storageaccount_facts
|
||||||
|
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
|
|
||||||
short_description: Get storage account facts.
|
short_description: Get storage account facts
|
||||||
|
|
||||||
description:
|
description:
|
||||||
- Get facts for one storage account or all storage accounts within a resource group.
|
- Get facts for one storage account or all storage accounts within a resource group.
|
||||||
|
@ -46,8 +46,8 @@ options:
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
show_blob_cors:
|
show_blob_cors:
|
||||||
description:
|
description:
|
||||||
- Show the blob CORS settings for each of the storageaccount's blob.
|
- Show the blob CORS settings for each blob related to the storage account.
|
||||||
- Note that it will cost a lot time when list all storageaccount rather than querry a single one.
|
- Querying all storage accounts will take a long time.
|
||||||
type: bool
|
type: bool
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ extends_documentation_fragment:
|
||||||
- azure
|
- azure
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht)"
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- "Matt Davis (@nitzmahone)"
|
- Matt Davis (@nitzmahone)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
azure_storageaccounts:
|
azure_storageaccounts:
|
||||||
description: List of storage account dicts.
|
description:
|
||||||
|
- List of storage account dicts.
|
||||||
returned: always
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
example: [{
|
example: [{
|
||||||
|
@ -103,170 +104,234 @@ azure_storageaccounts:
|
||||||
"type": "Microsoft.Storage/storageAccounts"
|
"type": "Microsoft.Storage/storageAccounts"
|
||||||
}]
|
}]
|
||||||
storageaccounts:
|
storageaccounts:
|
||||||
description: List of storage account dicts in resource module's parameter format.
|
description:
|
||||||
|
- List of storage account dicts in resource module's parameter format.
|
||||||
returned: always
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
id:
|
id:
|
||||||
description:
|
description:
|
||||||
- Resource ID.
|
- Resource ID.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/t
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/t
|
||||||
estaccount001"
|
estaccount001"
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the storage account to update or create.
|
- Name of the storage account to update or create.
|
||||||
sample: "testaccount001"
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: testaccount001
|
||||||
location:
|
location:
|
||||||
description:
|
description:
|
||||||
- Valid azure location. Defaults to location of the resource group.
|
- Valid Azure location. Defaults to location of the resource group.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: eastus
|
sample: eastus
|
||||||
account_type:
|
account_type:
|
||||||
description:
|
description:
|
||||||
- Type of storage account.
|
- Type of storage account.
|
||||||
- "NOTE: Standard_ZRS and Premium_LRS accounts cannot be changed to other account types."
|
- C(Standard_ZRS) and C(Premium_LRS) accounts cannot be changed to other account types.
|
||||||
- Other account types cannot be changed to Standard_ZRS or Premium_LRS.
|
- Other account types cannot be changed to C(Standard_ZRS) or C(Premium_LRS).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: Standard_ZRS
|
sample: Standard_ZRS
|
||||||
custom_domain:
|
custom_domain:
|
||||||
description:
|
description:
|
||||||
- User domain assigned to the storage account.
|
- User domain assigned to the storage account.
|
||||||
- Must be a dictionary with 'name' and 'use_sub_domain' keys where 'name' is the CNAME source.
|
- Must be a dictionary with I(name) and I(use_sub_domain) keys where I(name) is the CNAME source.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- CNAME source.
|
- CNAME source.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: testaccount
|
sample: testaccount
|
||||||
use_sub_domain:
|
use_sub_domain:
|
||||||
description:
|
description:
|
||||||
- whether to use sub domain.
|
- Whether to use sub domain.
|
||||||
|
returned: always
|
||||||
|
type: bool
|
||||||
sample: true
|
sample: true
|
||||||
kind:
|
kind:
|
||||||
description:
|
description:
|
||||||
- The 'kind' of storage.
|
- The kind of storage.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: Storage
|
sample: Storage
|
||||||
access_tier:
|
access_tier:
|
||||||
description:
|
description:
|
||||||
- The access tier for this storage account.
|
- The access tier for this storage account.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: Hot
|
sample: Hot
|
||||||
https_only:
|
https_only:
|
||||||
description:
|
description:
|
||||||
- Allows https traffic only to storage service if sets to true.
|
- Allows https traffic only to storage service when set to C(true).
|
||||||
|
returned: always
|
||||||
|
type: bool
|
||||||
sample: false
|
sample: false
|
||||||
provisioning_state:
|
provisioning_state:
|
||||||
description:
|
description:
|
||||||
- Gets the status of the storage account at the time the operation was called.
|
- The status of the storage account at the time the operation was called.
|
||||||
- Possible values include 'Creating', 'ResolvingDNS', 'Succeeded'.
|
- Possible values include C(Creating), C(ResolvingDNS), C(Succeeded).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: Succeeded
|
sample: Succeeded
|
||||||
secondary_location:
|
secondary_location:
|
||||||
description:
|
description:
|
||||||
- Gets the location of the geo-replicated secondary for the storage account.
|
- The location of the geo-replicated secondary for the storage account.
|
||||||
- Only available if the accountType is Standard_GRS or Standard_RAGRS.
|
- Only available if the I(account_type=Standard_GRS) or I(account_type=Standard_RAGRS).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: westus
|
sample: westus
|
||||||
status_of_primary:
|
status_of_primary:
|
||||||
description:
|
description:
|
||||||
- Gets the status indicating whether the primary location of the storage account is available or unavailable.
|
- Status of the primary location of the storage account; either C(available) or C(unavailable).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: available
|
sample: available
|
||||||
status_of_secondary:
|
status_of_secondary:
|
||||||
description:
|
description:
|
||||||
- Gets the status indicating whether the secondary location of the storage account is available or unavailable.
|
- Status of the secondary location of the storage account; either C(available) or C(unavailable).
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: available
|
sample: available
|
||||||
primary_location:
|
primary_location:
|
||||||
description:
|
description:
|
||||||
- Gets the location of the primary data center for the storage account.
|
- The location of the primary data center for the storage account.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: eastus
|
sample: eastus
|
||||||
primary_endpoints:
|
primary_endpoints:
|
||||||
description:
|
description:
|
||||||
- Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object.
|
- URLs to retrieve a public I(blob), I(queue), or I(table) object.
|
||||||
- Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.
|
- Note that C(Standard_ZRS) and C(Premium_LRS) accounts only return the blob endpoint.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
blob:
|
blob:
|
||||||
description:
|
description:
|
||||||
- Gets the primary blob endpoint and connection string.
|
- The primary blob endpoint and connection string.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
endpoint:
|
endpoint:
|
||||||
description:
|
description:
|
||||||
- Gets the primary blob endpoint.
|
- The primary blob endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "https://testaccount001.blob.core.windows.net/"
|
sample: "https://testaccount001.blob.core.windows.net/"
|
||||||
connectionstring:
|
connectionstring:
|
||||||
description:
|
description:
|
||||||
- Connectionstring of the blob endpoint
|
- Connectionstring of the blob endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;BlobEndpoint=X"
|
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;BlobEndpoint=X"
|
||||||
queue:
|
queue:
|
||||||
description:
|
description:
|
||||||
- Gets the primary queue endpoint and connection string.
|
- The primary queue endpoint and connection string.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
endpoint:
|
endpoint:
|
||||||
description:
|
description:
|
||||||
- Gets the primary queue endpoint.
|
- The primary queue endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "https://testaccount001.queue.core.windows.net/"
|
sample: "https://testaccount001.queue.core.windows.net/"
|
||||||
connectionstring:
|
connectionstring:
|
||||||
description:
|
description:
|
||||||
- Connectionstring of the queue endpoint
|
- Connectionstring of the queue endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;QueueEndpoint=X"
|
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;QueueEndpoint=X"
|
||||||
table:
|
table:
|
||||||
description:
|
description:
|
||||||
- Gets the primary table endpoint and connection string.
|
- The primary table endpoint and connection string.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
endpoint:
|
endpoint:
|
||||||
description:
|
description:
|
||||||
- Gets the primary table endpoint.
|
- The primary table endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "https://testaccount001.table.core.windows.net/"
|
sample: "https://testaccount001.table.core.windows.net/"
|
||||||
connectionstring:
|
connectionstring:
|
||||||
description:
|
description:
|
||||||
- Connectionstring of the table endpoint
|
- Connectionstring of the table endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;TableEndpoint=X"
|
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;TableEndpoint=X"
|
||||||
key:
|
key:
|
||||||
description:
|
description:
|
||||||
- The account key for the primary_endpoints
|
- The account key for the primary_endpoints
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
sample: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
secondary_endpoints:
|
secondary_endpoints:
|
||||||
description:
|
description:
|
||||||
- Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location.
|
- The URLs to retrieve a public I(blob), I(queue), or I(table) object from the secondary location.
|
||||||
- Only available if the SKU name is Standard_RAGRS.
|
- Only available if the SKU I(name=Standard_RAGRS).
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
blob:
|
blob:
|
||||||
description:
|
description:
|
||||||
- Gets the secondary blob endpoint and connection string.
|
- The secondary blob endpoint and connection string.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
endpoint:
|
endpoint:
|
||||||
description:
|
description:
|
||||||
- Gets the secondary blob endpoint.
|
- The secondary blob endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "https://testaccount001.blob.core.windows.net/"
|
sample: "https://testaccount001.blob.core.windows.net/"
|
||||||
connectionstring:
|
connectionstring:
|
||||||
description:
|
description:
|
||||||
- Connectionstring of the blob endpoint
|
- Connectionstring of the blob endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;BlobEndpoint=X"
|
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;BlobEndpoint=X"
|
||||||
queue:
|
queue:
|
||||||
description:
|
description:
|
||||||
- Gets the secondary queue endpoint and connection string.
|
- The secondary queue endpoint and connection string.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
endpoint:
|
endpoint:
|
||||||
description:
|
description:
|
||||||
- Gets the secondary queue endpoint.
|
- The secondary queue endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "https://testaccount001.queue.core.windows.net/"
|
sample: "https://testaccount001.queue.core.windows.net/"
|
||||||
connectionstring:
|
connectionstring:
|
||||||
description:
|
description:
|
||||||
- Connectionstring of the queue endpoint
|
- Connectionstring of the queue endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;QueueEndpoint=X"
|
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;QueueEndpoint=X"
|
||||||
table:
|
table:
|
||||||
description:
|
description:
|
||||||
- Gets the secondary table endpoint and connection string.
|
- The secondary table endpoint and connection string.
|
||||||
|
returned: always
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
endpoint:
|
endpoint:
|
||||||
description:
|
description:
|
||||||
- Gets the secondary table endpoint.
|
- The secondary table endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "https://testaccount001.table.core.windows.net/"
|
sample: "https://testaccount001.table.core.windows.net/"
|
||||||
connectionstring:
|
connectionstring:
|
||||||
description:
|
description:
|
||||||
- Connectionstring of the table endpoint
|
- Connectionstring of the table endpoint.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;TableEndpoint=X"
|
sample: "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=X;AccountKey=X;TableEndpoint=X"
|
||||||
key:
|
key:
|
||||||
description:
|
description:
|
||||||
|
@ -275,12 +340,9 @@ storageaccounts:
|
||||||
tags:
|
tags:
|
||||||
description:
|
description:
|
||||||
- Resource tags.
|
- Resource tags.
|
||||||
|
returned: always
|
||||||
type: dict
|
type: dict
|
||||||
sample: { "tag1": "abc" }
|
sample: { "tag1": "abc" }
|
||||||
blob_cors:
|
|
||||||
description:
|
|
||||||
- Blob CORS of blob.
|
|
||||||
type: list
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -17,11 +17,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: azure_rm_storageblob
|
module: azure_rm_storageblob
|
||||||
short_description: Manage blob containers and blob objects.
|
short_description: Manage blob containers and blob objects
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
description:
|
description:
|
||||||
- Create, update and delete blob containers and blob objects. Use to upload a file and store it as a blob object,
|
- Create, update and delete blob containers and blob objects.
|
||||||
or download a blob object to a file.
|
- Use to upload a file and store it as a blob object, or download a blob object to a file.
|
||||||
options:
|
options:
|
||||||
storage_account_name:
|
storage_account_name:
|
||||||
description:
|
description:
|
||||||
|
@ -37,7 +37,7 @@ options:
|
||||||
- blob_name
|
- blob_name
|
||||||
blob_type:
|
blob_type:
|
||||||
description:
|
description:
|
||||||
- Type of Blob Object.
|
- Type of blob object.
|
||||||
default: block
|
default: block
|
||||||
choices:
|
choices:
|
||||||
- block
|
- block
|
||||||
|
@ -51,7 +51,7 @@ options:
|
||||||
- container_name
|
- container_name
|
||||||
content_type:
|
content_type:
|
||||||
description:
|
description:
|
||||||
- Set the blob content-type header. For example, 'image/png'.
|
- Set the blob content-type header. For example C(image/png).
|
||||||
cache_control:
|
cache_control:
|
||||||
description:
|
description:
|
||||||
- Set the blob cache-control header.
|
- Set the blob cache-control header.
|
||||||
|
@ -74,8 +74,7 @@ options:
|
||||||
- destination
|
- destination
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- Overwrite existing blob or file when uploading or downloading. Force deletion of a container
|
- Overwrite existing blob or file when uploading or downloading. Force deletion of a container that contains blobs.
|
||||||
that contains blobs.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
resource_group:
|
resource_group:
|
||||||
|
@ -91,23 +90,23 @@ options:
|
||||||
- source
|
- source
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Assert the state of a container or blob.
|
- State of a container or blob.
|
||||||
- Use state C(absent) with a container value only to delete a container. Include a blob value to remove
|
- Use state C(absent) with a container value only to delete a container. Include a blob value to remove
|
||||||
a specific blob. A container will not be deleted, if it contains blobs. Use the force option to override,
|
a specific blob. A container will not be deleted, if it contains blobs. Use the I(force) option to override,
|
||||||
deleting the container and all associated blobs.
|
deleting the container and all associated blobs.
|
||||||
- Use state C(present) to create or update a container and upload or download a blob. If the container
|
- Use state C(present) to create or update a container and upload or download a blob. If the container
|
||||||
does not exist, it will be created. If it exists, it will be updated with configuration options. Provide
|
does not exist, it will be created. If it exists, it will be updated with configuration options. Provide
|
||||||
a blob name and either src or dest to upload or download. Provide a src path to upload and a dest path
|
a blob name and either src or dest to upload or download. Provide a src path to upload and a dest path
|
||||||
to download. If a blob (uploading) or a file (downloading) already exists, it will not be overwritten
|
to download. If a blob (uploading) or a file (downloading) already exists, it will not be overwritten
|
||||||
unless the force parameter is true.
|
unless I(force=true).
|
||||||
default: present
|
default: present
|
||||||
choices:
|
choices:
|
||||||
- absent
|
- absent
|
||||||
- present
|
- present
|
||||||
public_access:
|
public_access:
|
||||||
description:
|
description:
|
||||||
- Determine a container's level of public access. By default containers are private. Can only be set at
|
- A container's level of public access. By default containers are private.
|
||||||
time of container creation.
|
- Can only be set at time of container creation.
|
||||||
choices:
|
choices:
|
||||||
- container
|
- container
|
||||||
- blob
|
- blob
|
||||||
|
@ -117,8 +116,8 @@ extends_documentation_fragment:
|
||||||
- azure_tags
|
- azure_tags
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht)"
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- "Matt Davis (@nitzmahone)"
|
- Matt Davis (@nitzmahone)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -151,7 +150,8 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
blob:
|
blob:
|
||||||
description: Facts about the current state of the blob.
|
description:
|
||||||
|
- Facts about the current state of the blob.
|
||||||
returned: when a blob is operated on
|
returned: when a blob is operated on
|
||||||
type: dict
|
type: dict
|
||||||
sample: {
|
sample: {
|
||||||
|
@ -170,7 +170,8 @@ blob:
|
||||||
"type": "BlockBlob"
|
"type": "BlockBlob"
|
||||||
}
|
}
|
||||||
container:
|
container:
|
||||||
description: Facts about the current state of the selected container.
|
description:
|
||||||
|
- Facts about the current state of the selected container.
|
||||||
returned: always
|
returned: always
|
||||||
type: dict
|
type: dict
|
||||||
sample: {
|
sample: {
|
||||||
|
|
Loading…
Reference in a new issue