Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] appconfiguration/resource-manager #4953

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions azure-mgmt-appconfiguration/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
5 changes: 5 additions & 0 deletions azure-mgmt-appconfiguration/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

33 changes: 33 additions & 0 deletions azure-mgmt-appconfiguration/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-appconfiguration%2FREADME.png
1 change: 1 addition & 0 deletions azure-mgmt-appconfiguration/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-appconfiguration/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .app_configuration_management_client import AppConfigurationManagementClient
from .version import VERSION

__all__ = ['AppConfigurationManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.configuration_stores_operations import ConfigurationStoresOperations
from .operations.operations import Operations
from . import models


class AppConfigurationManagementClientConfiguration(AzureConfiguration):
"""Configuration for AppConfigurationManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The Microsoft Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(AppConfigurationManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-appconfiguration/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class AppConfigurationManagementClient(SDKClient):
"""AppConfigurationManagementClient

:ivar config: Configuration for client.
:vartype config: AppConfigurationManagementClientConfiguration

:ivar configuration_stores: ConfigurationStores operations
:vartype configuration_stores: azure.mgmt.appconfiguration.operations.ConfigurationStoresOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.appconfiguration.operations.Operations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The Microsoft Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = AppConfigurationManagementClientConfiguration(credentials, subscription_id, base_url)
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._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.configuration_stores = ConfigurationStoresOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

try:
from .configuration_store_py3 import ConfigurationStore
from .configuration_store_update_parameters_py3 import ConfigurationStoreUpdateParameters
from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters
from .name_availability_status_py3 import NameAvailabilityStatus
from .api_key_py3 import ApiKey
from .regenerate_key_parameters_py3 import RegenerateKeyParameters
from .operation_definition_display_py3 import OperationDefinitionDisplay
from .operation_definition_py3 import OperationDefinition
from .error_py3 import Error, ErrorException
from .resource_py3 import Resource
except (SyntaxError, ImportError):
from .configuration_store import ConfigurationStore
from .configuration_store_update_parameters import ConfigurationStoreUpdateParameters
from .check_name_availability_parameters import CheckNameAvailabilityParameters
from .name_availability_status import NameAvailabilityStatus
from .api_key import ApiKey
from .regenerate_key_parameters import RegenerateKeyParameters
from .operation_definition_display import OperationDefinitionDisplay
from .operation_definition import OperationDefinition
from .error import Error, ErrorException
from .resource import Resource
from .configuration_store_paged import ConfigurationStorePaged
from .api_key_paged import ApiKeyPaged
from .operation_definition_paged import OperationDefinitionPaged
from .app_configuration_management_client_enums import (
ProvisioningState,
)

__all__ = [
'ConfigurationStore',
'ConfigurationStoreUpdateParameters',
'CheckNameAvailabilityParameters',
'NameAvailabilityStatus',
'ApiKey',
'RegenerateKeyParameters',
'OperationDefinitionDisplay',
'OperationDefinition',
'Error', 'ErrorException',
'Resource',
'ConfigurationStorePaged',
'ApiKeyPaged',
'OperationDefinitionPaged',
'ProvisioningState',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ApiKey(Model):
"""An API key used for authenticating with a configuration store endpoint.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The key ID.
:vartype id: str
:ivar name: A name for the key describing its usage.
:vartype name: str
:ivar value: The value of the key that is used for authentication
purposes.
:vartype value: str
:ivar connection_string: A connection string that can be used by
supporting clients for authentication.
:vartype connection_string: str
:ivar last_modified: The last time any of the key's properties were
modified.
:vartype last_modified: datetime
:ivar read_only: Whether this key can only be used for read operations.
:vartype read_only: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'value': {'readonly': True},
'connection_string': {'readonly': True},
'last_modified': {'readonly': True},
'read_only': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'connection_string': {'key': 'connectionString', 'type': 'str'},
'last_modified': {'key': 'lastModified', 'type': 'iso-8601'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(ApiKey, self).__init__(**kwargs)
self.id = None
self.name = None
self.value = None
self.connection_string = None
self.last_modified = None
self.read_only = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class ApiKeyPaged(Paged):
"""
A paging container for iterating over a list of :class:`ApiKey <azure.mgmt.appconfiguration.models.ApiKey>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ApiKey]'}
}

def __init__(self, *args, **kwargs):

super(ApiKeyPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ApiKey(Model):
"""An API key used for authenticating with a configuration store endpoint.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The key ID.
:vartype id: str
:ivar name: A name for the key describing its usage.
:vartype name: str
:ivar value: The value of the key that is used for authentication
purposes.
:vartype value: str
:ivar connection_string: A connection string that can be used by
supporting clients for authentication.
:vartype connection_string: str
:ivar last_modified: The last time any of the key's properties were
modified.
:vartype last_modified: datetime
:ivar read_only: Whether this key can only be used for read operations.
:vartype read_only: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'value': {'readonly': True},
'connection_string': {'readonly': True},
'last_modified': {'readonly': True},
'read_only': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'connection_string': {'key': 'connectionString', 'type': 'str'},
'last_modified': {'key': 'lastModified', 'type': 'iso-8601'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
}

def __init__(self, **kwargs) -> None:
super(ApiKey, self).__init__(**kwargs)
self.id = None
self.name = None
self.value = None
self.connection_string = None
self.last_modified = None
self.read_only = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from enum import Enum


class ProvisioningState(str, Enum):

creating = "Creating"
updating = "Updating"
deleting = "Deleting"
succeeded = "Succeeded"
failed = "Failed"
canceled = "Canceled"
Loading