use types.json#/definitions/Resource

This commit is contained in:
Jim Minter 2020-01-02 10:32:53 -06:00
Родитель a4619fecb2
Коммит ff0147081a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 0730CBDA10D1A2D3
9 изменённых файлов: 498 добавлений и 113 удалений

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

@ -1 +1 @@
62acfd4bb60706ffd50717d791f43b4093ac30c140da0447fab9f20bafa6994d swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2019-12-31-preview/redhatopenshift.json
3e74ae0b44d701ee0d77c72b50ff31de165f255fe434307ef8a339d99e8ae0e2 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2019-12-31-preview/redhatopenshift.json

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

@ -94,6 +94,18 @@ type APIServerProfile struct {
IP *string `json:"ip,omitempty"`
}
// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag.
type AzureEntityResource struct {
// Etag - READ-ONLY; Resource Etag.
Etag *string `json:"etag,omitempty"`
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type *string `json:"type,omitempty"`
}
// CloudError cloudError represents a cloud error.
type CloudError struct {
// Error - An error response from the service.
@ -153,29 +165,29 @@ type NetworkProfile struct {
// OpenShiftCluster openShiftCluster represents an Azure Red Hat OpenShift cluster.
type OpenShiftCluster struct {
autorest.Response `json:"-"`
// ID - READ-ONLY; The resource ID (immutable).
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The resource name (immutable).
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The resource type (immutable).
Type *string `json:"type,omitempty"`
// Location - The resource location (immutable).
Location *string `json:"location,omitempty"`
// Tags - The resource tags.
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// Properties - The cluster properties.
*Properties `json:"properties,omitempty"`
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for OpenShiftCluster.
func (osc OpenShiftCluster) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if osc.Location != nil {
objectMap["location"] = osc.Location
}
if osc.Tags != nil {
objectMap["tags"] = osc.Tags
}
if osc.Location != nil {
objectMap["location"] = osc.Location
}
if osc.Properties != nil {
objectMap["properties"] = osc.Properties
}
@ -191,6 +203,33 @@ func (osc *OpenShiftCluster) UnmarshalJSON(body []byte) error {
}
for k, v := range m {
switch k {
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
osc.Tags = tags
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
osc.Location = &location
}
case "properties":
if v != nil {
var properties Properties
err = json.Unmarshal(*v, &properties)
if err != nil {
return err
}
osc.Properties = &properties
}
case "id":
if v != nil {
var ID string
@ -218,33 +257,6 @@ func (osc *OpenShiftCluster) UnmarshalJSON(body []byte) error {
}
osc.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
osc.Location = &location
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
osc.Tags = tags
}
case "properties":
if v != nil {
var properties Properties
err = json.Unmarshal(*v, &properties)
if err != nil {
return err
}
osc.Properties = &properties
}
}
}
@ -385,6 +397,27 @@ type Properties struct {
ConsoleURL *string `json:"consoleUrl,omitempty"`
}
// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
// required location and tags
type ProxyResource struct {
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type *string `json:"type,omitempty"`
}
// Resource ...
type Resource struct {
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type *string `json:"type,omitempty"`
}
// ServicePrincipalProfile servicePrincipalProfile represents a service principal profile.
type ServicePrincipalProfile struct {
// ClientID - The client ID used for the cluster (immutable).
@ -393,6 +426,32 @@ type ServicePrincipalProfile struct {
ClientSecret *string `json:"clientSecret,omitempty"`
}
// TrackedResource the resource model definition for a ARM tracked top level resource
type TrackedResource struct {
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for TrackedResource.
func (tr TrackedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if tr.Tags != nil {
objectMap["tags"] = tr.Tags
}
if tr.Location != nil {
objectMap["location"] = tr.Location
}
return json.Marshal(objectMap)
}
// WorkerProfile workerProfile represents a worker profile.
type WorkerProfile struct {
// Name - The worker profile name. Must be "worker" (immutable).

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

@ -97,9 +97,6 @@ func (client OpenShiftClustersClient) CreateOrUpdatePreparer(ctx context.Context
"api-version": APIVersion,
}
parameters.ID = nil
parameters.Name = nil
parameters.Type = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
@ -619,9 +616,6 @@ func (client OpenShiftClustersClient) UpdatePreparer(ctx context.Context, resour
"api-version": APIVersion,
}
parameters.ID = nil
parameters.Name = nil
parameters.Type = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),

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

@ -75,19 +75,54 @@ func Run(outputFile string) error {
return err
}
s.Definitions["OpenShiftCluster"].AzureResource = true
for i, property := range s.Definitions["OpenShiftCluster"].Properties {
switch property.Name {
case "name", "id", "type":
property.Schema.ReadOnly = true
case "location":
property.Schema.Mutability = []string{"create", "read"}
case "properties":
for _, azureResource := range []string{"OpenShiftCluster"} {
s.Definitions[azureResource].AllOf = []Schema{
{
Ref: "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource",
},
}
properties := []NameSchema{
{
Name: "tags",
Schema: &Schema{
Description: "Resource tags.",
Type: "object",
AdditionalProperties: &Schema{
Type: "string",
},
Mutability: []string{
"read",
"create",
"update",
},
},
},
{
Name: "location",
Schema: &Schema{
Description: "The geo-location where the resource lives",
Type: "string",
Mutability: []string{
"read",
"create",
},
},
},
}
for _, property := range s.Definitions[azureResource].Properties {
if property.Name == "properties" {
property.Schema.ClientFlatten = true
properties = append(properties, property)
}
s.Definitions["OpenShiftCluster"].Properties[i] = property
}
s.Definitions[azureResource].Properties = properties
}
delete(s.Definitions, "Tags")
f := os.Stdout
if outputFile != "" {
var err error

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

@ -239,7 +239,6 @@ type Schema struct {
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
Example interface{} `json:"example,omitempty"`
AzureResource bool `json:"x-ms-azure-resource,omitempty"`
ClientFlatten bool `json:"x-ms-client-flatten,omitempty"`
Mutability []string `json:"x-ms-mutability,omitempty"`
}

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

@ -21,6 +21,7 @@
try:
from ._models_py3 import APIServerProfile
from ._models_py3 import AzureEntityResource
from ._models_py3 import CloudError, CloudErrorException
from ._models_py3 import CloudErrorBody
from ._models_py3 import Display
@ -32,10 +33,14 @@ try:
from ._models_py3 import OpenShiftClusterList
from ._models_py3 import Operation
from ._models_py3 import OperationList
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import ServicePrincipalProfile
from ._models_py3 import TrackedResource
from ._models_py3 import WorkerProfile
except (SyntaxError, ImportError):
from ._models import APIServerProfile
from ._models import AzureEntityResource
from ._models import CloudError, CloudErrorException
from ._models import CloudErrorBody
from ._models import Display
@ -47,11 +52,15 @@ except (SyntaxError, ImportError):
from ._models import OpenShiftClusterList
from ._models import Operation
from ._models import OperationList
from ._models import ProxyResource
from ._models import Resource
from ._models import ServicePrincipalProfile
from ._models import TrackedResource
from ._models import WorkerProfile
__all__ = [
'APIServerProfile',
'AzureEntityResource',
'CloudError', 'CloudErrorException',
'CloudErrorBody',
'Display',
@ -63,6 +72,9 @@ __all__ = [
'OpenShiftClusterList',
'Operation',
'OperationList',
'ProxyResource',
'Resource',
'ServicePrincipalProfile',
'TrackedResource',
'WorkerProfile',
]

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

@ -48,6 +48,79 @@ class APIServerProfile(Model):
self.ip = kwargs.get('ip', None)
class Resource(Model):
"""Resource.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'etag': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
}
def __init__(self, **kwargs):
super(AzureEntityResource, self).__init__(**kwargs)
self.etag = None
class CloudError(Model):
"""CloudError represents a cloud error.
@ -206,22 +279,24 @@ class NetworkProfile(Model):
self.service_cidr = kwargs.get('service_cidr', None)
class OpenShiftCluster(Model):
class OpenShiftCluster(Resource):
"""OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The resource ID (immutable).
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The resource name (immutable).
:ivar name: The name of the resource
:vartype name: str
:ivar type: The resource type (immutable).
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:param location: The resource location (immutable).
:type location: str
:param tags: The resource tags.
:param tags: Resource tags.
:type tags: dict[str, str]
:param location: The geo-location where the resource lives
:type location: str
:param provisioning_state: The cluster provisioning state (immutable).
Possible values include: 'Creating', 'Deleting', 'Failed', 'Succeeded',
'Updating'
@ -261,8 +336,8 @@ class OpenShiftCluster(Model):
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'cluster_domain': {'key': 'properties.clusterDomain', 'type': 'str'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'},
@ -276,11 +351,8 @@ class OpenShiftCluster(Model):
def __init__(self, **kwargs):
super(OpenShiftCluster, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.location = kwargs.get('location', None)
self.tags = kwargs.get('tags', None)
self.location = kwargs.get('location', None)
self.provisioning_state = kwargs.get('provisioning_state', None)
self.cluster_domain = kwargs.get('cluster_domain', None)
self.service_principal_profile = kwargs.get('service_principal_profile', None)
@ -367,6 +439,39 @@ class OperationList(Model):
self.value = kwargs.get('value', None)
class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ProxyResource, self).__init__(**kwargs)
class ServicePrincipalProfile(Model):
"""ServicePrincipalProfile represents a service principal profile.
@ -387,6 +492,49 @@ class ServicePrincipalProfile(Model):
self.client_secret = kwargs.get('client_secret', None)
class TrackedResource(Resource):
"""The resource model definition for a ARM tracked top level resource.
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: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param location: Required. The geo-location where the resource lives
:type location: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
}
def __init__(self, **kwargs):
super(TrackedResource, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
self.location = kwargs.get('location', None)
class WorkerProfile(Model):
"""WorkerProfile represents a worker profile.

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

@ -48,6 +48,79 @@ class APIServerProfile(Model):
self.ip = ip
class Resource(Model):
"""Resource.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'etag': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(AzureEntityResource, self).__init__(**kwargs)
self.etag = None
class CloudError(Model):
"""CloudError represents a cloud error.
@ -206,22 +279,24 @@ class NetworkProfile(Model):
self.service_cidr = service_cidr
class OpenShiftCluster(Model):
class OpenShiftCluster(Resource):
"""OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The resource ID (immutable).
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The resource name (immutable).
:ivar name: The name of the resource
:vartype name: str
:ivar type: The resource type (immutable).
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:param location: The resource location (immutable).
:type location: str
:param tags: The resource tags.
:param tags: Resource tags.
:type tags: dict[str, str]
:param location: The geo-location where the resource lives
:type location: str
:param provisioning_state: The cluster provisioning state (immutable).
Possible values include: 'Creating', 'Deleting', 'Failed', 'Succeeded',
'Updating'
@ -261,8 +336,8 @@ class OpenShiftCluster(Model):
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'cluster_domain': {'key': 'properties.clusterDomain', 'type': 'str'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'},
@ -274,13 +349,10 @@ class OpenShiftCluster(Model):
'console_url': {'key': 'properties.consoleUrl', 'type': 'str'},
}
def __init__(self, *, location: str=None, tags=None, provisioning_state=None, cluster_domain: str=None, service_principal_profile=None, network_profile=None, master_profile=None, worker_profiles=None, apiserver_profile=None, ingress_profiles=None, console_url: str=None, **kwargs) -> None:
def __init__(self, *, tags=None, location: str=None, provisioning_state=None, cluster_domain: str=None, service_principal_profile=None, network_profile=None, master_profile=None, worker_profiles=None, apiserver_profile=None, ingress_profiles=None, console_url: str=None, **kwargs) -> None:
super(OpenShiftCluster, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.location = location
self.tags = tags
self.location = location
self.provisioning_state = provisioning_state
self.cluster_domain = cluster_domain
self.service_principal_profile = service_principal_profile
@ -367,6 +439,39 @@ class OperationList(Model):
self.value = value
class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(ProxyResource, self).__init__(**kwargs)
class ServicePrincipalProfile(Model):
"""ServicePrincipalProfile represents a service principal profile.
@ -387,6 +492,49 @@ class ServicePrincipalProfile(Model):
self.client_secret = client_secret
class TrackedResource(Resource):
"""The resource model definition for a ARM tracked top level resource.
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: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param location: Required. The geo-location where the resource lives
:type location: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
}
def __init__(self, *, location: str, tags=None, **kwargs) -> None:
super(TrackedResource, self).__init__(**kwargs)
self.tags = tags
self.location = location
class WorkerProfile(Model):
"""WorkerProfile represents a worker profile.

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

@ -507,41 +507,38 @@
},
"OpenShiftCluster": {
"description": "OpenShiftCluster represents an Azure Red Hat OpenShift cluster.",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource"
}
],
"properties": {
"id": {
"description": "The resource ID (immutable).",
"type": "string",
"readOnly": true
"tags": {
"description": "Resource tags.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"name": {
"description": "The resource name (immutable).",
"type": "string",
"readOnly": true
},
"type": {
"description": "The resource type (immutable).",
"type": "string",
"readOnly": true
},
"location": {
"description": "The resource location (immutable).",
"type": "string",
"x-ms-mutability": [
"read",
"create",
"read"
"update"
]
},
"tags": {
"$ref": "#/definitions/Tags",
"description": "The resource tags."
"location": {
"description": "The geo-location where the resource lives",
"type": "string",
"x-ms-mutability": [
"read",
"create"
]
},
"properties": {
"$ref": "#/definitions/Properties",
"description": "The cluster properties.",
"x-ms-client-flatten": true
}
},
"x-ms-azure-resource": true
}
},
"OpenShiftClusterCredentials": {
"description": "OpenShiftClusterCredentials represents an OpenShift cluster's credentials",
@ -664,13 +661,6 @@
}
}
},
"Tags": {
"description": "Tags represents an OpenShift cluster's tags.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"VMSize": {
"description": "VMSize represents a VM size.",
"enum": [