зеркало из
1
0
Форкнуть 0

[AutoPR] appconfiguration/resource-manager (#8528)

This commit is contained in:
Azure SDK Bot 2019-11-08 14:17:11 +08:00 коммит произвёл Feng Zhou
Родитель 3d9ab9e99f
Коммит e162e4afcf
11 изменённых файлов: 318 добавлений и 58 удалений

Просмотреть файл

@ -3,6 +3,22 @@
Release History
===============
0.3.0 (2019-11-08)
++++++++++++++++++
**Features**
- Model ConfigurationStore has a new parameter identity
- Model ConfigurationStoreUpdateParameters has a new parameter identity
- Model ConfigurationStoreUpdateParameters has a new parameter sku
**Breaking changes**
- Operation ConfigurationStoresOperations.create has a new signature
- Operation ConfigurationStoresOperations.update has a new signature
- Model ConfigurationStore has a new required parameter sku
0.2.0 (2019-11-04)
++++++++++++++++++

Просмотреть файл

@ -44,7 +44,7 @@ class AppConfigurationManagementClient(SDKClient):
super(AppConfigurationManagementClient, self).__init__(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-02-01-preview'
self.api_version = '2019-10-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Просмотреть файл

@ -22,6 +22,9 @@ try:
from ._models_py3 import OperationDefinitionDisplay
from ._models_py3 import RegenerateKeyParameters
from ._models_py3 import Resource
from ._models_py3 import ResourceIdentity
from ._models_py3 import Sku
from ._models_py3 import UserIdentity
except (SyntaxError, ImportError):
from ._models import ApiKey
from ._models import CheckNameAvailabilityParameters
@ -35,10 +38,14 @@ except (SyntaxError, ImportError):
from ._models import OperationDefinitionDisplay
from ._models import RegenerateKeyParameters
from ._models import Resource
from ._models import ResourceIdentity
from ._models import Sku
from ._models import UserIdentity
from ._paged_models import ApiKeyPaged
from ._paged_models import ConfigurationStorePaged
from ._paged_models import OperationDefinitionPaged
from ._app_configuration_management_client_enums import (
IdentityType,
ProvisioningState,
)
@ -55,8 +62,12 @@ __all__ = [
'OperationDefinitionDisplay',
'RegenerateKeyParameters',
'Resource',
'ResourceIdentity',
'Sku',
'UserIdentity',
'ConfigurationStorePaged',
'ApiKeyPaged',
'OperationDefinitionPaged',
'IdentityType',
'ProvisioningState',
]

Просмотреть файл

@ -12,6 +12,14 @@
from enum import Enum
class IdentityType(str, Enum):
none = "None"
system_assigned = "SystemAssigned"
user_assigned = "UserAssigned"
system_assigned_user_assigned = "SystemAssigned, UserAssigned"
class ProvisioningState(str, Enum):
creating = "Creating"

Просмотреть файл

@ -169,6 +169,8 @@ class ConfigurationStore(Resource):
:type location: str
:param tags: The tags of the resource.
:type tags: dict[str, str]
:param identity: The managed identity information, if configured.
:type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity
:ivar provisioning_state: The provisioning state of the configuration
store. Possible values include: 'Creating', 'Updating', 'Deleting',
'Succeeded', 'Failed', 'Canceled'
@ -179,6 +181,8 @@ class ConfigurationStore(Resource):
:ivar endpoint: The DNS endpoint where the configuration store API will be
available.
:vartype endpoint: str
:param sku: Required. The sku of the configuration store.
:type sku: ~azure.mgmt.appconfiguration.models.Sku
"""
_validation = {
@ -189,6 +193,7 @@ class ConfigurationStore(Resource):
'provisioning_state': {'readonly': True},
'creation_date': {'readonly': True},
'endpoint': {'readonly': True},
'sku': {'required': True},
}
_attribute_map = {
@ -197,16 +202,20 @@ class ConfigurationStore(Resource):
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'ResourceIdentity'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
}
def __init__(self, **kwargs):
super(ConfigurationStore, self).__init__(**kwargs)
self.identity = kwargs.get('identity', None)
self.provisioning_state = None
self.creation_date = None
self.endpoint = None
self.sku = kwargs.get('sku', None)
class ConfigurationStoreUpdateParameters(Model):
@ -214,18 +223,27 @@ class ConfigurationStoreUpdateParameters(Model):
:param properties: The properties for updating a configuration store.
:type properties: object
:param identity: The managed identity information for the configuration
store.
:type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity
:param sku: The SKU of the configuration store.
:type sku: ~azure.mgmt.appconfiguration.models.Sku
:param tags: The ARM resource tags.
:type tags: dict[str, str]
"""
_attribute_map = {
'properties': {'key': 'properties', 'type': 'object'},
'identity': {'key': 'identity', 'type': 'ResourceIdentity'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, **kwargs):
super(ConfigurationStoreUpdateParameters, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)
self.identity = kwargs.get('identity', None)
self.sku = kwargs.get('sku', None)
self.tags = kwargs.get('tags', None)
@ -460,3 +478,99 @@ class RegenerateKeyParameters(Model):
def __init__(self, **kwargs):
super(RegenerateKeyParameters, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
class ResourceIdentity(Model):
"""ResourceIdentity.
Variables are only populated by the server, and will be ignored when
sending a request.
:param type: The type of managed identity used. The type 'SystemAssigned,
UserAssigned' includes both an implicitly created identity and a set of
user-assigned identities. The type 'None' will remove any identities.
Possible values include: 'None', 'SystemAssigned', 'UserAssigned',
'SystemAssigned, UserAssigned'
:type type: str or ~azure.mgmt.appconfiguration.models.IdentityType
:param user_assigned_identities: The list of user-assigned identities
associated with the resource. The user-assigned identity dictionary keys
will be ARM resource ids in the form:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
:type user_assigned_identities: dict[str,
~azure.mgmt.appconfiguration.models.UserIdentity]
:ivar principal_id: The principal id of the identity. This property will
only be provided for a system-assigned identity.
:vartype principal_id: str
:ivar tenant_id: The tenant id associated with the resource's identity.
This property will only be provided for a system-assigned identity.
:vartype tenant_id: str
"""
_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'},
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ResourceIdentity, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
self.principal_id = None
self.tenant_id = None
class Sku(Model):
"""Describes a configuration store SKU.
All required parameters must be populated in order to send to Azure.
:param name: Required. The SKU name of the configuration store.
:type name: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Sku, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
class UserIdentity(Model):
"""UserIdentity.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar principal_id: The principal ID of the user-assigned identity.
:vartype principal_id: str
:ivar client_id: The client ID of the user-assigned identity.
:vartype client_id: str
"""
_validation = {
'principal_id': {'readonly': True},
'client_id': {'readonly': True},
}
_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'client_id': {'key': 'clientId', 'type': 'str'},
}
def __init__(self, **kwargs):
super(UserIdentity, self).__init__(**kwargs)
self.principal_id = None
self.client_id = None

Просмотреть файл

@ -169,6 +169,8 @@ class ConfigurationStore(Resource):
:type location: str
:param tags: The tags of the resource.
:type tags: dict[str, str]
:param identity: The managed identity information, if configured.
:type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity
:ivar provisioning_state: The provisioning state of the configuration
store. Possible values include: 'Creating', 'Updating', 'Deleting',
'Succeeded', 'Failed', 'Canceled'
@ -179,6 +181,8 @@ class ConfigurationStore(Resource):
:ivar endpoint: The DNS endpoint where the configuration store API will be
available.
:vartype endpoint: str
:param sku: Required. The sku of the configuration store.
:type sku: ~azure.mgmt.appconfiguration.models.Sku
"""
_validation = {
@ -189,6 +193,7 @@ class ConfigurationStore(Resource):
'provisioning_state': {'readonly': True},
'creation_date': {'readonly': True},
'endpoint': {'readonly': True},
'sku': {'required': True},
}
_attribute_map = {
@ -197,16 +202,20 @@ class ConfigurationStore(Resource):
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'ResourceIdentity'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
}
def __init__(self, *, location: str, tags=None, **kwargs) -> None:
def __init__(self, *, location: str, sku, tags=None, identity=None, **kwargs) -> None:
super(ConfigurationStore, self).__init__(location=location, tags=tags, **kwargs)
self.identity = identity
self.provisioning_state = None
self.creation_date = None
self.endpoint = None
self.sku = sku
class ConfigurationStoreUpdateParameters(Model):
@ -214,18 +223,27 @@ class ConfigurationStoreUpdateParameters(Model):
:param properties: The properties for updating a configuration store.
:type properties: object
:param identity: The managed identity information for the configuration
store.
:type identity: ~azure.mgmt.appconfiguration.models.ResourceIdentity
:param sku: The SKU of the configuration store.
:type sku: ~azure.mgmt.appconfiguration.models.Sku
:param tags: The ARM resource tags.
:type tags: dict[str, str]
"""
_attribute_map = {
'properties': {'key': 'properties', 'type': 'object'},
'identity': {'key': 'identity', 'type': 'ResourceIdentity'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, *, properties=None, tags=None, **kwargs) -> None:
def __init__(self, *, properties=None, identity=None, sku=None, tags=None, **kwargs) -> None:
super(ConfigurationStoreUpdateParameters, self).__init__(**kwargs)
self.properties = properties
self.identity = identity
self.sku = sku
self.tags = tags
@ -460,3 +478,99 @@ class RegenerateKeyParameters(Model):
def __init__(self, *, id: str=None, **kwargs) -> None:
super(RegenerateKeyParameters, self).__init__(**kwargs)
self.id = id
class ResourceIdentity(Model):
"""ResourceIdentity.
Variables are only populated by the server, and will be ignored when
sending a request.
:param type: The type of managed identity used. The type 'SystemAssigned,
UserAssigned' includes both an implicitly created identity and a set of
user-assigned identities. The type 'None' will remove any identities.
Possible values include: 'None', 'SystemAssigned', 'UserAssigned',
'SystemAssigned, UserAssigned'
:type type: str or ~azure.mgmt.appconfiguration.models.IdentityType
:param user_assigned_identities: The list of user-assigned identities
associated with the resource. The user-assigned identity dictionary keys
will be ARM resource ids in the form:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
:type user_assigned_identities: dict[str,
~azure.mgmt.appconfiguration.models.UserIdentity]
:ivar principal_id: The principal id of the identity. This property will
only be provided for a system-assigned identity.
:vartype principal_id: str
:ivar tenant_id: The tenant id associated with the resource's identity.
This property will only be provided for a system-assigned identity.
:vartype tenant_id: str
"""
_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'},
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
}
def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None:
super(ResourceIdentity, self).__init__(**kwargs)
self.type = type
self.user_assigned_identities = user_assigned_identities
self.principal_id = None
self.tenant_id = None
class Sku(Model):
"""Describes a configuration store SKU.
All required parameters must be populated in order to send to Azure.
:param name: Required. The SKU name of the configuration store.
:type name: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}
def __init__(self, *, name: str, **kwargs) -> None:
super(Sku, self).__init__(**kwargs)
self.name = name
class UserIdentity(Model):
"""UserIdentity.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar principal_id: The principal ID of the user-assigned identity.
:vartype principal_id: str
:ivar client_id: The client ID of the user-assigned identity.
:vartype client_id: str
"""
_validation = {
'principal_id': {'readonly': True},
'client_id': {'readonly': True},
}
_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'client_id': {'key': 'clientId', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(UserIdentity, self).__init__(**kwargs)
self.principal_id = None
self.client_id = None

Просмотреть файл

@ -26,7 +26,7 @@ class ConfigurationStoresOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The client API version. Constant value: "2019-02-01-preview".
:ivar api_version: The client API version. Constant value: "2019-10-01".
"""
models = models
@ -36,7 +36,7 @@ class ConfigurationStoresOperations(object):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-02-01-preview"
self.api_version = "2019-10-01"
self.config = config
@ -253,9 +253,7 @@ class ConfigurationStoresOperations(object):
def _create_initial(
self, resource_group_name, config_store_name, location, tags=None, custom_headers=None, raw=False, **operation_config):
config_store_creation_parameters = models.ConfigurationStore(location=location, tags=tags)
self, resource_group_name, config_store_name, config_store_creation_parameters, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.create.metadata['url']
path_format_arguments = {
@ -304,7 +302,7 @@ class ConfigurationStoresOperations(object):
return deserialized
def create(
self, resource_group_name, config_store_name, location, tags=None, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, config_store_name, config_store_creation_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates a configuration store with the specified parameters.
:param resource_group_name: The name of the resource group to which
@ -312,11 +310,10 @@ class ConfigurationStoresOperations(object):
:type resource_group_name: str
:param config_store_name: The name of the configuration store.
:type config_store_name: str
:param location: The location of the resource. This cannot be changed
after the resource is created.
:type location: str
:param tags: The tags of the resource.
:type tags: dict[str, str]
:param config_store_creation_parameters: The parameters for creating a
configuration store.
:type config_store_creation_parameters:
~azure.mgmt.appconfiguration.models.ConfigurationStore
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
@ -334,8 +331,7 @@ class ConfigurationStoresOperations(object):
raw_result = self._create_initial(
resource_group_name=resource_group_name,
config_store_name=config_store_name,
location=location,
tags=tags,
config_store_creation_parameters=config_store_creation_parameters,
custom_headers=custom_headers,
raw=True,
**operation_config
@ -440,9 +436,7 @@ class ConfigurationStoresOperations(object):
def _update_initial(
self, resource_group_name, config_store_name, properties=None, tags=None, custom_headers=None, raw=False, **operation_config):
config_store_update_parameters = models.ConfigurationStoreUpdateParameters(properties=properties, tags=tags)
self, resource_group_name, config_store_name, config_store_update_parameters, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.update.metadata['url']
path_format_arguments = {
@ -491,7 +485,7 @@ class ConfigurationStoresOperations(object):
return deserialized
def update(
self, resource_group_name, config_store_name, properties=None, tags=None, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, config_store_name, config_store_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Updates a configuration store with the specified parameters.
:param resource_group_name: The name of the resource group to which
@ -499,10 +493,10 @@ class ConfigurationStoresOperations(object):
:type resource_group_name: str
:param config_store_name: The name of the configuration store.
:type config_store_name: str
:param properties: The properties for updating a configuration store.
:type properties: object
:param tags: The ARM resource tags.
:type tags: dict[str, str]
:param config_store_update_parameters: The parameters for updating a
configuration store.
:type config_store_update_parameters:
~azure.mgmt.appconfiguration.models.ConfigurationStoreUpdateParameters
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
@ -520,8 +514,7 @@ class ConfigurationStoresOperations(object):
raw_result = self._update_initial(
resource_group_name=resource_group_name,
config_store_name=config_store_name,
properties=properties,
tags=tags,
config_store_update_parameters=config_store_update_parameters,
custom_headers=custom_headers,
raw=True,
**operation_config

Просмотреть файл

@ -24,7 +24,7 @@ class Operations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The client API version. Constant value: "2019-02-01-preview".
:ivar api_version: The client API version. Constant value: "2019-10-01".
"""
models = models
@ -34,7 +34,7 @@ class Operations(object):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-02-01-preview"
self.api_version = "2019-10-01"
self.config = config

Просмотреть файл

@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------
VERSION = "0.2.0"
VERSION = "0.3.0"

Просмотреть файл

@ -1,6 +1,7 @@
interactions:
- request:
body: '{"location": "westus", "tags": {"my_tag": "myTagValue"}}'
body: '{"location": "westus", "tags": {"my_tag": "myTagValue"}, "sku": {"name":
"Free"}}'
headers:
Accept:
- application/json
@ -9,30 +10,30 @@ interactions:
Connection:
- keep-alive
Content-Length:
- '56'
- '81'
Content-Type:
- application/json; charset=utf-8
User-Agent:
- python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.2.0 Azure-SDK-For-Python
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.3.0 Azure-SDK-For-Python
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1?api-version=2019-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1?api-version=2019-10-01
response:
body:
string: '{"type":"Microsoft.AppConfiguration/configurationStores","properties":{"provisioningState":"Creating","creationDate":"2019-11-05T05:33:15.6377583+00:00","endpoint":"https://contoso1.azconfig.io"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1","name":"contoso1","location":"westus","tags":{}}'
string: '{"type":"Microsoft.AppConfiguration/configurationStores","properties":{"provisioningState":"Creating","creationDate":"2019-11-08T05:37:39.8431822+00:00","endpoint":"https://contoso1.azconfig.io"},"sku":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1","name":"contoso1","location":"westus","tags":{}}'
headers:
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/3c7d4565-233f-8a27-7e99-38841f35e662?api-version=2019-02-01-preview
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/6ae12d30-79c9-1705-2ca3-4d959dc640bc?api-version=2019-10-01
cache-control:
- no-cache
content-length:
- '445'
- '456'
content-type:
- application/json; charset=utf-8
date:
- Tue, 05 Nov 2019 05:33:16 GMT
- Fri, 08 Nov 2019 05:37:40 GMT
expires:
- '-1'
pragma:
@ -59,15 +60,15 @@ interactions:
- keep-alive
User-Agent:
- python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.2.0 Azure-SDK-For-Python
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.3.0 Azure-SDK-For-Python
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/3c7d4565-233f-8a27-7e99-38841f35e662?api-version=2019-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/6ae12d30-79c9-1705-2ca3-4d959dc640bc?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/3c7d4565-233f-8a27-7e99-38841f35e662","name":"3c7d4565-233f-8a27-7e99-38841f35e662","status":"Succeeded","error":null}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/6ae12d30-79c9-1705-2ca3-4d959dc640bc","name":"6ae12d30-79c9-1705-2ca3-4d959dc640bc","status":"Succeeded","error":null}'
headers:
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/3c7d4565-233f-8a27-7e99-38841f35e662?api-version=2019-02-01-preview
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/locations/westus/operationsStatus/6ae12d30-79c9-1705-2ca3-4d959dc640bc?api-version=2019-10-01
cache-control:
- no-cache
content-length:
@ -75,7 +76,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 05 Nov 2019 05:33:27 GMT
- Fri, 08 Nov 2019 05:37:51 GMT
expires:
- '-1'
pragma:
@ -104,23 +105,23 @@ interactions:
- keep-alive
User-Agent:
- python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.2.0 Azure-SDK-For-Python
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.3.0 Azure-SDK-For-Python
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1?api-version=2019-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1?api-version=2019-10-01
response:
body:
string: '{"type":"Microsoft.AppConfiguration/configurationStores","properties":{"provisioningState":"Succeeded","creationDate":"2019-11-05T05:33:22+00:00","endpoint":"https://contoso1.azconfig.io"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1","name":"contoso1","location":"westus","tags":{"my_tag":"myTagValue"}}'
string: '{"type":"Microsoft.AppConfiguration/configurationStores","properties":{"provisioningState":"Succeeded","creationDate":"2019-11-08T05:37:41+00:00","endpoint":"https://contoso1.azconfig.io"},"sku":{"name":"free"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1","name":"contoso1","location":"westus","tags":{"my_tag":"myTagValue"}}'
headers:
cache-control:
- no-cache
content-length:
- '459'
- '481'
content-type:
- application/json; charset=utf-8
date:
- Tue, 05 Nov 2019 05:33:28 GMT
- Fri, 08 Nov 2019 05:37:52 GMT
etag:
- W/"02009a9a-0000-0700-0000-5dc109a10000"
- W/"1000e0dc-0000-0700-0000-5dc4ff250000"
expires:
- '-1'
pragma:
@ -149,25 +150,25 @@ interactions:
- keep-alive
User-Agent:
- python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.2.0 Azure-SDK-For-Python
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.3.0 Azure-SDK-For-Python
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1?api-version=2019-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1?api-version=2019-10-01
response:
body:
string: '{"type":"Microsoft.AppConfiguration/configurationStores","properties":{"provisioningState":"Succeeded","creationDate":"2019-11-05T05:33:22+00:00","endpoint":"https://contoso1.azconfig.io"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1","name":"contoso1","location":"westus","tags":{"my_tag":"myTagValue"}}'
string: '{"type":"Microsoft.AppConfiguration/configurationStores","properties":{"provisioningState":"Succeeded","creationDate":"2019-11-08T05:37:41+00:00","endpoint":"https://contoso1.azconfig.io"},"sku":{"name":"free"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_appconfiguration_test_appconfiguration39c8158a/providers/Microsoft.AppConfiguration/configurationStores/contoso1","name":"contoso1","location":"westus","tags":{"my_tag":"myTagValue"}}'
headers:
cache-control:
- no-cache
content-length:
- '459'
- '481'
content-type:
- application/json; charset=utf-8
date:
- Tue, 05 Nov 2019 05:33:29 GMT
- Fri, 08 Nov 2019 05:37:52 GMT
etag:
- W/"02009a9a-0000-0700-0000-5dc109a10000"
- W/"1000e0dc-0000-0700-0000-5dc4ff250000"
expires:
- '-1'
pragma:
@ -200,11 +201,11 @@ interactions:
- application/json; charset=utf-8
User-Agent:
- python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.2.0 Azure-SDK-For-Python
msrest_azure/0.4.34 azure-mgmt-appconfiguration/0.3.0 Azure-SDK-For-Python
accept-language:
- en-US
method: POST
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/checkNameAvailability?api-version=2019-02-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AppConfiguration/checkNameAvailability?api-version=2019-10-01
response:
body:
string: '{"nameAvailable":false,"message":"The specified name is already in
@ -217,7 +218,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 05 Nov 2019 05:33:30 GMT
- Fri, 08 Nov 2019 05:37:53 GMT
expires:
- '-1'
pragma:

Просмотреть файл

@ -30,11 +30,14 @@ class MgmtAppConfigurationTest(AzureMgmtTestCase):
# ConfigurationStores_Create[put]
BODY = {
"location": "westus",
"sku": {
"name": "Free"
},
"tags": {
"my_tag": "myTagValue"
}
}
result = self.mgmt_client.configuration_stores.create(resource_group.name, CONFIGURATION_STORE_NAME, BODY["location"], BODY["tags"])
result = self.mgmt_client.configuration_stores.create(resource_group.name, CONFIGURATION_STORE_NAME, BODY)
result = result.result()
self.assertEqual(result.name, CONFIGURATION_STORE_NAME)
self.assertEqual(result.provisioning_state, "Succeeded")