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] blueprint/resource-manager #4158

Closed
wants to merge 9 commits into from
Closed
9 changes: 9 additions & 0 deletions azure-mgmt-blueprint/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-blueprint/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-blueprint/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-blueprint%2FREADME.png
1 change: 1 addition & 0 deletions azure-mgmt-blueprint/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-blueprint/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
18 changes: 18 additions & 0 deletions azure-mgmt-blueprint/azure/mgmt/blueprint/__init__.py
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 .blueprint_management_client import BlueprintManagementClient
from .version import VERSION

__all__ = ['BlueprintManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 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.blueprints_operations import BlueprintsOperations
from .operations.artifacts_operations import ArtifactsOperations
from .operations.published_blueprints_operations import PublishedBlueprintsOperations
from .operations.published_artifacts_operations import PublishedArtifactsOperations
from .operations.assignments_operations import AssignmentsOperations
from .operations.assignment_operations import AssignmentOperations
from . import models


class BlueprintManagementClientConfiguration(AzureConfiguration):
"""Configuration for BlueprintManagementClient
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 str base_url: Service URL
"""

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

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

super(BlueprintManagementClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials


class BlueprintManagementClient(SDKClient):
"""Blueprint Client

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

:ivar blueprints: Blueprints operations
:vartype blueprints: azure.mgmt.blueprint.operations.BlueprintsOperations
:ivar artifacts: Artifacts operations
:vartype artifacts: azure.mgmt.blueprint.operations.ArtifactsOperations
:ivar published_blueprints: PublishedBlueprints operations
:vartype published_blueprints: azure.mgmt.blueprint.operations.PublishedBlueprintsOperations
:ivar published_artifacts: PublishedArtifacts operations
:vartype published_artifacts: azure.mgmt.blueprint.operations.PublishedArtifactsOperations
:ivar assignments: Assignments operations
:vartype assignments: azure.mgmt.blueprint.operations.AssignmentsOperations
:ivar assignment_operations: AssignmentOperations operations
:vartype assignment_operations: azure.mgmt.blueprint.operations.AssignmentOperations

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

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

self.config = BlueprintManagementClientConfiguration(credentials, base_url)
super(BlueprintManagementClient, 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 = '2018-11-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.blueprints = BlueprintsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.artifacts = ArtifactsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.published_blueprints = PublishedBlueprintsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.published_artifacts = PublishedArtifactsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.assignments = AssignmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.assignment_operations = AssignmentOperations(
self._client, self.config, self._serialize, self._deserialize)
134 changes: 134 additions & 0 deletions azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# 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 .blueprint_py3 import Blueprint
from .artifact_py3 import Artifact
from .published_blueprint_py3 import PublishedBlueprint
from .resource_provider_operation_display_py3 import ResourceProviderOperationDisplay
from .resource_provider_operation_py3 import ResourceProviderOperation
from .resource_provider_operation_list_py3 import ResourceProviderOperationList
from .blueprint_status_py3 import BlueprintStatus
from .parameter_definition_py3 import ParameterDefinition
from .resource_group_definition_py3 import ResourceGroupDefinition
from .parameter_value_base_py3 import ParameterValueBase
from .template_artifact_py3 import TemplateArtifact
from .role_assignment_artifact_py3 import RoleAssignmentArtifact
from .policy_assignment_artifact_py3 import PolicyAssignmentArtifact
from .parameter_value_py3 import ParameterValue
from .key_vault_reference_py3 import KeyVaultReference
from .secret_value_reference_py3 import SecretValueReference
from .secret_reference_parameter_value_py3 import SecretReferenceParameterValue
from .resource_group_value_py3 import ResourceGroupValue
from .azure_resource_base_py3 import AzureResourceBase
from .blueprint_resource_status_base_py3 import BlueprintResourceStatusBase
from .user_assigned_identity_py3 import UserAssignedIdentity
from .managed_service_identity_py3 import ManagedServiceIdentity
from .assignment_status_py3 import AssignmentStatus
from .assignment_lock_settings_py3 import AssignmentLockSettings
from .assignment_py3 import Assignment
from .tracked_resource_py3 import TrackedResource
from .who_is_blueprint_contract_py3 import WhoIsBlueprintContract
from .azure_resource_manager_error_py3 import AzureResourceManagerError
from .assignment_job_created_resource_py3 import AssignmentJobCreatedResource
from .assignment_deployment_job_result_py3 import AssignmentDeploymentJobResult
from .assignment_deployment_job_py3 import AssignmentDeploymentJob
from .assignment_operation_py3 import AssignmentOperation
except (SyntaxError, ImportError):
from .blueprint import Blueprint
from .artifact import Artifact
from .published_blueprint import PublishedBlueprint
from .resource_provider_operation_display import ResourceProviderOperationDisplay
from .resource_provider_operation import ResourceProviderOperation
from .resource_provider_operation_list import ResourceProviderOperationList
from .blueprint_status import BlueprintStatus
from .parameter_definition import ParameterDefinition
from .resource_group_definition import ResourceGroupDefinition
from .parameter_value_base import ParameterValueBase
from .template_artifact import TemplateArtifact
from .role_assignment_artifact import RoleAssignmentArtifact
from .policy_assignment_artifact import PolicyAssignmentArtifact
from .parameter_value import ParameterValue
from .key_vault_reference import KeyVaultReference
from .secret_value_reference import SecretValueReference
from .secret_reference_parameter_value import SecretReferenceParameterValue
from .resource_group_value import ResourceGroupValue
from .azure_resource_base import AzureResourceBase
from .blueprint_resource_status_base import BlueprintResourceStatusBase
from .user_assigned_identity import UserAssignedIdentity
from .managed_service_identity import ManagedServiceIdentity
from .assignment_status import AssignmentStatus
from .assignment_lock_settings import AssignmentLockSettings
from .assignment import Assignment
from .tracked_resource import TrackedResource
from .who_is_blueprint_contract import WhoIsBlueprintContract
from .azure_resource_manager_error import AzureResourceManagerError
from .assignment_job_created_resource import AssignmentJobCreatedResource
from .assignment_deployment_job_result import AssignmentDeploymentJobResult
from .assignment_deployment_job import AssignmentDeploymentJob
from .assignment_operation import AssignmentOperation
from .blueprint_paged import BlueprintPaged
from .artifact_paged import ArtifactPaged
from .published_blueprint_paged import PublishedBlueprintPaged
from .assignment_paged import AssignmentPaged
from .assignment_operation_paged import AssignmentOperationPaged
from .blueprint_management_client_enums import (
BlueprintTargetScope,
TemplateParameterType,
ManagedServiceIdentityType,
AssignmentLockMode,
AssignmentProvisioningState,
)

__all__ = [
'Blueprint',
'Artifact',
'PublishedBlueprint',
'ResourceProviderOperationDisplay',
'ResourceProviderOperation',
'ResourceProviderOperationList',
'BlueprintStatus',
'ParameterDefinition',
'ResourceGroupDefinition',
'ParameterValueBase',
'TemplateArtifact',
'RoleAssignmentArtifact',
'PolicyAssignmentArtifact',
'ParameterValue',
'KeyVaultReference',
'SecretValueReference',
'SecretReferenceParameterValue',
'ResourceGroupValue',
'AzureResourceBase',
'BlueprintResourceStatusBase',
'UserAssignedIdentity',
'ManagedServiceIdentity',
'AssignmentStatus',
'AssignmentLockSettings',
'Assignment',
'TrackedResource',
'WhoIsBlueprintContract',
'AzureResourceManagerError',
'AssignmentJobCreatedResource',
'AssignmentDeploymentJobResult',
'AssignmentDeploymentJob',
'AssignmentOperation',
'BlueprintPaged',
'ArtifactPaged',
'PublishedBlueprintPaged',
'AssignmentPaged',
'AssignmentOperationPaged',
'BlueprintTargetScope',
'TemplateParameterType',
'ManagedServiceIdentityType',
'AssignmentLockMode',
'AssignmentProvisioningState',
]
58 changes: 58 additions & 0 deletions azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 .azure_resource_base import AzureResourceBase


class Artifact(AzureResourceBase):
"""Represents a blueprint artifact.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: TemplateArtifact, RoleAssignmentArtifact,
PolicyAssignmentArtifact

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

All required parameters must be populated in order to send to Azure.

:ivar id: String Id used to locate any resource on Azure.
:vartype id: str
:ivar type: Type of this resource.
:vartype type: str
:ivar name: Name of this resource.
:vartype name: str
:param kind: Required. Constant filled by server.
:type kind: str
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'kind': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}

_subtype_map = {
'kind': {'template': 'TemplateArtifact', 'roleAssignment': 'RoleAssignmentArtifact', 'policyAssignment': 'PolicyAssignmentArtifact'}
}

def __init__(self, **kwargs):
super(Artifact, self).__init__(**kwargs)
self.kind = None
self.kind = 'Artifact'
27 changes: 27 additions & 0 deletions azure-mgmt-blueprint/azure/mgmt/blueprint/models/artifact_paged.py
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 ArtifactPaged(Paged):
"""
A paging container for iterating over a list of :class:`Artifact <azure.mgmt.blueprint.models.Artifact>` object
"""

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

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

super(ArtifactPaged, self).__init__(*args, **kwargs)
Loading