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

[ReleasePR azure-mgmt-blueprint] Blueprints: Make layout readOnly #15753

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
19 changes: 19 additions & 0 deletions sdk/azure-mgmt-blueprint/azure/mgmt/blueprint/__init__.py
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 BlueprintManagementClientConfiguration
from ._blueprint_management_client import BlueprintManagementClient
__all__ = ['BlueprintManagementClient', 'BlueprintManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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 BlueprintManagementClientConfiguration
from .operations import BlueprintsOperations
from .operations import ArtifactsOperations
from .operations import PublishedBlueprintsOperations
from .operations import PublishedArtifactsOperations
from .operations import AssignmentsOperations
from .operations import AssignmentOperations
from . import models


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)
43 changes: 43 additions & 0 deletions sdk/azure-mgmt-blueprint/azure/mgmt/blueprint/_configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 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)

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

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

self.credentials = credentials
136 changes: 136 additions & 0 deletions sdk/azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# 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 Artifact
from ._models_py3 import Assignment
from ._models_py3 import AssignmentDeploymentJob
from ._models_py3 import AssignmentDeploymentJobResult
from ._models_py3 import AssignmentJobCreatedResource
from ._models_py3 import AssignmentLockSettings
from ._models_py3 import AssignmentOperation
from ._models_py3 import AssignmentStatus
from ._models_py3 import AzureResourceBase
from ._models_py3 import AzureResourceManagerError
from ._models_py3 import Blueprint
from ._models_py3 import BlueprintResourceStatusBase
from ._models_py3 import BlueprintStatus
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse
from ._models_py3 import KeyVaultReference
from ._models_py3 import ManagedServiceIdentity
from ._models_py3 import ParameterDefinition
from ._models_py3 import ParameterValue
from ._models_py3 import PolicyAssignmentArtifact
from ._models_py3 import PublishedBlueprint
from ._models_py3 import ResourceGroupDefinition
from ._models_py3 import ResourceGroupValue
from ._models_py3 import ResourceProviderOperation
from ._models_py3 import ResourceProviderOperationDisplay
from ._models_py3 import ResourceProviderOperationList
from ._models_py3 import RoleAssignmentArtifact
from ._models_py3 import SecretValueReference
from ._models_py3 import TemplateArtifact
from ._models_py3 import TrackedResource
from ._models_py3 import UserAssignedIdentity
from ._models_py3 import WhoIsBlueprintContract
except (SyntaxError, ImportError):
from ._models import Artifact
from ._models import Assignment
from ._models import AssignmentDeploymentJob
from ._models import AssignmentDeploymentJobResult
from ._models import AssignmentJobCreatedResource
from ._models import AssignmentLockSettings
from ._models import AssignmentOperation
from ._models import AssignmentStatus
from ._models import AzureResourceBase
from ._models import AzureResourceManagerError
from ._models import Blueprint
from ._models import BlueprintResourceStatusBase
from ._models import BlueprintStatus
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse
from ._models import KeyVaultReference
from ._models import ManagedServiceIdentity
from ._models import ParameterDefinition
from ._models import ParameterValue
from ._models import PolicyAssignmentArtifact
from ._models import PublishedBlueprint
from ._models import ResourceGroupDefinition
from ._models import ResourceGroupValue
from ._models import ResourceProviderOperation
from ._models import ResourceProviderOperationDisplay
from ._models import ResourceProviderOperationList
from ._models import RoleAssignmentArtifact
from ._models import SecretValueReference
from ._models import TemplateArtifact
from ._models import TrackedResource
from ._models import UserAssignedIdentity
from ._models import WhoIsBlueprintContract
from ._paged_models import ArtifactPaged
from ._paged_models import AssignmentOperationPaged
from ._paged_models import AssignmentPaged
from ._paged_models import BlueprintPaged
from ._paged_models import PublishedBlueprintPaged
from ._blueprint_management_client_enums import (
BlueprintTargetScope,
TemplateParameterType,
ManagedServiceIdentityType,
AssignmentLockMode,
AssignmentProvisioningState,
AssignmentDeleteBehavior,
)

__all__ = [
'Artifact',
'Assignment',
'AssignmentDeploymentJob',
'AssignmentDeploymentJobResult',
'AssignmentJobCreatedResource',
'AssignmentLockSettings',
'AssignmentOperation',
'AssignmentStatus',
'AzureResourceBase',
'AzureResourceManagerError',
'Blueprint',
'BlueprintResourceStatusBase',
'BlueprintStatus',
'ErrorAdditionalInfo',
'ErrorResponse',
'KeyVaultReference',
'ManagedServiceIdentity',
'ParameterDefinition',
'ParameterValue',
'PolicyAssignmentArtifact',
'PublishedBlueprint',
'ResourceGroupDefinition',
'ResourceGroupValue',
'ResourceProviderOperation',
'ResourceProviderOperationDisplay',
'ResourceProviderOperationList',
'RoleAssignmentArtifact',
'SecretValueReference',
'TemplateArtifact',
'TrackedResource',
'UserAssignedIdentity',
'WhoIsBlueprintContract',
'BlueprintPaged',
'ArtifactPaged',
'PublishedBlueprintPaged',
'AssignmentPaged',
'AssignmentOperationPaged',
'BlueprintTargetScope',
'TemplateParameterType',
'ManagedServiceIdentityType',
'AssignmentLockMode',
'AssignmentProvisioningState',
'AssignmentDeleteBehavior',
]
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 enum import Enum


class BlueprintTargetScope(str, Enum):

subscription = "subscription" #: The blueprint targets a subscription during blueprint assignment.
management_group = "managementGroup" #: The blueprint targets a management group during blueprint assignment. This is reserved for future use.


class TemplateParameterType(str, Enum):

string = "string"
array = "array"
bool_enum = "bool"
int_enum = "int"
object_enum = "object"
secure_object = "secureObject"
secure_string = "secureString"


class ManagedServiceIdentityType(str, Enum):

none = "None"
system_assigned = "SystemAssigned"
user_assigned = "UserAssigned"


class AssignmentLockMode(str, Enum):

none = "None"
all_resources_read_only = "AllResourcesReadOnly"
all_resources_do_not_delete = "AllResourcesDoNotDelete"


class AssignmentProvisioningState(str, Enum):

creating = "creating"
validating = "validating"
waiting = "waiting"
deploying = "deploying"
cancelling = "cancelling"
locking = "locking"
succeeded = "succeeded"
failed = "failed"
canceled = "canceled"
deleting = "deleting"


class AssignmentDeleteBehavior(str, Enum):

none = "none"
all = "all"
Loading