Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import CPIMConfigurationClientConfiguration
from ._cpim_configuration_client import CPIMConfigurationClient
__all__ = ['CPIMConfigurationClient', 'CPIMConfigurationClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class CPIMConfigurationClientConfiguration(AzureConfiguration):
"""Configuration for CPIMConfigurationClient
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: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
: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(CPIMConfigurationClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

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

self.credentials = credentials
self.subscription_id = subscription_id
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.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import CPIMConfigurationClientConfiguration
from .operations import B2CTenantsOperations
from .operations import Operations
from . import models


class CPIMConfigurationClient(SDKClient):
"""CPIM Configuration Client

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

:ivar b2_ctenants: B2CTenants operations
:vartype b2_ctenants: azure.mgmt.azureadb2c.v2019_01_01_preview.operations.B2CTenantsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.azureadb2c.v2019_01_01_preview.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: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = CPIMConfigurationClientConfiguration(credentials, subscription_id, base_url)
super(CPIMConfigurationClient, 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-01-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.b2_ctenants = B2CTenantsOperations(
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,76 @@
# 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 ._models_py3 import AsyncOperationStatus
from ._models_py3 import AsyncOperationStatusError
from ._models_py3 import B2CResourceSKU
from ._models_py3 import B2CTenantResource
from ._models_py3 import B2CTenantResourcePropertiesBillingConfig
from ._models_py3 import B2CTenantUpdateRequest
from ._models_py3 import CheckNameAvailabilityRequestBody
from ._models_py3 import CreateTenantRequestBody
from ._models_py3 import CreateTenantRequestBodyProperties
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse
from ._models_py3 import NameAvailabilityResponse
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
except (SyntaxError, ImportError):
from ._models import AsyncOperationStatus
from ._models import AsyncOperationStatusError
from ._models import B2CResourceSKU
from ._models import B2CTenantResource
from ._models import B2CTenantResourcePropertiesBillingConfig
from ._models import B2CTenantUpdateRequest
from ._models import CheckNameAvailabilityRequestBody
from ._models import CreateTenantRequestBody
from ._models import CreateTenantRequestBodyProperties
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse
from ._models import NameAvailabilityResponse
from ._models import Operation
from ._models import OperationDisplay
from ._paged_models import B2CTenantResourcePaged
from ._paged_models import OperationPaged
from ._cpim_configuration_client_enums import (
StatusType,
BillingType,
B2CResourceSKUName,
B2CResourceSKUTier,
NameAvailabilityReasonType,
TypeValue,
)

__all__ = [
'AsyncOperationStatus',
'AsyncOperationStatusError',
'B2CResourceSKU',
'B2CTenantResource',
'B2CTenantResourcePropertiesBillingConfig',
'B2CTenantUpdateRequest',
'CheckNameAvailabilityRequestBody',
'CreateTenantRequestBody',
'CreateTenantRequestBodyProperties',
'ErrorAdditionalInfo',
'ErrorResponse',
'NameAvailabilityResponse',
'Operation',
'OperationDisplay',
'B2CTenantResourcePaged',
'OperationPaged',
'StatusType',
'BillingType',
'B2CResourceSKUName',
'B2CResourceSKUTier',
'NameAvailabilityReasonType',
'TypeValue',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 StatusType(str, Enum):

succeeded = "Succeeded" #: The operation succeeded.
pending = "Pending" #: The operation is pending.
failed = "Failed" #: The operation failed.


class BillingType(str, Enum):

mau = "MAU" #: Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users (MAU) billing model.
auths = "Auths" #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing.


class B2CResourceSKUName(str, Enum):

standard = "Standard" #: Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users (MAU) billing model.
premium_p1 = "PremiumP1" #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing.
premium_p2 = "PremiumP2" #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing.


class B2CResourceSKUTier(str, Enum):

a0 = "A0" #: The SKU tier used for all Azure AD B2C tenants.


class NameAvailabilityReasonType(str, Enum):

already_exists = "AlreadyExists" #: The name is already in use and is therefore unavailable.
invalid = "Invalid" #: The name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.).


class TypeValue(str, Enum):

microsoft_azure_active_directoryb2c_directories = "Microsoft.AzureActiveDirectory/b2cDirectories" #: The resource type for Azure AD B2C tenant resource.
Loading