id
int64
0
843k
repository_name
stringlengths
7
55
file_path
stringlengths
9
332
class_name
stringlengths
3
290
human_written_code
stringlengths
12
4.36M
class_skeleton
stringlengths
19
2.2M
total_program_units
int64
1
9.57k
total_doc_str
int64
0
4.2k
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
300
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
176
CountClassBase
float64
0
48
CountClassCoupled
float64
0
589
CountClassCoupledModified
float64
0
581
CountClassDerived
float64
0
5.37k
CountDeclInstanceMethod
float64
0
4.2k
CountDeclInstanceVariable
float64
0
299
CountDeclMethod
float64
0
4.2k
CountDeclMethodAll
float64
0
4.2k
CountLine
float64
1
115k
CountLineBlank
float64
0
9.01k
CountLineCode
float64
0
94.4k
CountLineCodeDecl
float64
0
46.1k
CountLineCodeExe
float64
0
91.3k
CountLineComment
float64
0
27k
CountStmt
float64
1
93.2k
CountStmtDecl
float64
0
46.1k
CountStmtExe
float64
0
90.2k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
6k
9,500
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/_list.py
azext_sentinel.aaz.latest.sentinel.bookmark._list.List.BookmarksList
class BookmarksList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", flags={"read_only": True}, ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.etag = AAZStrType() _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.created = AAZStrType() properties.created_by = AAZObjectType( serialized_name="createdBy", ) _build_schema_user_info_read(properties.created_by) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) properties.event_time = AAZStrType( serialized_name="eventTime", ) properties.incident_info = AAZObjectType( serialized_name="incidentInfo", ) properties.labels = AAZListType() properties.notes = AAZStrType() properties.query = AAZStrType( flags={"required": True}, ) properties.query_end_time = AAZStrType( serialized_name="queryEndTime", ) properties.query_result = AAZStrType( serialized_name="queryResult", ) properties.query_start_time = AAZStrType( serialized_name="queryStartTime", ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.updated = AAZStrType() properties.updated_by = AAZObjectType( serialized_name="updatedBy", ) _build_schema_user_info_read(properties.updated_by) entity_mappings = cls._schema_on_200.value.Element.properties.entity_mappings entity_mappings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.entity_mappings.Element _element.entity_type = AAZStrType( serialized_name="entityType", ) _element.field_mappings = AAZListType( serialized_name="fieldMappings", ) field_mappings = cls._schema_on_200.value.Element.properties.entity_mappings.Element.field_mappings field_mappings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.entity_mappings.Element.field_mappings.Element _element.identifier = AAZStrType() _element.value = AAZStrType() incident_info = cls._schema_on_200.value.Element.properties.incident_info incident_info.incident_id = AAZStrType( serialized_name="incidentId", ) incident_info.relation_name = AAZStrType( serialized_name="relationName", ) incident_info.severity = AAZStrType() incident_info.title = AAZStrType() labels = cls._schema_on_200.value.Element.properties.labels labels.Element = AAZStrType() tactics = cls._schema_on_200.value.Element.properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.properties.techniques techniques.Element = AAZStrType() system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200
class BookmarksList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
22
2
20
0
1
0
1
0
0
0
8
0
9
9
216
26
190
36
173
0
91
29
81
2
1
1
11
9,501
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/_expand.py
azext_sentinel.aaz.latest.sentinel.bookmark._expand.Expand.BookmarkExpand
class BookmarkExpand(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand", **self.url_parameters ) @property def method(self): return "POST" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "bookmarkId", self.ctx.args.bookmark_id, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("endTime", AAZStrType, ".end_time") _builder.set_prop("expansionId", AAZStrType, ".expansion_id") _builder.set_prop("startTime", AAZStrType, ".start_time") return self.serialize_content(_content_value) def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.meta_data = AAZObjectType( serialized_name="metaData", ) _schema_on_200.value = AAZObjectType() meta_data = cls._schema_on_200.meta_data meta_data.aggregations = AAZListType() aggregations = cls._schema_on_200.meta_data.aggregations aggregations.Element = AAZObjectType() _element = cls._schema_on_200.meta_data.aggregations.Element _element.aggregation_type = AAZStrType( serialized_name="aggregationType", ) _element.count = AAZIntType( flags={"required": True}, ) _element.display_name = AAZStrType( serialized_name="displayName", ) _element.entity_kind = AAZStrType( serialized_name="entityKind", flags={"required": True}, ) value = cls._schema_on_200.value value.edges = AAZListType() value.entities = AAZListType() edges = cls._schema_on_200.value.edges edges.Element = AAZObjectType() _element = cls._schema_on_200.value.edges.Element _element.target_entity_id = AAZStrType( serialized_name="targetEntityId", ) entities = cls._schema_on_200.value.entities entities.Element = AAZObjectType() _element = cls._schema_on_200.value.entities.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.kind = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.value.entities.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_account = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Account") disc_account.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Account").properties properties.aad_tenant_id = AAZStrType( serialized_name="aadTenantId", flags={"read_only": True}, ) properties.aad_user_id = AAZStrType( serialized_name="aadUserId", flags={"read_only": True}, ) properties.account_name = AAZStrType( serialized_name="accountName", flags={"read_only": True}, ) properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.dns_domain = AAZStrType( serialized_name="dnsDomain", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.host_entity_id = AAZStrType( serialized_name="hostEntityId", flags={"read_only": True}, ) properties.is_domain_joined = AAZBoolType( serialized_name="isDomainJoined", flags={"read_only": True}, ) properties.nt_domain = AAZStrType( serialized_name="ntDomain", flags={"read_only": True}, ) properties.object_guid = AAZStrType( serialized_name="objectGuid", flags={"read_only": True}, ) properties.puid = AAZStrType( flags={"read_only": True}, ) properties.sid = AAZStrType( flags={"read_only": True}, ) properties.upn_suffix = AAZStrType( serialized_name="upnSuffix", flags={"read_only": True}, ) disc_azure_resource = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "AzureResource") disc_azure_resource.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "AzureResource").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.resource_id = AAZStrType( serialized_name="resourceId", flags={"read_only": True}, ) properties.subscription_id = AAZStrType( serialized_name="subscriptionId", flags={"read_only": True}, ) disc_bookmark = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Bookmark") disc_bookmark.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Bookmark").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.created = AAZStrType() properties.created_by = AAZObjectType( serialized_name="createdBy", ) _build_schema_user_info_read(properties.created_by) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.event_time = AAZStrType( serialized_name="eventTime", ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.incident_info = AAZObjectType( serialized_name="incidentInfo", ) properties.labels = AAZListType() properties.notes = AAZStrType() properties.query = AAZStrType( flags={"required": True}, ) properties.query_result = AAZStrType( serialized_name="queryResult", ) properties.updated = AAZStrType() properties.updated_by = AAZObjectType( serialized_name="updatedBy", ) _build_schema_user_info_read(properties.updated_by) incident_info = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Bookmark").properties.incident_info incident_info.incident_id = AAZStrType( serialized_name="incidentId", ) incident_info.relation_name = AAZStrType( serialized_name="relationName", ) incident_info.severity = AAZStrType() incident_info.title = AAZStrType() labels = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Bookmark").properties.labels labels.Element = AAZStrType() disc_cloud_application = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "CloudApplication") disc_cloud_application.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "CloudApplication").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.app_id = AAZIntType( serialized_name="appId", flags={"read_only": True}, ) properties.app_name = AAZStrType( serialized_name="appName", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.instance_name = AAZStrType( serialized_name="instanceName", flags={"read_only": True}, ) disc_dns_resolution = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "DnsResolution") disc_dns_resolution.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "DnsResolution").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.dns_server_ip_entity_id = AAZStrType( serialized_name="dnsServerIpEntityId", flags={"read_only": True}, ) properties.domain_name = AAZStrType( serialized_name="domainName", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.host_ip_address_entity_id = AAZStrType( serialized_name="hostIpAddressEntityId", flags={"read_only": True}, ) properties.ip_address_entity_ids = AAZListType( serialized_name="ipAddressEntityIds", flags={"read_only": True}, ) ip_address_entity_ids = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "DnsResolution").properties.ip_address_entity_ids ip_address_entity_ids.Element = AAZStrType( flags={"read_only": True}, ) disc_file = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "File") disc_file.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "File").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.directory = AAZStrType( flags={"read_only": True}, ) properties.file_hash_entity_ids = AAZListType( serialized_name="fileHashEntityIds", flags={"read_only": True}, ) properties.file_name = AAZStrType( serialized_name="fileName", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.host_entity_id = AAZStrType( serialized_name="hostEntityId", flags={"read_only": True}, ) file_hash_entity_ids = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "File").properties.file_hash_entity_ids file_hash_entity_ids.Element = AAZStrType( flags={"read_only": True}, ) disc_file_hash = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "FileHash") disc_file_hash.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "FileHash").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.algorithm = AAZStrType( flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.hash_value = AAZStrType( serialized_name="hashValue", flags={"read_only": True}, ) disc_host = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Host") disc_host.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Host").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.azure_id = AAZStrType( serialized_name="azureID", flags={"read_only": True}, ) properties.dns_domain = AAZStrType( serialized_name="dnsDomain", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.host_name = AAZStrType( serialized_name="hostName", flags={"read_only": True}, ) properties.is_domain_joined = AAZBoolType( serialized_name="isDomainJoined", flags={"read_only": True}, ) properties.net_bios_name = AAZStrType( serialized_name="netBiosName", flags={"read_only": True}, ) properties.nt_domain = AAZStrType( serialized_name="ntDomain", flags={"read_only": True}, ) properties.oms_agent_id = AAZStrType( serialized_name="omsAgentID", flags={"read_only": True}, ) properties.os_family = AAZStrType( serialized_name="osFamily", ) properties.os_version = AAZStrType( serialized_name="osVersion", flags={"read_only": True}, ) disc_io_t_device = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "IoTDevice") disc_io_t_device.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "IoTDevice").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.device_id = AAZStrType( serialized_name="deviceId", flags={"read_only": True}, ) properties.device_name = AAZStrType( serialized_name="deviceName", flags={"read_only": True}, ) properties.device_type = AAZStrType( serialized_name="deviceType", flags={"read_only": True}, ) properties.edge_id = AAZStrType( serialized_name="edgeId", flags={"read_only": True}, ) properties.firmware_version = AAZStrType( serialized_name="firmwareVersion", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.host_entity_id = AAZStrType( serialized_name="hostEntityId", flags={"read_only": True}, ) properties.iot_hub_entity_id = AAZStrType( serialized_name="iotHubEntityId", flags={"read_only": True}, ) properties.iot_security_agent_id = AAZStrType( serialized_name="iotSecurityAgentId", flags={"read_only": True}, ) properties.ip_address_entity_id = AAZStrType( serialized_name="ipAddressEntityId", flags={"read_only": True}, ) properties.mac_address = AAZStrType( serialized_name="macAddress", flags={"read_only": True}, ) properties.model = AAZStrType( flags={"read_only": True}, ) properties.operating_system = AAZStrType( serialized_name="operatingSystem", flags={"read_only": True}, ) properties.protocols = AAZListType( flags={"read_only": True}, ) properties.serial_number = AAZStrType( serialized_name="serialNumber", flags={"read_only": True}, ) properties.source = AAZStrType( flags={"read_only": True}, ) properties.threat_intelligence = AAZListType( serialized_name="threatIntelligence", flags={"read_only": True}, ) properties.vendor = AAZStrType( flags={"read_only": True}, ) protocols = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "IoTDevice").properties.protocols protocols.Element = AAZStrType( flags={"read_only": True}, ) threat_intelligence = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "IoTDevice").properties.threat_intelligence threat_intelligence.Element = AAZObjectType( flags={"read_only": True}, ) _build_schema_threat_intelligence_read(threat_intelligence.Element) disc_ip = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Ip") disc_ip.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Ip").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.address = AAZStrType( flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.location = AAZObjectType( flags={"read_only": True}, ) properties.threat_intelligence = AAZListType( serialized_name="threatIntelligence", flags={"read_only": True}, ) location = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Ip").properties.location location.asn = AAZIntType( flags={"read_only": True}, ) location.city = AAZStrType( flags={"read_only": True}, ) location.country_code = AAZStrType( serialized_name="countryCode", flags={"read_only": True}, ) location.country_name = AAZStrType( serialized_name="countryName", flags={"read_only": True}, ) location.latitude = AAZFloatType( flags={"read_only": True}, ) location.longitude = AAZFloatType( flags={"read_only": True}, ) location.state = AAZStrType( flags={"read_only": True}, ) threat_intelligence = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Ip").properties.threat_intelligence threat_intelligence.Element = AAZObjectType( flags={"read_only": True}, ) _build_schema_threat_intelligence_read(threat_intelligence.Element) disc_mail_cluster = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailCluster") disc_mail_cluster.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailCluster").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.cluster_group = AAZStrType( serialized_name="clusterGroup", flags={"read_only": True}, ) properties.cluster_query_end_time = AAZStrType( serialized_name="clusterQueryEndTime", flags={"read_only": True}, ) properties.cluster_query_start_time = AAZStrType( serialized_name="clusterQueryStartTime", flags={"read_only": True}, ) properties.cluster_source_identifier = AAZStrType( serialized_name="clusterSourceIdentifier", flags={"read_only": True}, ) properties.cluster_source_type = AAZStrType( serialized_name="clusterSourceType", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.is_volume_anomaly = AAZBoolType( serialized_name="isVolumeAnomaly", flags={"read_only": True}, ) properties.mail_count = AAZIntType( serialized_name="mailCount", flags={"read_only": True}, ) properties.network_message_ids = AAZListType( serialized_name="networkMessageIds", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"read_only": True}, ) properties.query_time = AAZStrType( serialized_name="queryTime", flags={"read_only": True}, ) properties.source = AAZStrType( flags={"read_only": True}, ) properties.threats = AAZListType( flags={"read_only": True}, ) network_message_ids = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailCluster").properties.network_message_ids network_message_ids.Element = AAZStrType( flags={"read_only": True}, ) threats = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailCluster").properties.threats threats.Element = AAZStrType( flags={"read_only": True}, ) disc_mail_message = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailMessage") disc_mail_message.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailMessage").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.antispam_direction = AAZStrType( serialized_name="antispamDirection", ) properties.body_fingerprint_bin1 = AAZIntType( serialized_name="bodyFingerprintBin1", ) properties.body_fingerprint_bin2 = AAZIntType( serialized_name="bodyFingerprintBin2", ) properties.body_fingerprint_bin3 = AAZIntType( serialized_name="bodyFingerprintBin3", ) properties.body_fingerprint_bin4 = AAZIntType( serialized_name="bodyFingerprintBin4", ) properties.body_fingerprint_bin5 = AAZIntType( serialized_name="bodyFingerprintBin5", ) properties.delivery_action = AAZStrType( serialized_name="deliveryAction", ) properties.delivery_location = AAZStrType( serialized_name="deliveryLocation", ) properties.file_entity_ids = AAZListType( serialized_name="fileEntityIds", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.internet_message_id = AAZStrType( serialized_name="internetMessageId", flags={"read_only": True}, ) properties.language = AAZStrType( flags={"read_only": True}, ) properties.network_message_id = AAZStrType( serialized_name="networkMessageId", flags={"read_only": True}, ) properties.p1_sender = AAZStrType( serialized_name="p1Sender", flags={"read_only": True}, ) properties.p1_sender_display_name = AAZStrType( serialized_name="p1SenderDisplayName", flags={"read_only": True}, ) properties.p1_sender_domain = AAZStrType( serialized_name="p1SenderDomain", flags={"read_only": True}, ) properties.p2_sender = AAZStrType( serialized_name="p2Sender", flags={"read_only": True}, ) properties.p2_sender_display_name = AAZStrType( serialized_name="p2SenderDisplayName", flags={"read_only": True}, ) properties.p2_sender_domain = AAZStrType( serialized_name="p2SenderDomain", flags={"read_only": True}, ) properties.receive_date = AAZStrType( serialized_name="receiveDate", flags={"read_only": True}, ) properties.recipient = AAZStrType( flags={"read_only": True}, ) properties.sender_ip = AAZStrType( serialized_name="senderIP", flags={"read_only": True}, ) properties.subject = AAZStrType( flags={"read_only": True}, ) properties.threat_detection_methods = AAZListType( serialized_name="threatDetectionMethods", flags={"read_only": True}, ) properties.threats = AAZListType( flags={"read_only": True}, ) properties.urls = AAZListType( flags={"read_only": True}, ) file_entity_ids = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailMessage").properties.file_entity_ids file_entity_ids.Element = AAZStrType( flags={"read_only": True}, ) threat_detection_methods = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailMessage").properties.threat_detection_methods threat_detection_methods.Element = AAZStrType( flags={"read_only": True}, ) threats = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailMessage").properties.threats threats.Element = AAZStrType( flags={"read_only": True}, ) urls = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "MailMessage").properties.urls urls.Element = AAZStrType( flags={"read_only": True}, ) disc_mailbox = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Mailbox") disc_mailbox.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Mailbox").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.external_directory_object_id = AAZStrType( serialized_name="externalDirectoryObjectId", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.mailbox_primary_address = AAZStrType( serialized_name="mailboxPrimaryAddress", flags={"read_only": True}, ) properties.upn = AAZStrType( flags={"read_only": True}, ) disc_malware = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Malware") disc_malware.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Malware").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.category = AAZStrType( flags={"read_only": True}, ) properties.file_entity_ids = AAZListType( serialized_name="fileEntityIds", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.malware_name = AAZStrType( serialized_name="malwareName", flags={"read_only": True}, ) properties.process_entity_ids = AAZListType( serialized_name="processEntityIds", flags={"read_only": True}, ) file_entity_ids = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Malware").properties.file_entity_ids file_entity_ids.Element = AAZStrType( flags={"read_only": True}, ) process_entity_ids = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Malware").properties.process_entity_ids process_entity_ids.Element = AAZStrType( flags={"read_only": True}, ) disc_process = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Process") disc_process.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Process").properties properties.account_entity_id = AAZStrType( serialized_name="accountEntityId", flags={"read_only": True}, ) properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.command_line = AAZStrType( serialized_name="commandLine", flags={"read_only": True}, ) properties.creation_time_utc = AAZStrType( serialized_name="creationTimeUtc", flags={"read_only": True}, ) properties.elevation_token = AAZStrType( serialized_name="elevationToken", ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.host_entity_id = AAZStrType( serialized_name="hostEntityId", flags={"read_only": True}, ) properties.host_logon_session_entity_id = AAZStrType( serialized_name="hostLogonSessionEntityId", flags={"read_only": True}, ) properties.image_file_entity_id = AAZStrType( serialized_name="imageFileEntityId", flags={"read_only": True}, ) properties.parent_process_entity_id = AAZStrType( serialized_name="parentProcessEntityId", flags={"read_only": True}, ) properties.process_id = AAZStrType( serialized_name="processId", flags={"read_only": True}, ) disc_registry_key = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "RegistryKey") disc_registry_key.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "RegistryKey").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.hive = AAZStrType( flags={"read_only": True}, ) properties.key = AAZStrType( flags={"read_only": True}, ) disc_registry_value = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "RegistryValue") disc_registry_value.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "RegistryValue").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.key_entity_id = AAZStrType( serialized_name="keyEntityId", flags={"read_only": True}, ) properties.value_data = AAZStrType( serialized_name="valueData", flags={"read_only": True}, ) properties.value_name = AAZStrType( serialized_name="valueName", flags={"read_only": True}, ) properties.value_type = AAZStrType( serialized_name="valueType", flags={"read_only": True}, ) disc_security_alert = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityAlert") disc_security_alert.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityAlert").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.alert_display_name = AAZStrType( serialized_name="alertDisplayName", flags={"read_only": True}, ) properties.alert_link = AAZStrType( serialized_name="alertLink", flags={"read_only": True}, ) properties.alert_type = AAZStrType( serialized_name="alertType", flags={"read_only": True}, ) properties.compromised_entity = AAZStrType( serialized_name="compromisedEntity", flags={"read_only": True}, ) properties.confidence_level = AAZStrType( serialized_name="confidenceLevel", flags={"read_only": True}, ) properties.confidence_reasons = AAZListType( serialized_name="confidenceReasons", flags={"read_only": True}, ) properties.confidence_score = AAZFloatType( serialized_name="confidenceScore", flags={"read_only": True}, ) properties.confidence_score_status = AAZStrType( serialized_name="confidenceScoreStatus", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.end_time_utc = AAZStrType( serialized_name="endTimeUtc", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.intent = AAZStrType( flags={"read_only": True}, ) properties.processing_end_time = AAZStrType( serialized_name="processingEndTime", flags={"read_only": True}, ) properties.product_component_name = AAZStrType( serialized_name="productComponentName", flags={"read_only": True}, ) properties.product_name = AAZStrType( serialized_name="productName", flags={"read_only": True}, ) properties.product_version = AAZStrType( serialized_name="productVersion", flags={"read_only": True}, ) properties.provider_alert_id = AAZStrType( serialized_name="providerAlertId", flags={"read_only": True}, ) properties.remediation_steps = AAZListType( serialized_name="remediationSteps", flags={"read_only": True}, ) properties.severity = AAZStrType() properties.start_time_utc = AAZStrType( serialized_name="startTimeUtc", flags={"read_only": True}, ) properties.status = AAZStrType( flags={"read_only": True}, ) properties.system_alert_id = AAZStrType( serialized_name="systemAlertId", flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.time_generated = AAZStrType( serialized_name="timeGenerated", flags={"read_only": True}, ) properties.vendor_name = AAZStrType( serialized_name="vendorName", flags={"read_only": True}, ) confidence_reasons = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityAlert").properties.confidence_reasons confidence_reasons.Element = AAZObjectType( flags={"read_only": True}, ) _element = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityAlert").properties.confidence_reasons.Element _element.reason = AAZStrType( flags={"read_only": True}, ) _element.reason_type = AAZStrType( serialized_name="reasonType", flags={"read_only": True}, ) remediation_steps = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityAlert").properties.remediation_steps remediation_steps.Element = AAZStrType( flags={"read_only": True}, ) tactics = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityAlert").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) disc_security_group = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityGroup") disc_security_group.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SecurityGroup").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.distinguished_name = AAZStrType( serialized_name="distinguishedName", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.object_guid = AAZStrType( serialized_name="objectGuid", flags={"read_only": True}, ) properties.sid = AAZStrType( flags={"read_only": True}, ) disc_submission_mail = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SubmissionMail") disc_submission_mail.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "SubmissionMail").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.network_message_id = AAZStrType( serialized_name="networkMessageId", flags={"read_only": True}, ) properties.recipient = AAZStrType( flags={"read_only": True}, ) properties.report_type = AAZStrType( serialized_name="reportType", flags={"read_only": True}, ) properties.sender = AAZStrType( flags={"read_only": True}, ) properties.sender_ip = AAZStrType( serialized_name="senderIp", flags={"read_only": True}, ) properties.subject = AAZStrType( flags={"read_only": True}, ) properties.submission_date = AAZStrType( serialized_name="submissionDate", flags={"read_only": True}, ) properties.submission_id = AAZStrType( serialized_name="submissionId", flags={"read_only": True}, ) properties.submitter = AAZStrType( flags={"read_only": True}, ) properties.timestamp = AAZStrType( flags={"read_only": True}, ) disc_url = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Url") disc_url.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.entities.Element.discriminate_by( "kind", "Url").properties properties.additional_data = AAZDictType( serialized_name="additionalData", flags={"read_only": True}, ) properties.friendly_name = AAZStrType( serialized_name="friendlyName", flags={"read_only": True}, ) properties.url = AAZStrType( flags={"read_only": True}, ) return cls._schema_on_200
class BookmarkExpand(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
19
0
121
8
113
0
1
0
1
0
0
0
9
0
10
10
1,229
87
1,142
74
1,123
0
396
66
385
2
1
1
12
9,502
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/_delete.py
azext_sentinel.aaz.latest.sentinel.bookmark._delete.Delete.BookmarksDelete
class BookmarksDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "bookmarkId", self.ctx.args.bookmark_id, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class BookmarksDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
6
0
6
0
1
0
1
0
0
0
8
0
8
8
65
9
56
19
42
0
26
14
17
3
1
1
10
9,503
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/_create.py
azext_sentinel.aaz.latest.sentinel.bookmark._create.Create.BookmarksCreateOrUpdate
class BookmarksCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "bookmarkId", self.ctx.args.bookmark_id, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: properties.set_prop("created", AAZStrType, ".created") _build_schema_user_info_create(properties.set_prop( "createdBy", AAZObjectType, ".created_by")) properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "entityMappings", AAZListType, ".entity_mappings") properties.set_prop("eventTime", AAZStrType, ".event_time") properties.set_prop( "incidentInfo", AAZObjectType, ".incident_info") properties.set_prop("labels", AAZListType, ".labels") properties.set_prop("notes", AAZStrType, ".notes") properties.set_prop("query", AAZStrType, ".query_content", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "queryEndTime", AAZStrType, ".query_end_time") properties.set_prop("queryResult", AAZStrType, ".query_result") properties.set_prop( "queryStartTime", AAZStrType, ".query_start_time") properties.set_prop("tactics", AAZListType, ".tactics") properties.set_prop("techniques", AAZListType, ".techniques") properties.set_prop("updated", AAZStrType, ".updated") _build_schema_user_info_create(properties.set_prop( "updatedBy", AAZObjectType, ".updated_by")) entity_mappings = _builder.get(".properties.entityMappings") if entity_mappings is not None: entity_mappings.set_elements(AAZObjectType) _elements = _builder.get(".properties.entityMappings[]") if _elements is not None: _elements.set_prop("entityType", AAZStrType, ".entity_type") _elements.set_prop( "fieldMappings", AAZListType, ".field_mappings") field_mappings = _builder.get( ".properties.entityMappings[].fieldMappings") if field_mappings is not None: field_mappings.set_elements(AAZObjectType) _elements = _builder.get( ".properties.entityMappings[].fieldMappings[]") if _elements is not None: _elements.set_prop("identifier", AAZStrType, ".identifier") _elements.set_prop("value", AAZStrType, ".value") incident_info = _builder.get(".properties.incidentInfo") if incident_info is not None: incident_info.set_prop( "incidentId", AAZStrType, ".incident_id") incident_info.set_prop( "relationName", AAZStrType, ".relation_name") incident_info.set_prop("severity", AAZStrType, ".severity") incident_info.set_prop("title", AAZStrType, ".title") labels = _builder.get(".properties.labels") if labels is not None: labels.set_elements(AAZStrType, ".") tactics = _builder.get(".properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get(".properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.etag = AAZStrType() _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200_201.properties properties.created = AAZStrType() properties.created_by = AAZObjectType( serialized_name="createdBy", ) _build_schema_user_info_read(properties.created_by) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) properties.event_time = AAZStrType( serialized_name="eventTime", ) properties.incident_info = AAZObjectType( serialized_name="incidentInfo", ) properties.labels = AAZListType() properties.notes = AAZStrType() properties.query = AAZStrType( flags={"required": True}, ) properties.query_end_time = AAZStrType( serialized_name="queryEndTime", ) properties.query_result = AAZStrType( serialized_name="queryResult", ) properties.query_start_time = AAZStrType( serialized_name="queryStartTime", ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.updated = AAZStrType() properties.updated_by = AAZObjectType( serialized_name="updatedBy", ) _build_schema_user_info_read(properties.updated_by) entity_mappings = cls._schema_on_200_201.properties.entity_mappings entity_mappings.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.entity_mappings.Element _element.entity_type = AAZStrType( serialized_name="entityType", ) _element.field_mappings = AAZListType( serialized_name="fieldMappings", ) field_mappings = cls._schema_on_200_201.properties.entity_mappings.Element.field_mappings field_mappings.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.entity_mappings.Element.field_mappings.Element _element.identifier = AAZStrType() _element.value = AAZStrType() incident_info = cls._schema_on_200_201.properties.incident_info incident_info.incident_id = AAZStrType( serialized_name="incidentId", ) incident_info.relation_name = AAZStrType( serialized_name="relationName", ) incident_info.severity = AAZStrType() incident_info.title = AAZStrType() labels = cls._schema_on_200_201.properties.labels labels.Element = AAZStrType() tactics = cls._schema_on_200_201.properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200_201.properties.techniques techniques.Element = AAZStrType() system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200_201
class BookmarksCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
26
2
23
0
2
0
1
0
0
0
9
0
10
10
279
35
244
46
225
0
138
38
127
10
1
1
21
9,504
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_update.py
azext_sentinel.aaz.latest.sentinel.automation_rule._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={ "flags": {"required": True, "client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: properties.set_prop("actions", AAZListType, ".actions", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("order", AAZIntType, ".order", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("triggeringLogic", AAZObjectType, ".triggering_logic", typ_kwargs={ "flags": {"required": True}}) actions = _builder.get(".properties.actions") if actions is not None: actions.set_elements(AAZObjectType) _elements = _builder.get(".properties.actions[]") if _elements is not None: _elements.set_const("actionType", "ModifyProperties", AAZStrType, ".modify_properties", typ_kwargs={"flags": {"required": True}}) _elements.set_const("actionType", "RunPlaybook", AAZStrType, ".run_playbook", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("order", AAZIntType, ".order", typ_kwargs={ "flags": {"required": True}}) _elements.discriminate_by("actionType", "ModifyProperties") _elements.discriminate_by("actionType", "RunPlaybook") disc_modify_properties = _builder.get( ".properties.actions[]{actionType:ModifyProperties}") if disc_modify_properties is not None: disc_modify_properties.set_prop( "actionConfiguration", AAZObjectType, ".modify_properties.action_configuration") action_configuration = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration") if action_configuration is not None: action_configuration.set_prop( "classification", AAZStrType, ".classification") action_configuration.set_prop( "classificationComment", AAZStrType, ".classification_comment") action_configuration.set_prop( "classificationReason", AAZStrType, ".classification_reason") action_configuration.set_prop("labels", AAZListType, ".labels") action_configuration.set_prop("owner", AAZObjectType, ".owner") action_configuration.set_prop( "severity", AAZStrType, ".severity") action_configuration.set_prop("status", AAZStrType, ".status") labels = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration.labels") if labels is not None: labels.set_elements(AAZObjectType) _elements = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration.labels[]") if _elements is not None: _elements.set_prop("labelName", AAZStrType, ".label_name", typ_kwargs={ "flags": {"required": True}}) owner = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration.owner") if owner is not None: owner.set_prop("assignedTo", AAZStrType, ".assigned_to") owner.set_prop("email", AAZStrType, ".email") owner.set_prop("objectId", AAZStrType, ".object_id") owner.set_prop("ownerType", AAZStrType, ".owner_type") owner.set_prop("userPrincipalName", AAZStrType, ".user_principal_name") disc_run_playbook = _builder.get( ".properties.actions[]{actionType:RunPlaybook}") if disc_run_playbook is not None: disc_run_playbook.set_prop( "actionConfiguration", AAZObjectType, ".run_playbook.action_configuration") action_configuration = _builder.get( ".properties.actions[]{actionType:RunPlaybook}.actionConfiguration") if action_configuration is not None: action_configuration.set_prop( "logicAppResourceId", AAZStrType, ".logic_app_resource_id") action_configuration.set_prop( "tenantId", AAZStrType, ".tenant_id") triggering_logic = _builder.get(".properties.triggeringLogic") if triggering_logic is not None: triggering_logic.set_prop( "conditions", AAZListType, ".conditions") triggering_logic.set_prop( "expirationTimeUtc", AAZStrType, ".expiration_time_utc") triggering_logic.set_prop("isEnabled", AAZBoolType, ".is_enabled", typ_kwargs={ "flags": {"required": True}}) triggering_logic.set_prop("triggersOn", AAZStrType, ".triggers_on", typ_kwargs={ "flags": {"required": True}}) triggering_logic.set_prop("triggersWhen", AAZStrType, ".triggers_when", typ_kwargs={ "flags": {"required": True}}) conditions = _builder.get(".properties.triggeringLogic.conditions") if conditions is not None: conditions.set_elements(AAZObjectType) _elements = _builder.get( ".properties.triggeringLogic.conditions[]") if _elements is not None: _elements.set_const("conditionType", "Property", AAZStrType, ".property", typ_kwargs={ "flags": {"required": True}}) _elements.set_const("conditionType", "PropertyArrayChanged", AAZStrType, ".property_array_changed", typ_kwargs={"flags": {"required": True}}) _elements.set_const("conditionType", "PropertyChanged", AAZStrType, ".property_changed", typ_kwargs={"flags": {"required": True}}) _elements.discriminate_by("conditionType", "Property") _elements.discriminate_by( "conditionType", "PropertyArrayChanged") _elements.discriminate_by("conditionType", "PropertyChanged") disc_property = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:Property}") if disc_property is not None: disc_property.set_prop( "conditionProperties", AAZObjectType, ".property.condition_properties") condition_properties = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:Property}.conditionProperties") if condition_properties is not None: condition_properties.set_prop( "operator", AAZStrType, ".operator") condition_properties.set_prop( "propertyName", AAZStrType, ".property_name") condition_properties.set_prop( "propertyValues", AAZListType, ".property_values") property_values = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:Property}.conditionProperties.propertyValues") if property_values is not None: property_values.set_elements(AAZStrType, ".") disc_property_array_changed = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyArrayChanged}") if disc_property_array_changed is not None: disc_property_array_changed.set_prop( "conditionProperties", AAZObjectType, ".property_array_changed.condition_properties") condition_properties = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyArrayChanged}.conditionProperties") if condition_properties is not None: condition_properties.set_prop( "arrayType", AAZStrType, ".array_type") condition_properties.set_prop( "changeType", AAZStrType, ".change_type") disc_property_changed = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyChanged}") if disc_property_changed is not None: disc_property_changed.set_prop( "conditionProperties", AAZObjectType, ".property_changed.condition_properties") condition_properties = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyChanged}.conditionProperties") if condition_properties is not None: condition_properties.set_prop( "changeType", AAZStrType, ".change_type") condition_properties.set_prop( "operator", AAZStrType, ".operator") condition_properties.set_prop( "propertyName", AAZStrType, ".property_name") condition_properties.set_prop( "propertyValues", AAZListType, ".property_values") property_values = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyChanged}.conditionProperties.propertyValues") if property_values is not None: property_values.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
65
11
54
0
12
0
1
0
0
0
2
0
2
2
132
24
108
19
105
0
104
19
101
22
1
1
23
9,505
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_update.py
azext_sentinel.aaz.latest.sentinel.automation_rule._update.Update.AutomationRulesGet
class AutomationRulesGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "automationRuleId", self.ctx.args.automation_rule_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _build_schema_automation_rule_read(cls._schema_on_200) return cls._schema_on_200
class AutomationRulesGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
7
0
7
0
1
0
1
0
0
0
8
0
9
9
86
13
73
25
56
0
33
18
23
2
1
1
11
9,506
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_update.py
azext_sentinel.aaz.latest.sentinel.automation_rule._update.Update.AutomationRulesCreateOrUpdate
class AutomationRulesCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "automationRuleId", self.ctx.args.automation_rule_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _build_schema_automation_rule_read(cls._schema_on_200_201) return cls._schema_on_200_201
class AutomationRulesCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
8
0
7
0
1
0
1
0
0
0
9
0
10
10
98
15
83
28
64
0
36
20
25
2
1
1
12
9,507
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_show.py
azext_sentinel.aaz.latest.sentinel.automation_rule._show.Show.AutomationRulesGet
class AutomationRulesGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "automationRuleId", self.ctx.args.automation_rule_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.etag = AAZStrType() _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"required": True, "client_flatten": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.actions = AAZListType( flags={"required": True}, ) properties.created_by = AAZObjectType( serialized_name="createdBy", flags={"read_only": True}, ) _build_schema_client_info_read(properties.created_by) properties.created_time_utc = AAZStrType( serialized_name="createdTimeUtc", flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_modified_by = AAZObjectType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) _build_schema_client_info_read(properties.last_modified_by) properties.last_modified_time_utc = AAZStrType( serialized_name="lastModifiedTimeUtc", flags={"read_only": True}, ) properties.order = AAZIntType( flags={"required": True}, ) properties.triggering_logic = AAZObjectType( serialized_name="triggeringLogic", flags={"required": True}, ) actions = cls._schema_on_200.properties.actions actions.Element = AAZObjectType() _element = cls._schema_on_200.properties.actions.Element _element.action_type = AAZStrType( serialized_name="actionType", flags={"required": True}, ) _element.order = AAZIntType( flags={"required": True}, ) disc_modify_properties = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties") disc_modify_properties.action_configuration = AAZObjectType( serialized_name="actionConfiguration", ) action_configuration = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration action_configuration.classification = AAZStrType() action_configuration.classification_comment = AAZStrType( serialized_name="classificationComment", ) action_configuration.classification_reason = AAZStrType( serialized_name="classificationReason", ) action_configuration.labels = AAZListType() action_configuration.owner = AAZObjectType() action_configuration.severity = AAZStrType() action_configuration.status = AAZStrType() labels = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.labels labels.Element = AAZObjectType() _element = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.labels.Element _element.label_name = AAZStrType( serialized_name="labelName", flags={"required": True}, ) _element.label_type = AAZStrType( serialized_name="labelType", flags={"read_only": True}, ) owner = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.owner owner.assigned_to = AAZStrType( serialized_name="assignedTo", ) owner.email = AAZStrType() owner.object_id = AAZStrType( serialized_name="objectId", ) owner.owner_type = AAZStrType( serialized_name="ownerType", ) owner.user_principal_name = AAZStrType( serialized_name="userPrincipalName", ) disc_run_playbook = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "RunPlaybook") disc_run_playbook.action_configuration = AAZObjectType( serialized_name="actionConfiguration", ) action_configuration = cls._schema_on_200.properties.actions.Element.discriminate_by( "action_type", "RunPlaybook").action_configuration action_configuration.logic_app_resource_id = AAZStrType( serialized_name="logicAppResourceId", ) action_configuration.tenant_id = AAZStrType( serialized_name="tenantId", ) triggering_logic = cls._schema_on_200.properties.triggering_logic triggering_logic.conditions = AAZListType() triggering_logic.expiration_time_utc = AAZStrType( serialized_name="expirationTimeUtc", ) triggering_logic.is_enabled = AAZBoolType( serialized_name="isEnabled", flags={"required": True}, ) triggering_logic.triggers_on = AAZStrType( serialized_name="triggersOn", flags={"required": True}, ) triggering_logic.triggers_when = AAZStrType( serialized_name="triggersWhen", flags={"required": True}, ) conditions = cls._schema_on_200.properties.triggering_logic.conditions conditions.Element = AAZObjectType() _element = cls._schema_on_200.properties.triggering_logic.conditions.Element _element.condition_type = AAZStrType( serialized_name="conditionType", flags={"required": True}, ) disc_property = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property") disc_property.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property").condition_properties condition_properties.operator = AAZStrType() condition_properties.property_name = AAZStrType( serialized_name="propertyName", ) condition_properties.property_values = AAZListType( serialized_name="propertyValues", ) property_values = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property").condition_properties.property_values property_values.Element = AAZStrType() disc_property_array_changed = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyArrayChanged") disc_property_array_changed.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyArrayChanged").condition_properties condition_properties.array_type = AAZStrType( serialized_name="arrayType", ) condition_properties.change_type = AAZStrType( serialized_name="changeType", ) disc_property_changed = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged") disc_property_changed.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged").condition_properties condition_properties.change_type = AAZStrType( serialized_name="changeType", ) condition_properties.operator = AAZStrType() condition_properties.property_name = AAZStrType( serialized_name="propertyName", ) condition_properties.property_values = AAZListType( serialized_name="propertyValues", ) property_values = cls._schema_on_200.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged").condition_properties.property_values property_values.Element = AAZStrType() system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200
class AutomationRulesGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
32
3
30
0
1
0
1
0
0
0
8
0
9
9
312
36
276
42
259
0
120
35
110
2
1
1
11
9,508
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_list.py
azext_sentinel.aaz.latest.sentinel.automation_rule._list.List.AutomationRulesList
class AutomationRulesList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType() value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.etag = AAZStrType() _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"required": True, "client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.actions = AAZListType( flags={"required": True}, ) properties.created_by = AAZObjectType( serialized_name="createdBy", flags={"read_only": True}, ) _build_schema_client_info_read(properties.created_by) properties.created_time_utc = AAZStrType( serialized_name="createdTimeUtc", flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_modified_by = AAZObjectType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) _build_schema_client_info_read(properties.last_modified_by) properties.last_modified_time_utc = AAZStrType( serialized_name="lastModifiedTimeUtc", flags={"read_only": True}, ) properties.order = AAZIntType( flags={"required": True}, ) properties.triggering_logic = AAZObjectType( serialized_name="triggeringLogic", flags={"required": True}, ) actions = cls._schema_on_200.value.Element.properties.actions actions.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.actions.Element _element.action_type = AAZStrType( serialized_name="actionType", flags={"required": True}, ) _element.order = AAZIntType( flags={"required": True}, ) disc_modify_properties = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties") disc_modify_properties.action_configuration = AAZObjectType( serialized_name="actionConfiguration", ) action_configuration = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration action_configuration.classification = AAZStrType() action_configuration.classification_comment = AAZStrType( serialized_name="classificationComment", ) action_configuration.classification_reason = AAZStrType( serialized_name="classificationReason", ) action_configuration.labels = AAZListType() action_configuration.owner = AAZObjectType() action_configuration.severity = AAZStrType() action_configuration.status = AAZStrType() labels = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.labels labels.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.labels.Element _element.label_name = AAZStrType( serialized_name="labelName", flags={"required": True}, ) _element.label_type = AAZStrType( serialized_name="labelType", flags={"read_only": True}, ) owner = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.owner owner.assigned_to = AAZStrType( serialized_name="assignedTo", ) owner.email = AAZStrType() owner.object_id = AAZStrType( serialized_name="objectId", ) owner.owner_type = AAZStrType( serialized_name="ownerType", ) owner.user_principal_name = AAZStrType( serialized_name="userPrincipalName", ) disc_run_playbook = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "RunPlaybook") disc_run_playbook.action_configuration = AAZObjectType( serialized_name="actionConfiguration", ) action_configuration = cls._schema_on_200.value.Element.properties.actions.Element.discriminate_by( "action_type", "RunPlaybook").action_configuration action_configuration.logic_app_resource_id = AAZStrType( serialized_name="logicAppResourceId", ) action_configuration.tenant_id = AAZStrType( serialized_name="tenantId", ) triggering_logic = cls._schema_on_200.value.Element.properties.triggering_logic triggering_logic.conditions = AAZListType() triggering_logic.expiration_time_utc = AAZStrType( serialized_name="expirationTimeUtc", ) triggering_logic.is_enabled = AAZBoolType( serialized_name="isEnabled", flags={"required": True}, ) triggering_logic.triggers_on = AAZStrType( serialized_name="triggersOn", flags={"required": True}, ) triggering_logic.triggers_when = AAZStrType( serialized_name="triggersWhen", flags={"required": True}, ) conditions = cls._schema_on_200.value.Element.properties.triggering_logic.conditions conditions.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element _element.condition_type = AAZStrType( serialized_name="conditionType", flags={"required": True}, ) disc_property = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property") disc_property.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property").condition_properties condition_properties.operator = AAZStrType() condition_properties.property_name = AAZStrType( serialized_name="propertyName", ) condition_properties.property_values = AAZListType( serialized_name="propertyValues", ) property_values = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property").condition_properties.property_values property_values.Element = AAZStrType() disc_property_array_changed = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyArrayChanged") disc_property_array_changed.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyArrayChanged").condition_properties condition_properties.array_type = AAZStrType( serialized_name="arrayType", ) condition_properties.change_type = AAZStrType( serialized_name="changeType", ) disc_property_changed = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged") disc_property_changed.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged").condition_properties condition_properties.change_type = AAZStrType( serialized_name="changeType", ) condition_properties.operator = AAZStrType() condition_properties.property_name = AAZStrType( serialized_name="propertyName", ) condition_properties.property_values = AAZListType( serialized_name="propertyValues", ) property_values = cls._schema_on_200.value.Element.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged").condition_properties.property_values property_values.Element = AAZStrType() system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200
class AutomationRulesList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
33
3
30
0
1
0
1
0
0
0
8
0
9
9
317
38
279
43
262
0
125
36
115
2
1
1
11
9,509
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_delete.py
azext_sentinel.aaz.latest.sentinel.automation_rule._delete.Delete.AutomationRulesDelete
class AutomationRulesDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "automationRuleId", self.ctx.args.automation_rule_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class AutomationRulesDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
6
0
6
0
1
0
1
0
0
0
8
0
8
8
65
9
56
19
42
0
26
14
17
3
1
1
10
9,510
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinGraphResource
class GremlinGraphResource(_serialization.Model): """Cosmos DB Gremlin graph resource object. All required parameters must be populated in order to send to server. :ivar id: Name of the Cosmos DB Gremlin graph. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. :vartype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy :ivar partition_key: The configuration of the partition key to be used for partitioning data into multiple partitions. :vartype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey :ivar default_ttl: Default time to live. :vartype default_ttl: int :ivar unique_key_policy: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the graph. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { "id": {"required": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"}, "partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"}, "default_ttl": {"key": "defaultTtl", "type": "int"}, "unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"}, "conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"}, "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, id: str, # pylint: disable=redefined-builtin indexing_policy: Optional["_models.IndexingPolicy"] = None, partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: """ :keyword id: Name of the Cosmos DB Gremlin graph. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. :paramtype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy :keyword partition_key: The configuration of the partition key to be used for partitioning data into multiple partitions. :paramtype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey :keyword default_ttl: Default time to live. :paramtype default_ttl: int :keyword unique_key_policy: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the graph. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ super().__init__(**kwargs) self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy self.analytical_storage_ttl = analytical_storage_ttl self.restore_parameters = restore_parameters self.create_mode = create_mode
class GremlinGraphResource(_serialization.Model): '''Cosmos DB Gremlin graph resource object. All required parameters must be populated in order to send to server. :ivar id: Name of the Cosmos DB Gremlin graph. Required. :vartype id: str :ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. :vartype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy :ivar partition_key: The configuration of the partition key to be used for partitioning data into multiple partitions. :vartype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey :ivar default_ttl: Default time to live. :vartype default_ttl: int :ivar unique_key_policy: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the graph. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' def __init__( self, *, id: str, # pylint: disable=redefined-builtin indexing_policy: Optional["_models.IndexingPolicy"] = None, partition_key: Optional["_models.ContainerPartitionKey"] = None, default_ttl: Optional[int] = None, unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None, conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: ''' :keyword id: Name of the Cosmos DB Gremlin graph. Required. :paramtype id: str :keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. :paramtype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy :keyword partition_key: The configuration of the partition key to be used for partitioning data into multiple partitions. :paramtype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey :keyword default_ttl: Default time to live. :paramtype default_ttl: int :keyword unique_key_policy: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the graph. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' pass
2
2
48
0
24
25
1
1.28
1
4
0
1
1
9
1
16
93
5
39
26
24
50
14
13
12
1
2
0
1
9,511
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.IncludedPath
class IncludedPath(_serialization.Model): """The paths that are included in indexing. :ivar path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :vartype path: str :ivar indexes: List of indexes for this path. :vartype indexes: list[~azure.mgmt.cosmosdb.models.Indexes] """ _attribute_map = { "path": {"key": "path", "type": "str"}, "indexes": {"key": "indexes", "type": "[Indexes]"}, } def __init__( self, *, path: Optional[str] = None, indexes: Optional[List["_models.Indexes"]] = None, **kwargs: Any ) -> None: """ :keyword path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :paramtype path: str :keyword indexes: List of indexes for this path. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.Indexes] """ super().__init__(**kwargs) self.path = path self.indexes = indexes
class IncludedPath(_serialization.Model): '''The paths that are included in indexing. :ivar path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :vartype path: str :ivar indexes: List of indexes for this path. :vartype indexes: list[~azure.mgmt.cosmosdb.models.Indexes] ''' def __init__( self, *, path: Optional[str] = None, indexes: Optional[List["_models.Indexes"]] = None, **kwargs: Any ) -> None: ''' :keyword path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). :paramtype path: str :keyword indexes: List of indexes for this path. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.Indexes] ''' pass
2
2
13
0
6
7
1
1.27
1
3
0
0
1
2
1
16
28
3
11
7
7
14
6
5
4
1
2
0
1
9,512
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.Indexes
class Indexes(_serialization.Model): """The indexes for the path. :ivar data_type: The datatype for which the indexing behavior is applied to. Known values are: "String", "Number", "Point", "Polygon", "LineString", and "MultiPolygon". :vartype data_type: str or ~azure.mgmt.cosmosdb.models.DataType :ivar precision: The precision of the index. -1 is maximum precision. :vartype precision: int :ivar kind: Indicates the type of index. Known values are: "Hash", "Range", and "Spatial". :vartype kind: str or ~azure.mgmt.cosmosdb.models.IndexKind """ _attribute_map = { "data_type": {"key": "dataType", "type": "str"}, "precision": {"key": "precision", "type": "int"}, "kind": {"key": "kind", "type": "str"}, } def __init__( self, *, data_type: Union[str, "_models.DataType"] = "String", precision: Optional[int] = None, kind: Union[str, "_models.IndexKind"] = "Hash", **kwargs: Any ) -> None: """ :keyword data_type: The datatype for which the indexing behavior is applied to. Known values are: "String", "Number", "Point", "Polygon", "LineString", and "MultiPolygon". :paramtype data_type: str or ~azure.mgmt.cosmosdb.models.DataType :keyword precision: The precision of the index. -1 is maximum precision. :paramtype precision: int :keyword kind: Indicates the type of index. Known values are: "Hash", "Range", and "Spatial". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.IndexKind """ super().__init__(**kwargs) self.data_type = data_type self.precision = precision self.kind = kind
class Indexes(_serialization.Model): '''The indexes for the path. :ivar data_type: The datatype for which the indexing behavior is applied to. Known values are: "String", "Number", "Point", "Polygon", "LineString", and "MultiPolygon". :vartype data_type: str or ~azure.mgmt.cosmosdb.models.DataType :ivar precision: The precision of the index. -1 is maximum precision. :vartype precision: int :ivar kind: Indicates the type of index. Known values are: "Hash", "Range", and "Spatial". :vartype kind: str or ~azure.mgmt.cosmosdb.models.IndexKind ''' def __init__( self, *, data_type: Union[str, "_models.DataType"] = "String", precision: Optional[int] = None, kind: Union[str, "_models.IndexKind"] = "Hash", **kwargs: Any ) -> None: ''' :keyword data_type: The datatype for which the indexing behavior is applied to. Known values are: "String", "Number", "Point", "Polygon", "LineString", and "MultiPolygon". :paramtype data_type: str or ~azure.mgmt.cosmosdb.models.DataType :keyword precision: The precision of the index. -1 is maximum precision. :paramtype precision: int :keyword kind: Indicates the type of index. Known values are: "Hash", "Range", and "Spatial". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.IndexKind ''' pass
2
2
21
0
12
9
1
1
1
4
0
0
1
3
1
16
39
3
18
13
9
18
7
6
5
1
2
0
1
9,513
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.IndexingPolicy
class IndexingPolicy(_serialization.Model): """Cosmos DB indexing policy. :ivar automatic: Indicates if the indexing policy is automatic. :vartype automatic: bool :ivar indexing_mode: Indicates the indexing mode. Known values are: "consistent", "lazy", and "none". :vartype indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode :ivar included_paths: List of paths to include in the indexing. :vartype included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] :ivar excluded_paths: List of paths to exclude from indexing. :vartype excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] :ivar composite_indexes: List of composite path list. :vartype composite_indexes: list[list[~azure.mgmt.cosmosdb.models.CompositePath]] :ivar spatial_indexes: List of spatial specifics. :vartype spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] :ivar vector_indexes: List of paths to include in the vector indexing. :vartype vector_indexes: list[~azure.mgmt.cosmosdb.models.VectorIndex] """ _attribute_map = { "automatic": {"key": "automatic", "type": "bool"}, "indexing_mode": {"key": "indexingMode", "type": "str"}, "included_paths": {"key": "includedPaths", "type": "[IncludedPath]"}, "excluded_paths": {"key": "excludedPaths", "type": "[ExcludedPath]"}, "composite_indexes": {"key": "compositeIndexes", "type": "[[CompositePath]]"}, "spatial_indexes": {"key": "spatialIndexes", "type": "[SpatialSpec]"}, "vector_indexes": {"key": "vectorIndexes", "type": "[VectorIndex]"}, } def __init__( self, *, automatic: Optional[bool] = None, indexing_mode: Union[str, "_models.IndexingMode"] = "consistent", included_paths: Optional[List["_models.IncludedPath"]] = None, excluded_paths: Optional[List["_models.ExcludedPath"]] = None, composite_indexes: Optional[List[List["_models.CompositePath"]]] = None, spatial_indexes: Optional[List["_models.SpatialSpec"]] = None, vector_indexes: Optional[List["_models.VectorIndex"]] = None, **kwargs: Any ) -> None: """ :keyword automatic: Indicates if the indexing policy is automatic. :paramtype automatic: bool :keyword indexing_mode: Indicates the indexing mode. Known values are: "consistent", "lazy", and "none". :paramtype indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode :keyword included_paths: List of paths to include in the indexing. :paramtype included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] :keyword excluded_paths: List of paths to exclude from indexing. :paramtype excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] :keyword composite_indexes: List of composite path list. :paramtype composite_indexes: list[list[~azure.mgmt.cosmosdb.models.CompositePath]] :keyword spatial_indexes: List of spatial specifics. :paramtype spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] :keyword vector_indexes: List of paths to include in the vector indexing. :paramtype vector_indexes: list[~azure.mgmt.cosmosdb.models.VectorIndex] """ super().__init__(**kwargs) self.automatic = automatic self.indexing_mode = indexing_mode self.included_paths = included_paths self.excluded_paths = excluded_paths self.composite_indexes = composite_indexes self.spatial_indexes = spatial_indexes self.vector_indexes = vector_indexes
class IndexingPolicy(_serialization.Model): '''Cosmos DB indexing policy. :ivar automatic: Indicates if the indexing policy is automatic. :vartype automatic: bool :ivar indexing_mode: Indicates the indexing mode. Known values are: "consistent", "lazy", and "none". :vartype indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode :ivar included_paths: List of paths to include in the indexing. :vartype included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] :ivar excluded_paths: List of paths to exclude from indexing. :vartype excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] :ivar composite_indexes: List of composite path list. :vartype composite_indexes: list[list[~azure.mgmt.cosmosdb.models.CompositePath]] :ivar spatial_indexes: List of spatial specifics. :vartype spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] :ivar vector_indexes: List of paths to include in the vector indexing. :vartype vector_indexes: list[~azure.mgmt.cosmosdb.models.VectorIndex] ''' def __init__( self, *, automatic: Optional[bool] = None, indexing_mode: Union[str, "_models.IndexingMode"] = "consistent", included_paths: Optional[List["_models.IncludedPath"]] = None, excluded_paths: Optional[List["_models.ExcludedPath"]] = None, composite_indexes: Optional[List[List["_models.CompositePath"]]] = None, spatial_indexes: Optional[List["_models.SpatialSpec"]] = None, vector_indexes: Optional[List["_models.VectorIndex"]] = None, **kwargs: Any ) -> None: ''' :keyword automatic: Indicates if the indexing policy is automatic. :paramtype automatic: bool :keyword indexing_mode: Indicates the indexing mode. Known values are: "consistent", "lazy", and "none". :paramtype indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode :keyword included_paths: List of paths to include in the indexing. :paramtype included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] :keyword excluded_paths: List of paths to exclude from indexing. :paramtype excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] :keyword composite_indexes: List of composite path list. :paramtype composite_indexes: list[list[~azure.mgmt.cosmosdb.models.CompositePath]] :keyword spatial_indexes: List of spatial specifics. :paramtype spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] :keyword vector_indexes: List of paths to include in the vector indexing. :paramtype vector_indexes: list[~azure.mgmt.cosmosdb.models.VectorIndex] ''' pass
2
2
37
0
20
17
1
1.13
1
4
0
0
1
7
1
16
67
3
30
21
17
34
11
10
9
1
2
0
1
9,514
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.IpAddressOrRange
class IpAddressOrRange(_serialization.Model): """IpAddressOrRange object. :ivar ip_address_or_range: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. :vartype ip_address_or_range: str """ _attribute_map = { "ip_address_or_range": {"key": "ipAddressOrRange", "type": "str"}, } def __init__(self, *, ip_address_or_range: Optional[str] = None, **kwargs: Any) -> None: """ :keyword ip_address_or_range: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. :paramtype ip_address_or_range: str """ super().__init__(**kwargs) self.ip_address_or_range = ip_address_or_range
class IpAddressOrRange(_serialization.Model): '''IpAddressOrRange object. :ivar ip_address_or_range: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. :vartype ip_address_or_range: str ''' def __init__(self, *, ip_address_or_range: Optional[str] = None, **kwargs: Any) -> None: ''' :keyword ip_address_or_range: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. :paramtype ip_address_or_range: str ''' pass
2
2
11
0
3
8
1
2.14
1
3
0
0
1
1
1
16
25
3
7
4
5
15
5
4
3
1
2
0
1
9,515
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ListBackups
class ListBackups(_serialization.Model): """List of restorable backups for a Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Container for array of backups. :vartype value: list[~azure.mgmt.cosmosdb.models.BackupResource] """ _validation = { "value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[BackupResource]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None
class ListBackups(_serialization.Model): '''List of restorable backups for a Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Container for array of backups. :vartype value: list[~azure.mgmt.cosmosdb.models.BackupResource] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.6
1
2
0
0
1
1
1
16
21
5
10
5
8
6
6
5
4
1
2
0
1
9,516
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MetricDefinition
class MetricDefinition(_serialization.Model): """The definition of a metric. Variables are only populated by the server, and will be ignored when sending a request. :ivar metric_availabilities: The list of metric availabilities for the account. :vartype metric_availabilities: list[~azure.mgmt.cosmosdb.models.MetricAvailability] :ivar primary_aggregation_type: The primary aggregation type of the metric. Known values are: "None", "Average", "Total", "Minimum", "Maximum", and "Last". :vartype primary_aggregation_type: str or ~azure.mgmt.cosmosdb.models.PrimaryAggregationType :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar resource_uri: The resource uri of the database. :vartype resource_uri: str :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName """ _validation = { "metric_availabilities": {"readonly": True}, "primary_aggregation_type": {"readonly": True}, "unit": {"readonly": True}, "resource_uri": {"readonly": True}, "name": {"readonly": True}, } _attribute_map = { "metric_availabilities": {"key": "metricAvailabilities", "type": "[MetricAvailability]"}, "primary_aggregation_type": {"key": "primaryAggregationType", "type": "str"}, "unit": {"key": "unit", "type": "str"}, "resource_uri": {"key": "resourceUri", "type": "str"}, "name": {"key": "name", "type": "MetricName"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.metric_availabilities = None self.primary_aggregation_type = None self.unit = None self.resource_uri = None self.name = None
class MetricDefinition(_serialization.Model): '''The definition of a metric. Variables are only populated by the server, and will be ignored when sending a request. :ivar metric_availabilities: The list of metric availabilities for the account. :vartype metric_availabilities: list[~azure.mgmt.cosmosdb.models.MetricAvailability] :ivar primary_aggregation_type: The primary aggregation type of the metric. Known values are: "None", "Average", "Total", "Minimum", "Maximum", and "Last". :vartype primary_aggregation_type: str or ~azure.mgmt.cosmosdb.models.PrimaryAggregationType :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "Percent", "CountPerSecond", "BytesPerSecond", and "Milliseconds". :vartype unit: str or ~azure.mgmt.cosmosdb.models.UnitType :ivar resource_uri: The resource uri of the database. :vartype resource_uri: str :ivar name: The name information for the metric. :vartype name: ~azure.mgmt.cosmosdb.models.MetricName ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
8
0
7
1
1
0.73
1
2
0
0
1
5
1
16
43
5
22
9
20
16
10
9
8
1
2
0
1
9,517
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MetricDefinitionsListResult
class MetricDefinitionsListResult(_serialization.Model): """The response to a list metric definitions request. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of metric definitions for the account. :vartype value: list[~azure.mgmt.cosmosdb.models.MetricDefinition] """ _validation = { "value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[MetricDefinition]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None
class MetricDefinitionsListResult(_serialization.Model): '''The response to a list metric definitions request. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of metric definitions for the account. :vartype value: list[~azure.mgmt.cosmosdb.models.MetricDefinition] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.6
1
2
0
0
1
1
1
16
21
5
10
5
8
6
6
5
4
1
2
0
1
9,518
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MetricListResult
class MetricListResult(_serialization.Model): """The response to a list metrics request. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of metrics for the account. :vartype value: list[~azure.mgmt.cosmosdb.models.Metric] """ _validation = { "value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[Metric]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None
class MetricListResult(_serialization.Model): '''The response to a list metrics request. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of metrics for the account. :vartype value: list[~azure.mgmt.cosmosdb.models.Metric] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.6
1
2
0
0
1
1
1
16
21
5
10
5
8
6
6
5
4
1
2
0
1
9,519
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_delete.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._delete.Delete.SecurityMLAnalyticsSettingsDelete
class SecurityMLAnalyticsSettingsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "settingsResourceName", self.ctx.args.settings_resource_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class SecurityMLAnalyticsSettingsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
6
0
6
0
1
0
1
0
0
0
8
0
8
8
65
9
56
19
42
0
26
14
17
3
1
1
10
9,520
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_create.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._create.Create.SecurityMLAnalyticsSettingsCreateOrUpdate
class SecurityMLAnalyticsSettingsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "settingsResourceName", self.ctx.args.settings_resource_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_const("kind", "Anomaly", AAZStrType, ".anomaly", typ_kwargs={ "flags": {"required": True}}) _builder.discriminate_by("kind", "Anomaly") disc_anomaly = _builder.get("{kind:Anomaly}") if disc_anomaly is not None: disc_anomaly.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:Anomaly}.properties") if properties is not None: properties.set_prop( "anomalySettingsVersion", AAZIntType, ".anomaly.anomaly_settings_version") properties.set_prop("anomalyVersion", AAZStrType, ".anomaly.anomaly_version", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "description", AAZStrType, ".anomaly.description") properties.set_prop("displayName", AAZStrType, ".anomaly.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".anomaly.enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("frequency", AAZStrType, ".anomaly.frequency", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("isDefaultSettings", AAZBoolType, ".anomaly.is_default_settings", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "requiredDataConnectors", AAZListType, ".anomaly.required_data_connectors") properties.set_prop( "settingsDefinitionId", AAZStrType, ".anomaly.settings_definition_id") properties.set_prop("settingsStatus", AAZStrType, ".anomaly.settings_status", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("tactics", AAZListType, ".anomaly.tactics") properties.set_prop( "techniques", AAZListType, ".anomaly.techniques") required_data_connectors = _builder.get( "{kind:Anomaly}.properties.requiredDataConnectors") if required_data_connectors is not None: required_data_connectors.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Anomaly}.properties.requiredDataConnectors[]") if _elements is not None: _elements.set_prop("connectorId", AAZStrType, ".connector_id") _elements.set_prop("dataTypes", AAZListType, ".data_types") data_types = _builder.get( "{kind:Anomaly}.properties.requiredDataConnectors[].dataTypes") if data_types is not None: data_types.set_elements(AAZStrType, ".") tactics = _builder.get("{kind:Anomaly}.properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get("{kind:Anomaly}.properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.etag = AAZStrType() _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.kind = AAZStrType( flags={"required": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_anomaly = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly") disc_anomaly.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly").properties properties.anomaly_settings_version = AAZIntType( serialized_name="anomalySettingsVersion", ) properties.anomaly_version = AAZStrType( serialized_name="anomalyVersion", flags={"required": True}, ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.frequency = AAZStrType( flags={"required": True}, ) properties.is_default_settings = AAZBoolType( serialized_name="isDefaultSettings", flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.settings_definition_id = AAZStrType( serialized_name="settingsDefinitionId", ) properties.settings_status = AAZStrType( serialized_name="settingsStatus", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _element = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly").properties.required_data_connectors.Element _element.connector_id = AAZStrType( serialized_name="connectorId", ) _element.data_types = AAZListType( serialized_name="dataTypes", ) data_types = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly").properties.required_data_connectors.Element.data_types data_types.Element = AAZStrType() tactics = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200_201.discriminate_by( "kind", "Anomaly").properties.techniques techniques.Element = AAZStrType() return cls._schema_on_200_201
class SecurityMLAnalyticsSettingsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
23
2
21
0
2
0
1
0
0
0
9
0
10
10
251
31
220
44
201
0
112
36
101
8
1
1
19
9,521
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/template/_show.py
azext_sentinel.aaz.latest.sentinel.alert_rule.template._show.Show.AlertRuleTemplatesGet
class AlertRuleTemplatesGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates/{alertRuleTemplateId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "alertRuleTemplateId", self.ctx.args.alert_rule_template_id, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.kind = AAZStrType( flags={"required": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_fusion = cls._schema_on_200.discriminate_by("kind", "Fusion") disc_fusion.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.source_settings = AAZListType( serialized_name="sourceSettings", ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) source_settings = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings source_settings.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element _element.source_name = AAZStrType( serialized_name="sourceName", flags={"required": True}, ) _element.source_sub_types = AAZListType( serialized_name="sourceSubTypes", ) source_sub_types = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types source_sub_types.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element _element.severity_filter = AAZObjectType( serialized_name="severityFilter", flags={"required": True}, ) _element.source_sub_type_display_name = AAZStrType( serialized_name="sourceSubTypeDisplayName", flags={"read_only": True}, ) _element.source_sub_type_name = AAZStrType( serialized_name="sourceSubTypeName", flags={"required": True}, ) severity_filter = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filter severity_filter.is_supported = AAZBoolType( serialized_name="isSupported", flags={"required": True}, ) severity_filter.severity_filters = AAZListType( serialized_name="severityFilters", ) severity_filters = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filter.severity_filters severity_filters.Element = AAZStrType() tactics = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.techniques techniques.Element = AAZStrType() disc_ml_behavior_analytics = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics") disc_ml_behavior_analytics.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties.techniques techniques.Element = AAZStrType() disc_microsoft_security_incident_creation = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") disc_microsoft_security_incident_creation.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"required": True, "read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.display_names_exclude_filter = AAZListType( serialized_name="displayNamesExcludeFilter", ) properties.display_names_filter = AAZListType( serialized_name="displayNamesFilter", ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.product_filter = AAZStrType( serialized_name="productFilter", flags={"required": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severities_filter = AAZListType( serialized_name="severitiesFilter", ) properties.status = AAZStrType( flags={"required": True}, ) display_names_exclude_filter = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_exclude_filter display_names_exclude_filter.Element = AAZStrType() display_names_filter = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_filter display_names_filter.Element = AAZStrType() required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) severities_filter = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.severities_filter severities_filter.Element = AAZStrType() disc_nrt = cls._schema_on_200.discriminate_by("kind", "NRT") disc_nrt.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "NRT").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.version = AAZStrType( flags={"required": True}, ) custom_details = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.custom_details custom_details.Element = AAZStrType() required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.techniques techniques.Element = AAZStrType() disc_scheduled = cls._schema_on_200.discriminate_by( "kind", "Scheduled") disc_scheduled.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.event_grouping_settings = AAZObjectType( serialized_name="eventGroupingSettings", ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.query_frequency = AAZStrType( serialized_name="queryFrequency", flags={"required": True}, ) properties.query_period = AAZStrType( serialized_name="queryPeriod", flags={"required": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.trigger_operator = AAZStrType( serialized_name="triggerOperator", flags={"required": True}, ) properties.trigger_threshold = AAZIntType( serialized_name="triggerThreshold", flags={"required": True}, ) properties.version = AAZStrType( flags={"required": True}, ) custom_details = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.custom_details custom_details.Element = AAZStrType() event_grouping_settings = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.event_grouping_settings event_grouping_settings.aggregation_kind = AAZStrType( serialized_name="aggregationKind", ) required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.techniques techniques.Element = AAZStrType() disc_threat_intelligence = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence") disc_threat_intelligence.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties.techniques techniques.Element = AAZStrType() return cls._schema_on_200
class AlertRuleTemplatesGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
57
5
52
0
1
0
1
0
0
0
8
0
9
9
530
55
475
47
458
0
210
40
200
2
1
1
11
9,522
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/template/_list.py
azext_sentinel.aaz.latest.sentinel.alert_rule.template._list.List.AlertRuleTemplatesList
class AlertRuleTemplatesList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", flags={"read_only": True}, ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.kind = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_fusion = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion") disc_fusion.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.source_settings = AAZListType( serialized_name="sourceSettings", ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) source_settings = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings source_settings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element _element.source_name = AAZStrType( serialized_name="sourceName", flags={"required": True}, ) _element.source_sub_types = AAZListType( serialized_name="sourceSubTypes", ) source_sub_types = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types source_sub_types.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element _element.severity_filter = AAZObjectType( serialized_name="severityFilter", flags={"required": True}, ) _element.source_sub_type_display_name = AAZStrType( serialized_name="sourceSubTypeDisplayName", flags={"read_only": True}, ) _element.source_sub_type_name = AAZStrType( serialized_name="sourceSubTypeName", flags={"required": True}, ) severity_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filter severity_filter.is_supported = AAZBoolType( serialized_name="isSupported", flags={"required": True}, ) severity_filter.severity_filters = AAZListType( serialized_name="severityFilters", ) severity_filters = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filter.severity_filters severity_filters.Element = AAZStrType() tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.techniques techniques.Element = AAZStrType() disc_ml_behavior_analytics = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics") disc_ml_behavior_analytics.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties.techniques techniques.Element = AAZStrType() disc_microsoft_security_incident_creation = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") disc_microsoft_security_incident_creation.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"required": True, "read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.display_names_exclude_filter = AAZListType( serialized_name="displayNamesExcludeFilter", ) properties.display_names_filter = AAZListType( serialized_name="displayNamesFilter", ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.product_filter = AAZStrType( serialized_name="productFilter", flags={"required": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severities_filter = AAZListType( serialized_name="severitiesFilter", ) properties.status = AAZStrType( flags={"required": True}, ) display_names_exclude_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_exclude_filter display_names_exclude_filter.Element = AAZStrType() display_names_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_filter display_names_filter.Element = AAZStrType() required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) severities_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.severities_filter severities_filter.Element = AAZStrType() disc_nrt = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT") disc_nrt.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.version = AAZStrType( flags={"required": True}, ) custom_details = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.custom_details custom_details.Element = AAZStrType() required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.techniques techniques.Element = AAZStrType() disc_scheduled = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled") disc_scheduled.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.event_grouping_settings = AAZObjectType( serialized_name="eventGroupingSettings", ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.query_frequency = AAZStrType( serialized_name="queryFrequency", flags={"required": True}, ) properties.query_period = AAZStrType( serialized_name="queryPeriod", flags={"required": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.trigger_operator = AAZStrType( serialized_name="triggerOperator", flags={"required": True}, ) properties.trigger_threshold = AAZIntType( serialized_name="triggerThreshold", flags={"required": True}, ) properties.version = AAZStrType( flags={"required": True}, ) custom_details = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.custom_details custom_details.Element = AAZStrType() event_grouping_settings = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.event_grouping_settings event_grouping_settings.aggregation_kind = AAZStrType( serialized_name="aggregationKind", ) required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.techniques techniques.Element = AAZStrType() disc_threat_intelligence = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence") disc_threat_intelligence.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties properties.alert_rules_created_by_template_count = AAZIntType( serialized_name="alertRulesCreatedByTemplateCount", flags={"required": True}, ) properties.created_date_utc = AAZStrType( serialized_name="createdDateUTC", flags={"read_only": True}, ) properties.description = AAZStrType( flags={"required": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_updated_date_utc = AAZStrType( serialized_name="lastUpdatedDateUTC", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.severity = AAZStrType( flags={"required": True}, ) properties.status = AAZStrType( flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _build_schema_alert_rule_template_data_source_read( required_data_connectors.Element) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties.techniques techniques.Element = AAZStrType() return cls._schema_on_200
class AlertRuleTemplatesList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
58
5
52
0
1
0
1
0
0
0
8
0
9
9
538
57
481
48
464
0
215
41
205
2
1
1
11
9,523
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_update.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: properties.set_prop("logicAppResourceId", AAZStrType, ".logic_app_resource_id", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("triggerUri", AAZStrType, ".trigger_uri", typ_kwargs={ "flags": {"required": True}}) return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
9
1
8
0
2
0
1
0
0
0
2
0
2
2
20
4
16
5
13
0
12
5
9
2
1
1
3
9,524
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_update.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._update.Update.ActionsGet
class ActionsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "actionId", self.ctx.args.action_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _build_schema_action_response_read(cls._schema_on_200) return cls._schema_on_200
class ActionsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
8
0
7
0
1
0
1
0
0
0
8
0
9
9
90
13
77
25
60
0
33
18
23
2
1
1
11
9,525
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_update.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._update.Update.ActionsCreateOrUpdate
class ActionsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "actionId", self.ctx.args.action_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _build_schema_action_response_read(cls._schema_on_200_201) return cls._schema_on_200_201
class ActionsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
8
0
8
0
1
0
1
0
0
0
9
0
10
10
102
15
87
28
68
0
36
20
25
2
1
1
12
9,526
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_show.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._show.Show.ActionsGet
class ActionsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "actionId", self.ctx.args.action_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.etag = AAZStrType() _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.logic_app_resource_id = AAZStrType( serialized_name="logicAppResourceId", flags={"required": True}, ) properties.workflow_id = AAZStrType( serialized_name="workflowId", ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200
class ActionsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
14
1
13
0
1
0
1
0
0
0
8
0
9
9
143
16
127
28
110
0
49
21
39
2
1
1
11
9,527
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_list.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._list.List.ActionsListByAlertRule
class ActionsListByAlertRule(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", flags={"read_only": True}, ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.etag = AAZStrType() _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.logic_app_resource_id = AAZStrType( serialized_name="logicAppResourceId", flags={"required": True}, ) properties.workflow_id = AAZStrType( serialized_name="workflowId", ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200
class ActionsListByAlertRule(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
15
1
14
0
1
0
1
0
0
0
8
0
9
9
151
18
133
30
116
0
54
23
44
2
1
1
11
9,528
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_delete.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._delete.Delete.ActionsDelete
class ActionsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "actionId", self.ctx.args.action_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class ActionsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
7
0
7
0
1
0
1
0
0
0
8
0
8
8
69
9
60
19
46
0
26
14
17
3
1
1
10
9,529
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/action/_create.py
azext_sentinel.aaz.latest.sentinel.alert_rule.action._create.Create.ActionsCreateOrUpdate
class ActionsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "actionId", self.ctx.args.action_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: properties.set_prop("logicAppResourceId", AAZStrType, ".logic_app_resource_id", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("triggerUri", AAZStrType, ".trigger_uri", typ_kwargs={ "flags": {"required": True}}) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.etag = AAZStrType() _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200_201.properties properties.logic_app_resource_id = AAZStrType( serialized_name="logicAppResourceId", flags={"required": True}, ) properties.workflow_id = AAZStrType( serialized_name="workflowId", ) system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200_201
class ActionsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
14
1
13
0
1
0
1
0
0
0
9
0
10
10
163
19
144
32
125
0
58
24
47
2
1
1
13
9,530
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_update.py
azext_sentinel.aaz.latest.sentinel.alert_rule._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_const("kind", "Fusion", AAZStrType, ".fusion", typ_kwargs={ "flags": {"required": True}}) _builder.set_const("kind", "MLBehaviorAnalytics", AAZStrType, ".ml_behavior_analytics", typ_kwargs={"flags": {"required": True}}) _builder.set_const("kind", "MicrosoftSecurityIncidentCreation", AAZStrType, ".ms_security_incident", typ_kwargs={"flags": {"required": True}}) _builder.set_const("kind", "NRT", AAZStrType, ".nrt", typ_kwargs={ "flags": {"required": True}}) _builder.set_const("kind", "Scheduled", AAZStrType, ".scheduled", typ_kwargs={ "flags": {"required": True}}) _builder.set_const("kind", "ThreatIntelligence", AAZStrType, ".threat_intelligence", typ_kwargs={"flags": {"required": True}}) _builder.discriminate_by("kind", "Fusion") _builder.discriminate_by("kind", "MLBehaviorAnalytics") _builder.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") _builder.discriminate_by("kind", "NRT") _builder.discriminate_by("kind", "Scheduled") _builder.discriminate_by("kind", "ThreatIntelligence") disc_fusion = _builder.get("{kind:Fusion}") if disc_fusion is not None: disc_fusion.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:Fusion}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".fusion.alert_rule_template_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".fusion.enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "scenarioExclusionPatterns", AAZListType, ".fusion.scenario_exclusion_patterns") properties.set_prop( "sourceSettings", AAZListType, ".fusion.source_settings") scenario_exclusion_patterns = _builder.get( "{kind:Fusion}.properties.scenarioExclusionPatterns") if scenario_exclusion_patterns is not None: scenario_exclusion_patterns.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.scenarioExclusionPatterns[]") if _elements is not None: _elements.set_prop("dateAddedInUTC", AAZStrType, ".date_added_in_utc", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("exclusionPattern", AAZStrType, ".exclusion_pattern", typ_kwargs={ "flags": {"required": True}}) source_settings = _builder.get( "{kind:Fusion}.properties.sourceSettings") if source_settings is not None: source_settings.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.sourceSettings[]") if _elements is not None: _elements.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("sourceName", AAZStrType, ".source_name", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "sourceSubTypes", AAZListType, ".source_sub_types") source_sub_types = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes") if source_sub_types is not None: source_sub_types.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[]") if _elements is not None: _elements.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("severityFilters", AAZObjectType, ".severity_filters", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("sourceSubTypeName", AAZStrType, ".source_sub_type_name", typ_kwargs={ "flags": {"required": True}}) severity_filters = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[].severityFilters") if severity_filters is not None: severity_filters.set_prop("filters", AAZListType, ".filters") filters = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[].severityFilters.filters") if filters is not None: filters.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[].severityFilters.filters[]") if _elements is not None: _elements.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("severity", AAZStrType, ".severity", typ_kwargs={ "flags": {"required": True}}) disc_ml_behavior_analytics = _builder.get( "{kind:MLBehaviorAnalytics}") if disc_ml_behavior_analytics is not None: disc_ml_behavior_analytics.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:MLBehaviorAnalytics}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".ml_behavior_analytics.alert_rule_template_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".ml_behavior_analytics.enabled", typ_kwargs={ "flags": {"required": True}}) disc_microsoft_security_incident_creation = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}") if disc_microsoft_security_incident_creation is not None: disc_microsoft_security_incident_creation.set_prop( "properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) properties = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".ms_security_incident.alert_rule_template_name") properties.set_prop("description", AAZStrType, ".ms_security_incident.description") properties.set_prop("displayName", AAZStrType, ".ms_security_incident.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("displayNamesExcludeFilter", AAZListType, ".ms_security_incident.display_names_exclude_filter") properties.set_prop( "displayNamesFilter", AAZListType, ".ms_security_incident.display_names_filter") properties.set_prop("enabled", AAZBoolType, ".ms_security_incident.enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("productFilter", AAZStrType, ".ms_security_incident.product_filter", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "severitiesFilter", AAZListType, ".ms_security_incident.severities_filter") display_names_exclude_filter = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties.displayNamesExcludeFilter") if display_names_exclude_filter is not None: display_names_exclude_filter.set_elements(AAZStrType, ".") display_names_filter = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties.displayNamesFilter") if display_names_filter is not None: display_names_filter.set_elements(AAZStrType, ".") severities_filter = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties.severitiesFilter") if severities_filter is not None: severities_filter.set_elements(AAZStrType, ".") disc_nrt = _builder.get("{kind:NRT}") if disc_nrt is not None: disc_nrt.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:NRT}.properties") if properties is not None: _build_schema_alert_details_override_update(properties.set_prop( "alertDetailsOverride", AAZObjectType, ".nrt.alert_details_override")) properties.set_prop("alertRuleTemplateName", AAZStrType, ".nrt.alert_rule_template_name") properties.set_prop( "customDetails", AAZDictType, ".nrt.custom_details") properties.set_prop( "description", AAZStrType, ".nrt.description") properties.set_prop("displayName", AAZStrType, ".nrt.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".nrt.enabled", typ_kwargs={ "flags": {"required": True}}) _build_schema_entity_mappings_update(properties.set_prop( "entityMappings", AAZListType, ".nrt.entity_mappings")) _build_schema_incident_configuration_update(properties.set_prop( "incidentConfiguration", AAZObjectType, ".nrt.incident_configuration")) properties.set_prop("query", AAZStrType, ".nrt.query", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("severity", AAZStrType, ".nrt.severity", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionDuration", AAZStrType, ".nrt.suppression_duration", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionEnabled", AAZBoolType, ".nrt.suppression_enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("tactics", AAZListType, ".nrt.tactics") properties.set_prop( "techniques", AAZListType, ".nrt.techniques") properties.set_prop("templateVersion", AAZStrType, ".nrt.template_version") custom_details = _builder.get( "{kind:NRT}.properties.customDetails") if custom_details is not None: custom_details.set_elements(AAZStrType, ".") tactics = _builder.get("{kind:NRT}.properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get("{kind:NRT}.properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") disc_scheduled = _builder.get("{kind:Scheduled}") if disc_scheduled is not None: disc_scheduled.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:Scheduled}.properties") if properties is not None: _build_schema_alert_details_override_update(properties.set_prop( "alertDetailsOverride", AAZObjectType, ".scheduled.alert_details_override")) properties.set_prop( "alertRuleTemplateName", AAZStrType, ".scheduled.alert_rule_template_name") properties.set_prop( "customDetails", AAZDictType, ".scheduled.custom_details") properties.set_prop("description", AAZStrType, ".scheduled.description") properties.set_prop("displayName", AAZStrType, ".scheduled.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".scheduled.enabled", typ_kwargs={ "flags": {"required": True}}) _build_schema_entity_mappings_update(properties.set_prop( "entityMappings", AAZListType, ".scheduled.entity_mappings")) properties.set_prop( "eventGroupingSettings", AAZObjectType, ".scheduled.event_grouping_settings") _build_schema_incident_configuration_update(properties.set_prop( "incidentConfiguration", AAZObjectType, ".scheduled.incident_configuration")) properties.set_prop("query", AAZStrType, ".scheduled.query", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("queryFrequency", AAZStrType, ".scheduled.query_frequency", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("queryPeriod", AAZStrType, ".scheduled.query_period", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("severity", AAZStrType, ".scheduled.severity", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionDuration", AAZStrType, ".scheduled.suppression_duration", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionEnabled", AAZBoolType, ".scheduled.suppression_enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("tactics", AAZListType, ".scheduled.tactics") properties.set_prop("techniques", AAZListType, ".scheduled.techniques") properties.set_prop("templateVersion", AAZStrType, ".scheduled.template_version") properties.set_prop("triggerOperator", AAZStrType, ".scheduled.trigger_operator", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("triggerThreshold", AAZIntType, ".scheduled.trigger_threshold", typ_kwargs={ "flags": {"required": True}}) custom_details = _builder.get( "{kind:Scheduled}.properties.customDetails") if custom_details is not None: custom_details.set_elements(AAZStrType, ".") event_grouping_settings = _builder.get( "{kind:Scheduled}.properties.eventGroupingSettings") if event_grouping_settings is not None: event_grouping_settings.set_prop( "aggregationKind", AAZStrType, ".aggregation_kind") tactics = _builder.get("{kind:Scheduled}.properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get("{kind:Scheduled}.properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") disc_threat_intelligence = _builder.get( "{kind:ThreatIntelligence}") if disc_threat_intelligence is not None: disc_threat_intelligence.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:ThreatIntelligence}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".threat_intelligence.alert_rule_template_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".threat_intelligence.enabled", typ_kwargs={ "flags": {"required": True}}) return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
99
16
83
0
17
0
1
0
0
0
2
0
2
2
201
34
167
24
164
0
163
24
160
32
1
1
33
9,531
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_update.py
azext_sentinel.aaz.latest.sentinel.alert_rule._update.Update.AlertRulesGet
class AlertRulesGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _build_schema_alert_rule_read(cls._schema_on_200) return cls._schema_on_200
class AlertRulesGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
7
0
7
0
1
0
1
0
0
0
8
0
9
9
86
13
73
25
56
0
33
18
23
2
1
1
11
9,532
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_update.py
azext_sentinel.aaz.latest.sentinel.alert_rule._update.Update.AlertRulesCreateOrUpdate
class AlertRulesCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _build_schema_alert_rule_read(cls._schema_on_200_201) return cls._schema_on_200_201
class AlertRulesCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
8
0
7
0
1
0
1
0
0
0
9
0
10
10
98
15
83
28
64
0
36
20
25
2
1
1
12
9,533
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_show.py
azext_sentinel.aaz.latest.sentinel.alert_rule._show.Show.AlertRulesGet
class AlertRulesGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.etag = AAZStrType() _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.kind = AAZStrType( flags={"required": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_fusion = cls._schema_on_200.discriminate_by("kind", "Fusion") disc_fusion.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.scenario_exclusion_patterns = AAZListType( serialized_name="scenarioExclusionPatterns", ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.source_settings = AAZListType( serialized_name="sourceSettings", ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) scenario_exclusion_patterns = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.scenario_exclusion_patterns scenario_exclusion_patterns.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.scenario_exclusion_patterns.Element _element.date_added_in_utc = AAZStrType( serialized_name="dateAddedInUTC", flags={"required": True}, ) _element.exclusion_pattern = AAZStrType( serialized_name="exclusionPattern", flags={"required": True}, ) source_settings = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings source_settings.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.source_name = AAZStrType( serialized_name="sourceName", flags={"required": True}, ) _element.source_sub_types = AAZListType( serialized_name="sourceSubTypes", ) source_sub_types = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types source_sub_types.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.severity_filters = AAZObjectType( serialized_name="severityFilters", flags={"required": True}, ) _element.source_sub_type_display_name = AAZStrType( serialized_name="sourceSubTypeDisplayName", flags={"read_only": True}, ) _element.source_sub_type_name = AAZStrType( serialized_name="sourceSubTypeName", flags={"required": True}, ) severity_filters = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters severity_filters.filters = AAZListType() severity_filters.is_supported = AAZBoolType( serialized_name="isSupported", flags={"read_only": True}, ) filters = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters.filters filters.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters.filters.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.severity = AAZStrType( flags={"required": True}, ) tactics = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200.discriminate_by( "kind", "Fusion").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) disc_ml_behavior_analytics = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics") disc_ml_behavior_analytics.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) tactics = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200.discriminate_by( "kind", "MLBehaviorAnalytics").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) disc_microsoft_security_incident_creation = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") disc_microsoft_security_incident_creation.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.display_names_exclude_filter = AAZListType( serialized_name="displayNamesExcludeFilter", ) properties.display_names_filter = AAZListType( serialized_name="displayNamesFilter", ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.product_filter = AAZStrType( serialized_name="productFilter", flags={"required": True}, ) properties.severities_filter = AAZListType( serialized_name="severitiesFilter", ) display_names_exclude_filter = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_exclude_filter display_names_exclude_filter.Element = AAZStrType() display_names_filter = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_filter display_names_filter.Element = AAZStrType() severities_filter = cls._schema_on_200.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.severities_filter severities_filter.Element = AAZStrType() disc_nrt = cls._schema_on_200.discriminate_by("kind", "NRT") disc_nrt.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "NRT").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.incident_configuration = AAZObjectType( serialized_name="incidentConfiguration", ) _build_schema_incident_configuration_read( properties.incident_configuration) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.severity = AAZStrType( flags={"required": True}, ) properties.suppression_duration = AAZStrType( serialized_name="suppressionDuration", flags={"required": True}, ) properties.suppression_enabled = AAZBoolType( serialized_name="suppressionEnabled", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.template_version = AAZStrType( serialized_name="templateVersion", ) custom_details = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.custom_details custom_details.Element = AAZStrType() tactics = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "NRT").properties.techniques techniques.Element = AAZStrType() disc_scheduled = cls._schema_on_200.discriminate_by( "kind", "Scheduled") disc_scheduled.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.event_grouping_settings = AAZObjectType( serialized_name="eventGroupingSettings", ) properties.incident_configuration = AAZObjectType( serialized_name="incidentConfiguration", ) _build_schema_incident_configuration_read( properties.incident_configuration) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.query_frequency = AAZStrType( serialized_name="queryFrequency", flags={"required": True}, ) properties.query_period = AAZStrType( serialized_name="queryPeriod", flags={"required": True}, ) properties.severity = AAZStrType( flags={"required": True}, ) properties.suppression_duration = AAZStrType( serialized_name="suppressionDuration", flags={"required": True}, ) properties.suppression_enabled = AAZBoolType( serialized_name="suppressionEnabled", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.template_version = AAZStrType( serialized_name="templateVersion", ) properties.trigger_operator = AAZStrType( serialized_name="triggerOperator", flags={"required": True}, ) properties.trigger_threshold = AAZIntType( serialized_name="triggerThreshold", flags={"required": True}, ) custom_details = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.custom_details custom_details.Element = AAZStrType() event_grouping_settings = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.event_grouping_settings event_grouping_settings.aggregation_kind = AAZStrType( serialized_name="aggregationKind", ) tactics = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "Scheduled").properties.techniques techniques.Element = AAZStrType() disc_threat_intelligence = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence") disc_threat_intelligence.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) tactics = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200.discriminate_by( "kind", "ThreatIntelligence").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) return cls._schema_on_200
class AlertRulesGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
57
5
52
0
1
0
1
0
0
0
8
0
9
9
532
52
480
47
463
0
200
40
190
2
1
1
11
9,534
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_list.py
azext_sentinel.aaz.latest.sentinel.alert_rule._list.List.AlertRulesList
class AlertRulesList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", flags={"read_only": True}, ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.etag = AAZStrType() _element.id = AAZStrType( flags={"read_only": True}, ) _element.kind = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_fusion = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion") disc_fusion.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.scenario_exclusion_patterns = AAZListType( serialized_name="scenarioExclusionPatterns", ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.source_settings = AAZListType( serialized_name="sourceSettings", ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) scenario_exclusion_patterns = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.scenario_exclusion_patterns scenario_exclusion_patterns.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.scenario_exclusion_patterns.Element _element.date_added_in_utc = AAZStrType( serialized_name="dateAddedInUTC", flags={"required": True}, ) _element.exclusion_pattern = AAZStrType( serialized_name="exclusionPattern", flags={"required": True}, ) source_settings = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings source_settings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.source_name = AAZStrType( serialized_name="sourceName", flags={"required": True}, ) _element.source_sub_types = AAZListType( serialized_name="sourceSubTypes", ) source_sub_types = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types source_sub_types.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.severity_filters = AAZObjectType( serialized_name="severityFilters", flags={"required": True}, ) _element.source_sub_type_display_name = AAZStrType( serialized_name="sourceSubTypeDisplayName", flags={"read_only": True}, ) _element.source_sub_type_name = AAZStrType( serialized_name="sourceSubTypeName", flags={"required": True}, ) severity_filters = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters severity_filters.filters = AAZListType() severity_filters.is_supported = AAZBoolType( serialized_name="isSupported", flags={"read_only": True}, ) filters = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters.filters filters.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters.filters.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.severity = AAZStrType( flags={"required": True}, ) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "Fusion").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) disc_ml_behavior_analytics = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics") disc_ml_behavior_analytics.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "MLBehaviorAnalytics").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) disc_microsoft_security_incident_creation = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") disc_microsoft_security_incident_creation.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.display_names_exclude_filter = AAZListType( serialized_name="displayNamesExcludeFilter", ) properties.display_names_filter = AAZListType( serialized_name="displayNamesFilter", ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.product_filter = AAZStrType( serialized_name="productFilter", flags={"required": True}, ) properties.severities_filter = AAZListType( serialized_name="severitiesFilter", ) display_names_exclude_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_exclude_filter display_names_exclude_filter.Element = AAZStrType() display_names_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_filter display_names_filter.Element = AAZStrType() severities_filter = cls._schema_on_200.value.Element.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.severities_filter severities_filter.Element = AAZStrType() disc_nrt = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT") disc_nrt.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.incident_configuration = AAZObjectType( serialized_name="incidentConfiguration", ) _build_schema_incident_configuration_read( properties.incident_configuration) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.severity = AAZStrType( flags={"required": True}, ) properties.suppression_duration = AAZStrType( serialized_name="suppressionDuration", flags={"required": True}, ) properties.suppression_enabled = AAZBoolType( serialized_name="suppressionEnabled", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.template_version = AAZStrType( serialized_name="templateVersion", ) custom_details = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.custom_details custom_details.Element = AAZStrType() tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "NRT").properties.techniques techniques.Element = AAZStrType() disc_scheduled = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled") disc_scheduled.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.event_grouping_settings = AAZObjectType( serialized_name="eventGroupingSettings", ) properties.incident_configuration = AAZObjectType( serialized_name="incidentConfiguration", ) _build_schema_incident_configuration_read( properties.incident_configuration) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.query_frequency = AAZStrType( serialized_name="queryFrequency", flags={"required": True}, ) properties.query_period = AAZStrType( serialized_name="queryPeriod", flags={"required": True}, ) properties.severity = AAZStrType( flags={"required": True}, ) properties.suppression_duration = AAZStrType( serialized_name="suppressionDuration", flags={"required": True}, ) properties.suppression_enabled = AAZBoolType( serialized_name="suppressionEnabled", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.template_version = AAZStrType( serialized_name="templateVersion", ) properties.trigger_operator = AAZStrType( serialized_name="triggerOperator", flags={"required": True}, ) properties.trigger_threshold = AAZIntType( serialized_name="triggerThreshold", flags={"required": True}, ) custom_details = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.custom_details custom_details.Element = AAZStrType() event_grouping_settings = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.event_grouping_settings event_grouping_settings.aggregation_kind = AAZStrType( serialized_name="aggregationKind", ) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "Scheduled").properties.techniques techniques.Element = AAZStrType() disc_threat_intelligence = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence") disc_threat_intelligence.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "ThreatIntelligence").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) return cls._schema_on_200
class AlertRulesList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
58
5
53
0
1
0
1
0
0
0
8
0
9
9
540
54
486
48
469
0
205
41
195
2
1
1
11
9,535
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_delete.py
azext_sentinel.aaz.latest.sentinel.alert_rule._delete.Delete.AlertRulesDelete
class AlertRulesDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class AlertRulesDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
6
0
6
0
1
0
1
0
0
0
8
0
8
8
65
9
56
19
42
0
26
14
17
3
1
1
10
9,536
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_list.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._list.List.SecurityMLAnalyticsSettingsList
class SecurityMLAnalyticsSettingsList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", flags={"read_only": True}, ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.etag = AAZStrType() _element.id = AAZStrType( flags={"read_only": True}, ) _element.kind = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_anomaly = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly") disc_anomaly.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly").properties properties.anomaly_settings_version = AAZIntType( serialized_name="anomalySettingsVersion", ) properties.anomaly_version = AAZStrType( serialized_name="anomalyVersion", flags={"required": True}, ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.frequency = AAZStrType( flags={"required": True}, ) properties.is_default_settings = AAZBoolType( serialized_name="isDefaultSettings", flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.settings_definition_id = AAZStrType( serialized_name="settingsDefinitionId", ) properties.settings_status = AAZStrType( serialized_name="settingsStatus", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly").properties.required_data_connectors.Element _element.connector_id = AAZStrType( serialized_name="connectorId", ) _element.data_types = AAZListType( serialized_name="dataTypes", ) data_types = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly").properties.required_data_connectors.Element.data_types data_types.Element = AAZStrType() tactics = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.value.Element.discriminate_by( "kind", "Anomaly").properties.techniques techniques.Element = AAZStrType() return cls._schema_on_200
class SecurityMLAnalyticsSettingsList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
20
2
19
0
1
0
1
0
0
0
8
0
9
9
203
24
179
35
162
0
78
28
68
2
1
1
11
9,537
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_show.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._show.Show.SecurityMLAnalyticsSettingsGet
class SecurityMLAnalyticsSettingsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "settingsResourceName", self.ctx.args.settings_resource_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.etag = AAZStrType() _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.kind = AAZStrType( flags={"required": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_anomaly = cls._schema_on_200.discriminate_by( "kind", "Anomaly") disc_anomaly.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200.discriminate_by( "kind", "Anomaly").properties properties.anomaly_settings_version = AAZIntType( serialized_name="anomalySettingsVersion", ) properties.anomaly_version = AAZStrType( serialized_name="anomalyVersion", flags={"required": True}, ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.frequency = AAZStrType( flags={"required": True}, ) properties.is_default_settings = AAZBoolType( serialized_name="isDefaultSettings", flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.required_data_connectors = AAZListType( serialized_name="requiredDataConnectors", ) properties.settings_definition_id = AAZStrType( serialized_name="settingsDefinitionId", ) properties.settings_status = AAZStrType( serialized_name="settingsStatus", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() required_data_connectors = cls._schema_on_200.discriminate_by( "kind", "Anomaly").properties.required_data_connectors required_data_connectors.Element = AAZObjectType() _element = cls._schema_on_200.discriminate_by( "kind", "Anomaly").properties.required_data_connectors.Element _element.connector_id = AAZStrType( serialized_name="connectorId", ) _element.data_types = AAZListType( serialized_name="dataTypes", ) data_types = cls._schema_on_200.discriminate_by( "kind", "Anomaly").properties.required_data_connectors.Element.data_types data_types.Element = AAZStrType() tactics = cls._schema_on_200.discriminate_by( "kind", "Anomaly").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200.discriminate_by( "kind", "Anomaly").properties.techniques techniques.Element = AAZStrType() return cls._schema_on_200
class SecurityMLAnalyticsSettingsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
19
1
18
0
1
0
1
0
0
0
8
0
9
9
195
22
173
34
156
0
73
27
63
2
1
1
11
9,538
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_update.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_const("kind", "Anomaly", AAZStrType, ".anomaly", typ_kwargs={ "flags": {"required": True}}) _builder.discriminate_by("kind", "Anomaly") disc_anomaly = _builder.get("{kind:Anomaly}") if disc_anomaly is not None: disc_anomaly.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:Anomaly}.properties") if properties is not None: properties.set_prop( "anomalySettingsVersion", AAZIntType, ".anomaly.anomaly_settings_version") properties.set_prop("anomalyVersion", AAZStrType, ".anomaly.anomaly_version", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "description", AAZStrType, ".anomaly.description") properties.set_prop("displayName", AAZStrType, ".anomaly.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".anomaly.enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("frequency", AAZStrType, ".anomaly.frequency", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("isDefaultSettings", AAZBoolType, ".anomaly.is_default_settings", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "requiredDataConnectors", AAZListType, ".anomaly.required_data_connectors") properties.set_prop( "settingsDefinitionId", AAZStrType, ".anomaly.settings_definition_id") properties.set_prop("settingsStatus", AAZStrType, ".anomaly.settings_status", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("tactics", AAZListType, ".anomaly.tactics") properties.set_prop( "techniques", AAZListType, ".anomaly.techniques") required_data_connectors = _builder.get( "{kind:Anomaly}.properties.requiredDataConnectors") if required_data_connectors is not None: required_data_connectors.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Anomaly}.properties.requiredDataConnectors[]") if _elements is not None: _elements.set_prop("connectorId", AAZStrType, ".connector_id") _elements.set_prop("dataTypes", AAZListType, ".data_types") data_types = _builder.get( "{kind:Anomaly}.properties.requiredDataConnectors[].dataTypes") if data_types is not None: data_types.set_elements(AAZStrType, ".") tactics = _builder.get("{kind:Anomaly}.properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get("{kind:Anomaly}.properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
27
4
23
0
5
0
1
0
0
0
2
0
2
2
56
10
46
11
43
0
42
11
39
8
1
1
9
9,539
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_update.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._update.Update.SecurityMLAnalyticsSettingsCreateOrUpdate
class SecurityMLAnalyticsSettingsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "settingsResourceName", self.ctx.args.settings_resource_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _build_schema_security_ml_analytics_setting_read( cls._schema_on_200_201) return cls._schema_on_200_201
class SecurityMLAnalyticsSettingsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
8
0
7
0
1
0
1
0
0
0
9
0
10
10
98
15
83
28
64
0
36
20
25
2
1
1
12
9,540
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MetricName
class MetricName(_serialization.Model): """A metric name. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The name of the metric. :vartype value: str :ivar localized_value: The friendly name of the metric. :vartype localized_value: str """ _validation = { "value": {"readonly": True}, "localized_value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "str"}, "localized_value": {"key": "localizedValue", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None self.localized_value = None
class MetricName(_serialization.Model): '''A metric name. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The name of the metric. :vartype value: str :ivar localized_value: The friendly name of the metric. :vartype localized_value: str ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
5
0
4
1
1
0.62
1
2
0
0
1
2
1
16
26
5
13
6
11
8
7
6
5
1
2
0
1
9,541
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MetricValue
class MetricValue(_serialization.Model): """Represents metrics values. Variables are only populated by the server, and will be ignored when sending a request. :ivar count: The number of values for the metric. :vartype count: int :ivar average: The average value of the metric. :vartype average: float :ivar maximum: The max value of the metric. :vartype maximum: float :ivar minimum: The min value of the metric. :vartype minimum: float :ivar timestamp: The metric timestamp (ISO-8601 format). :vartype timestamp: ~datetime.datetime :ivar total: The total value of the metric. :vartype total: float """ _validation = { "count": {"readonly": True}, "average": {"readonly": True}, "maximum": {"readonly": True}, "minimum": {"readonly": True}, "timestamp": {"readonly": True}, "total": {"readonly": True}, } _attribute_map = { "count": {"key": "_count", "type": "int"}, "average": {"key": "average", "type": "float"}, "maximum": {"key": "maximum", "type": "float"}, "minimum": {"key": "minimum", "type": "float"}, "timestamp": {"key": "timestamp", "type": "iso-8601"}, "total": {"key": "total", "type": "float"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.count = None self.average = None self.maximum = None self.minimum = None self.timestamp = None self.total = None
class MetricValue(_serialization.Model): '''Represents metrics values. Variables are only populated by the server, and will be ignored when sending a request. :ivar count: The number of values for the metric. :vartype count: int :ivar average: The average value of the metric. :vartype average: float :ivar maximum: The max value of the metric. :vartype maximum: float :ivar minimum: The min value of the metric. :vartype minimum: float :ivar timestamp: The metric timestamp (ISO-8601 format). :vartype timestamp: ~datetime.datetime :ivar total: The total value of the metric. :vartype total: float ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
9
0
8
1
1
0.64
1
2
0
1
1
6
1
16
46
5
25
10
23
16
11
10
9
1
2
0
1
9,542
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBCollectionCreateUpdateParameters
class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB MongoDB collection. 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 server. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: The standard JSON format of a MongoDB collection. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "resource": {"required": True}, } _attribute_map = { "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}"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "resource": {"key": "properties.resource", "type": "MongoDBCollectionResource"}, "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, resource: "_models.MongoDBCollectionResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, options: Optional["_models.CreateUpdateOptions"] = None, **kwargs: Any ) -> None: """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: The standard JSON format of a MongoDB collection. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options
class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): '''Parameters to create and update Cosmos DB MongoDB collection. 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 server. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: The standard JSON format of a MongoDB collection. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions ''' def __init__( self, *, resource: "_models.MongoDBCollectionResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, options: Optional["_models.CreateUpdateOptions"] = None, **kwargs: Any ) -> None: ''' :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: The standard JSON format of a MongoDB collection. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions ''' pass
2
2
31
0
13
18
1
1.47
1
3
0
0
1
2
1
17
80
6
30
15
19
44
7
6
5
1
3
0
1
9,543
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBCollectionGetPropertiesOptions
class MongoDBCollectionGetPropertiesOptions(OptionsResource): """MongoDBCollectionGetPropertiesOptions. :ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. :vartype throughput: int :ivar autoscale_settings: Specifies the Autoscale settings. :vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """
class MongoDBCollectionGetPropertiesOptions(OptionsResource): '''MongoDBCollectionGetPropertiesOptions. :ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. :vartype throughput: int :ivar autoscale_settings: Specifies the Autoscale settings. :vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings ''' pass
1
1
0
0
0
0
0
7
1
0
0
0
0
0
0
16
9
1
1
1
0
7
1
1
0
0
3
0
0
9,544
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBCollectionGetPropertiesResource
class MongoDBCollectionGetPropertiesResource(MongoDBCollectionResource, ExtendedResourceProperties): """MongoDBCollectionGetPropertiesResource. 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 server. :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. :vartype ts: float :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str :ivar id: Name of the Cosmos DB MongoDB collection. Required. :vartype id: str :ivar shard_key: A key-value pair of shard keys to be applied for the request. :vartype shard_key: dict[str, str] :ivar indexes: List of index keys. :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { "rid": {"readonly": True}, "ts": {"readonly": True}, "etag": {"readonly": True}, "id": {"required": True}, } _attribute_map = { "rid": {"key": "_rid", "type": "str"}, "ts": {"key": "_ts", "type": "float"}, "etag": {"key": "_etag", "type": "str"}, "id": {"key": "id", "type": "str"}, "shard_key": {"key": "shardKey", "type": "{str}"}, "indexes": {"key": "indexes", "type": "[MongoIndex]"}, "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, id: str, # pylint: disable=redefined-builtin shard_key: Optional[Dict[str, str]] = None, indexes: Optional[List["_models.MongoIndex"]] = None, analytical_storage_ttl: Optional[int] = None, restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: """ :keyword id: Name of the Cosmos DB MongoDB collection. Required. :paramtype id: str :keyword shard_key: A key-value pair of shard keys to be applied for the request. :paramtype shard_key: dict[str, str] :keyword indexes: List of index keys. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ super().__init__( id=id, shard_key=shard_key, indexes=indexes, analytical_storage_ttl=analytical_storage_ttl, restore_parameters=restore_parameters, create_mode=create_mode, **kwargs ) self.rid = None self.ts = None self.etag = None self.id = id self.shard_key = shard_key self.indexes = indexes self.analytical_storage_ttl = analytical_storage_ttl self.restore_parameters = restore_parameters self.create_mode = create_mode
class MongoDBCollectionGetPropertiesResource(MongoDBCollectionResource, ExtendedResourceProperties): '''MongoDBCollectionGetPropertiesResource. 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 server. :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. :vartype ts: float :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str :ivar id: Name of the Cosmos DB MongoDB collection. Required. :vartype id: str :ivar shard_key: A key-value pair of shard keys to be applied for the request. :vartype shard_key: dict[str, str] :ivar indexes: List of index keys. :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' def __init__( self, *, id: str, # pylint: disable=redefined-builtin shard_key: Optional[Dict[str, str]] = None, indexes: Optional[List["_models.MongoIndex"]] = None, analytical_storage_ttl: Optional[int] = None, restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: ''' :keyword id: Name of the Cosmos DB MongoDB collection. Required. :paramtype id: str :keyword shard_key: A key-value pair of shard keys to be applied for the request. :paramtype shard_key: dict[str, str] :keyword indexes: List of index keys. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' pass
2
2
44
0
29
16
1
0.85
2
4
0
0
1
9
1
18
92
6
47
23
35
40
14
13
12
1
3
0
1
9,545
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBCollectionGetResults
class MongoDBCollectionGetResults(ARMResourceProperties): """An Azure Cosmos DB MongoDB collection. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :ivar options: :vartype options: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions """ _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"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "resource": {"key": "properties.resource", "type": "MongoDBCollectionGetPropertiesResource"}, "options": {"key": "properties.options", "type": "MongoDBCollectionGetPropertiesOptions"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, resource: Optional["_models.MongoDBCollectionGetPropertiesResource"] = None, options: Optional["_models.MongoDBCollectionGetPropertiesOptions"] = None, **kwargs: Any ) -> None: """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions """ super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options
class MongoDBCollectionGetResults(ARMResourceProperties): '''An Azure Cosmos DB MongoDB collection. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :ivar options: :vartype options: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions ''' def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, resource: Optional["_models.MongoDBCollectionGetPropertiesResource"] = None, options: Optional["_models.MongoDBCollectionGetPropertiesOptions"] = None, **kwargs: Any ) -> None: ''' :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions ''' pass
2
2
30
0
13
17
1
1.41
1
3
0
0
1
2
1
17
75
5
29
15
18
41
7
6
5
1
3
0
1
9,546
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBCollectionListResult
class MongoDBCollectionListResult(_serialization.Model): """The List operation response, that contains the MongoDB collections and their properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of MongoDB collections and their properties. :vartype value: list[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] """ _validation = { "value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[MongoDBCollectionGetResults]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None
class MongoDBCollectionListResult(_serialization.Model): '''The List operation response, that contains the MongoDB collections and their properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of MongoDB collections and their properties. :vartype value: list[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.6
1
2
0
0
1
1
1
16
21
5
10
5
8
6
6
5
4
1
2
0
1
9,547
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBCollectionResource
class MongoDBCollectionResource(_serialization.Model): """Cosmos DB MongoDB collection resource object. All required parameters must be populated in order to send to server. :ivar id: Name of the Cosmos DB MongoDB collection. Required. :vartype id: str :ivar shard_key: A key-value pair of shard keys to be applied for the request. :vartype shard_key: dict[str, str] :ivar indexes: List of index keys. :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { "id": {"required": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "shard_key": {"key": "shardKey", "type": "{str}"}, "indexes": {"key": "indexes", "type": "[MongoIndex]"}, "analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"}, "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, id: str, # pylint: disable=redefined-builtin shard_key: Optional[Dict[str, str]] = None, indexes: Optional[List["_models.MongoIndex"]] = None, analytical_storage_ttl: Optional[int] = None, restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: """ :keyword id: Name of the Cosmos DB MongoDB collection. Required. :paramtype id: str :keyword shard_key: A key-value pair of shard keys to be applied for the request. :paramtype shard_key: dict[str, str] :keyword indexes: List of index keys. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ super().__init__(**kwargs) self.id = id self.shard_key = shard_key self.indexes = indexes self.analytical_storage_ttl = analytical_storage_ttl self.restore_parameters = restore_parameters self.create_mode = create_mode
class MongoDBCollectionResource(_serialization.Model): '''Cosmos DB MongoDB collection resource object. All required parameters must be populated in order to send to server. :ivar id: Name of the Cosmos DB MongoDB collection. Required. :vartype id: str :ivar shard_key: A key-value pair of shard keys to be applied for the request. :vartype shard_key: dict[str, str] :ivar indexes: List of index keys. :vartype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: int :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' def __init__( self, *, id: str, # pylint: disable=redefined-builtin shard_key: Optional[Dict[str, str]] = None, indexes: Optional[List["_models.MongoIndex"]] = None, analytical_storage_ttl: Optional[int] = None, restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: ''' :keyword id: Name of the Cosmos DB MongoDB collection. Required. :paramtype id: str :keyword shard_key: A key-value pair of shard keys to be applied for the request. :paramtype shard_key: dict[str, str] :keyword indexes: List of index keys. :paramtype indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: int :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' pass
2
2
33
0
18
16
1
1.07
1
4
0
1
1
6
1
16
66
5
30
20
18
32
11
10
9
1
2
0
1
9,548
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/_update.py
azext_sentinel.aaz.latest.sentinel.bookmark._update.Update.BookmarksGet
class BookmarksGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "bookmarkId", self.ctx.args.bookmark_id, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _build_schema_bookmark_read(cls._schema_on_200) return cls._schema_on_200
class BookmarksGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
7
0
7
0
1
0
1
0
0
0
8
0
9
9
86
13
73
25
56
0
33
18
23
2
1
1
11
9,549
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBDatabaseCreateUpdateParameters
class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB MongoDB database. 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 server. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: The standard JSON format of a MongoDB database. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "resource": {"required": True}, } _attribute_map = { "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}"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "resource": {"key": "properties.resource", "type": "MongoDBDatabaseResource"}, "options": {"key": "properties.options", "type": "CreateUpdateOptions"}, } def __init__( self, *, resource: "_models.MongoDBDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, options: Optional["_models.CreateUpdateOptions"] = None, **kwargs: Any ) -> None: """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: The standard JSON format of a MongoDB database. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options
class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): '''Parameters to create and update Cosmos DB MongoDB database. 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 server. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: The standard JSON format of a MongoDB database. Required. :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :ivar options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions ''' def __init__( self, *, resource: "_models.MongoDBDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, options: Optional["_models.CreateUpdateOptions"] = None, **kwargs: Any ) -> None: ''' :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: The standard JSON format of a MongoDB database. Required. :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :keyword options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions ''' pass
2
2
31
0
13
18
1
1.47
1
3
0
0
1
2
1
17
80
6
30
15
19
44
7
6
5
1
3
0
1
9,550
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBDatabaseGetPropertiesResource
class MongoDBDatabaseGetPropertiesResource(MongoDBDatabaseResource, ExtendedResourceProperties): """MongoDBDatabaseGetPropertiesResource. 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 server. :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. :vartype ts: float :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str :ivar id: Name of the Cosmos DB MongoDB database. Required. :vartype id: str :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { "rid": {"readonly": True}, "ts": {"readonly": True}, "etag": {"readonly": True}, "id": {"required": True}, } _attribute_map = { "rid": {"key": "_rid", "type": "str"}, "ts": {"key": "_ts", "type": "float"}, "etag": {"key": "_etag", "type": "str"}, "id": {"key": "id", "type": "str"}, "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, id: str, # pylint: disable=redefined-builtin restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: """ :keyword id: Name of the Cosmos DB MongoDB database. Required. :paramtype id: str :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ super().__init__(id=id, restore_parameters=restore_parameters, create_mode=create_mode, **kwargs) self.rid = None self.ts = None self.etag = None self.id = id self.restore_parameters = restore_parameters self.create_mode = create_mode
class MongoDBDatabaseGetPropertiesResource(MongoDBDatabaseResource, ExtendedResourceProperties): '''MongoDBDatabaseGetPropertiesResource. 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 server. :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. :vartype ts: float :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str :ivar id: Name of the Cosmos DB MongoDB database. Required. :vartype id: str :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' def __init__( self, *, id: str, # pylint: disable=redefined-builtin restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: ''' :keyword id: Name of the Cosmos DB MongoDB database. Required. :paramtype id: str :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' pass
2
2
24
0
15
10
1
0.93
2
3
0
0
1
6
1
18
63
6
30
17
21
28
11
10
9
1
3
0
1
9,551
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBDatabaseGetResults
class MongoDBDatabaseGetResults(ARMResourceProperties): """An Azure Cosmos DB MongoDB database. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource :ivar options: :vartype options: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions """ _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"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "resource": {"key": "properties.resource", "type": "MongoDBDatabaseGetPropertiesResource"}, "options": {"key": "properties.options", "type": "MongoDBDatabaseGetPropertiesOptions"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, resource: Optional["_models.MongoDBDatabaseGetPropertiesResource"] = None, options: Optional["_models.MongoDBDatabaseGetPropertiesOptions"] = None, **kwargs: Any ) -> None: """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions """ super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.resource = resource self.options = options
class MongoDBDatabaseGetResults(ARMResourceProperties): '''An Azure Cosmos DB MongoDB database. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar resource: :vartype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource :ivar options: :vartype options: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions ''' def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, resource: Optional["_models.MongoDBDatabaseGetPropertiesResource"] = None, options: Optional["_models.MongoDBDatabaseGetPropertiesOptions"] = None, **kwargs: Any ) -> None: ''' :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword resource: :paramtype resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource :keyword options: :paramtype options: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions ''' pass
2
2
30
0
13
17
1
1.41
1
3
0
0
1
2
1
17
75
5
29
15
18
41
7
6
5
1
3
0
1
9,552
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBDatabaseListResult
class MongoDBDatabaseListResult(_serialization.Model): """The List operation response, that contains the MongoDB databases and their properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of MongoDB databases and their properties. :vartype value: list[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] """ _validation = { "value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[MongoDBDatabaseGetResults]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None
class MongoDBDatabaseListResult(_serialization.Model): '''The List operation response, that contains the MongoDB databases and their properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of MongoDB databases and their properties. :vartype value: list[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.6
1
2
0
0
1
1
1
16
21
5
10
5
8
6
6
5
4
1
2
0
1
9,553
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBDatabaseResource
class MongoDBDatabaseResource(_serialization.Model): """Cosmos DB MongoDB database resource object. All required parameters must be populated in order to send to server. :ivar id: Name of the Cosmos DB MongoDB database. Required. :vartype id: str :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ _validation = { "id": {"required": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"}, "create_mode": {"key": "createMode", "type": "str"}, } def __init__( self, *, id: str, # pylint: disable=redefined-builtin restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: """ :keyword id: Name of the Cosmos DB MongoDB database. Required. :paramtype id: str :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode """ super().__init__(**kwargs) self.id = id self.restore_parameters = restore_parameters self.create_mode = create_mode
class MongoDBDatabaseResource(_serialization.Model): '''Cosmos DB MongoDB database resource object. All required parameters must be populated in order to send to server. :ivar id: Name of the Cosmos DB MongoDB database. Required. :vartype id: str :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' def __init__( self, *, id: str, # pylint: disable=redefined-builtin restore_parameters: Optional["_models.ResourceRestoreParameters"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", **kwargs: Any ) -> None: ''' :keyword id: Name of the Cosmos DB MongoDB database. Required. :paramtype id: str :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters :keyword create_mode: Enum to indicate the mode of resource creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode ''' pass
2
2
21
0
12
10
1
0.95
1
3
0
1
1
3
1
16
45
5
21
14
12
20
8
7
6
1
2
0
1
9,554
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoIndex
class MongoIndex(_serialization.Model): """Cosmos DB MongoDB collection index key. :ivar key: Cosmos DB MongoDB collection index keys. :vartype key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys :ivar options: Cosmos DB MongoDB collection index key options. :vartype options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions """ _attribute_map = { "key": {"key": "key", "type": "MongoIndexKeys"}, "options": {"key": "options", "type": "MongoIndexOptions"}, } def __init__( self, *, key: Optional["_models.MongoIndexKeys"] = None, options: Optional["_models.MongoIndexOptions"] = None, **kwargs: Any ) -> None: """ :keyword key: Cosmos DB MongoDB collection index keys. :paramtype key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys :keyword options: Cosmos DB MongoDB collection index key options. :paramtype options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions """ super().__init__(**kwargs) self.key = key self.options = options
class MongoIndex(_serialization.Model): '''Cosmos DB MongoDB collection index key. :ivar key: Cosmos DB MongoDB collection index keys. :vartype key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys :ivar options: Cosmos DB MongoDB collection index key options. :vartype options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions ''' def __init__( self, *, key: Optional["_models.MongoIndexKeys"] = None, options: Optional["_models.MongoIndexOptions"] = None, **kwargs: Any ) -> None: ''' :keyword key: Cosmos DB MongoDB collection index keys. :paramtype key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys :keyword options: Cosmos DB MongoDB collection index key options. :paramtype options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions ''' pass
2
2
16
0
10
6
1
0.8
1
2
0
0
1
2
1
16
30
3
15
11
7
12
6
5
4
1
2
0
1
9,555
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoIndexKeys
class MongoIndexKeys(_serialization.Model): """Cosmos DB MongoDB collection resource object. :ivar keys: List of keys for each MongoDB collection in the Azure Cosmos DB service. :vartype keys: list[str] """ _attribute_map = { "keys": {"key": "keys", "type": "[str]"}, } def __init__(self, *, keys: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword keys: List of keys for each MongoDB collection in the Azure Cosmos DB service. :paramtype keys: list[str] """ super().__init__(**kwargs) self.keys = keys
class MongoIndexKeys(_serialization.Model): '''Cosmos DB MongoDB collection resource object. :ivar keys: List of keys for each MongoDB collection in the Azure Cosmos DB service. :vartype keys: list[str] ''' def __init__(self, *, keys: Optional[List[str]] = None, **kwargs: Any) -> None: ''' :keyword keys: List of keys for each MongoDB collection in the Azure Cosmos DB service. :paramtype keys: list[str] ''' pass
2
2
7
0
3
4
1
1.14
1
3
0
0
1
1
1
16
18
3
7
4
5
8
5
4
3
1
2
0
1
9,556
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/automation_rule/_create.py
azext_sentinel.aaz.latest.sentinel.automation_rule._create.Create.AutomationRulesCreateOrUpdate
class AutomationRulesCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "automationRuleId", self.ctx.args.automation_rule_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}} ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={ "flags": {"required": True, "client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: properties.set_prop("actions", AAZListType, ".actions", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("order", AAZIntType, ".order", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("triggeringLogic", AAZObjectType, ".triggering_logic", typ_kwargs={ "flags": {"required": True}}) actions = _builder.get(".properties.actions") if actions is not None: actions.set_elements(AAZObjectType) _elements = _builder.get(".properties.actions[]") if _elements is not None: _elements.set_const("actionType", "ModifyProperties", AAZStrType, ".modify_properties", typ_kwargs={"flags": {"required": True}}) _elements.set_const("actionType", "RunPlaybook", AAZStrType, ".run_playbook", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("order", AAZIntType, ".order", typ_kwargs={ "flags": {"required": True}}) _elements.discriminate_by("actionType", "ModifyProperties") _elements.discriminate_by("actionType", "RunPlaybook") disc_modify_properties = _builder.get( ".properties.actions[]{actionType:ModifyProperties}") if disc_modify_properties is not None: disc_modify_properties.set_prop( "actionConfiguration", AAZObjectType, ".modify_properties.action_configuration") action_configuration = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration") if action_configuration is not None: action_configuration.set_prop( "classification", AAZStrType, ".classification") action_configuration.set_prop( "classificationComment", AAZStrType, ".classification_comment") action_configuration.set_prop( "classificationReason", AAZStrType, ".classification_reason") action_configuration.set_prop("labels", AAZListType, ".labels") action_configuration.set_prop("owner", AAZObjectType, ".owner") action_configuration.set_prop( "severity", AAZStrType, ".severity") action_configuration.set_prop("status", AAZStrType, ".status") labels = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration.labels") if labels is not None: labels.set_elements(AAZObjectType) _elements = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration.labels[]") if _elements is not None: _elements.set_prop("labelName", AAZStrType, ".label_name", typ_kwargs={ "flags": {"required": True}}) owner = _builder.get( ".properties.actions[]{actionType:ModifyProperties}.actionConfiguration.owner") if owner is not None: owner.set_prop("assignedTo", AAZStrType, ".assigned_to") owner.set_prop("email", AAZStrType, ".email") owner.set_prop("objectId", AAZStrType, ".object_id") owner.set_prop("ownerType", AAZStrType, ".owner_type") owner.set_prop("userPrincipalName", AAZStrType, ".user_principal_name") disc_run_playbook = _builder.get( ".properties.actions[]{actionType:RunPlaybook}") if disc_run_playbook is not None: disc_run_playbook.set_prop( "actionConfiguration", AAZObjectType, ".run_playbook.action_configuration") action_configuration = _builder.get( ".properties.actions[]{actionType:RunPlaybook}.actionConfiguration") if action_configuration is not None: action_configuration.set_prop( "logicAppResourceId", AAZStrType, ".logic_app_resource_id") action_configuration.set_prop( "tenantId", AAZStrType, ".tenant_id") triggering_logic = _builder.get(".properties.triggeringLogic") if triggering_logic is not None: triggering_logic.set_prop( "conditions", AAZListType, ".conditions") triggering_logic.set_prop( "expirationTimeUtc", AAZStrType, ".expiration_time_utc") triggering_logic.set_prop("isEnabled", AAZBoolType, ".is_enabled", typ_kwargs={ "flags": {"required": True}}) triggering_logic.set_prop("triggersOn", AAZStrType, ".triggers_on", typ_kwargs={ "flags": {"required": True}}) triggering_logic.set_prop("triggersWhen", AAZStrType, ".triggers_when", typ_kwargs={ "flags": {"required": True}}) conditions = _builder.get(".properties.triggeringLogic.conditions") if conditions is not None: conditions.set_elements(AAZObjectType) _elements = _builder.get( ".properties.triggeringLogic.conditions[]") if _elements is not None: _elements.set_const("conditionType", "Property", AAZStrType, ".property", typ_kwargs={ "flags": {"required": True}}) _elements.set_const("conditionType", "PropertyArrayChanged", AAZStrType, ".property_array_changed", typ_kwargs={"flags": {"required": True}}) _elements.set_const("conditionType", "PropertyChanged", AAZStrType, ".property_changed", typ_kwargs={"flags": {"required": True}}) _elements.discriminate_by("conditionType", "Property") _elements.discriminate_by( "conditionType", "PropertyArrayChanged") _elements.discriminate_by("conditionType", "PropertyChanged") disc_property = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:Property}") if disc_property is not None: disc_property.set_prop( "conditionProperties", AAZObjectType, ".property.condition_properties") condition_properties = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:Property}.conditionProperties") if condition_properties is not None: condition_properties.set_prop( "operator", AAZStrType, ".operator") condition_properties.set_prop( "propertyName", AAZStrType, ".property_name") condition_properties.set_prop( "propertyValues", AAZListType, ".property_values") property_values = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:Property}.conditionProperties.propertyValues") if property_values is not None: property_values.set_elements(AAZStrType, ".") disc_property_array_changed = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyArrayChanged}") if disc_property_array_changed is not None: disc_property_array_changed.set_prop( "conditionProperties", AAZObjectType, ".property_array_changed.condition_properties") condition_properties = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyArrayChanged}.conditionProperties") if condition_properties is not None: condition_properties.set_prop( "arrayType", AAZStrType, ".array_type") condition_properties.set_prop( "changeType", AAZStrType, ".change_type") disc_property_changed = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyChanged}") if disc_property_changed is not None: disc_property_changed.set_prop( "conditionProperties", AAZObjectType, ".property_changed.condition_properties") condition_properties = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyChanged}.conditionProperties") if condition_properties is not None: condition_properties.set_prop( "changeType", AAZStrType, ".change_type") condition_properties.set_prop( "operator", AAZStrType, ".operator") condition_properties.set_prop( "propertyName", AAZStrType, ".property_name") condition_properties.set_prop( "propertyValues", AAZListType, ".property_values") property_values = _builder.get( ".properties.triggeringLogic.conditions[]{conditionType:PropertyChanged}.conditionProperties.propertyValues") if property_values is not None: property_values.set_elements(AAZStrType, ".") return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.etag = AAZStrType() _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.properties = AAZObjectType( flags={"required": True, "client_flatten": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200_201.properties properties.actions = AAZListType( flags={"required": True}, ) properties.created_by = AAZObjectType( serialized_name="createdBy", flags={"read_only": True}, ) _build_schema_client_info_read(properties.created_by) properties.created_time_utc = AAZStrType( serialized_name="createdTimeUtc", flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.last_modified_by = AAZObjectType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) _build_schema_client_info_read(properties.last_modified_by) properties.last_modified_time_utc = AAZStrType( serialized_name="lastModifiedTimeUtc", flags={"read_only": True}, ) properties.order = AAZIntType( flags={"required": True}, ) properties.triggering_logic = AAZObjectType( serialized_name="triggeringLogic", flags={"required": True}, ) actions = cls._schema_on_200_201.properties.actions actions.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.actions.Element _element.action_type = AAZStrType( serialized_name="actionType", flags={"required": True}, ) _element.order = AAZIntType( flags={"required": True}, ) disc_modify_properties = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties") disc_modify_properties.action_configuration = AAZObjectType( serialized_name="actionConfiguration", ) action_configuration = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration action_configuration.classification = AAZStrType() action_configuration.classification_comment = AAZStrType( serialized_name="classificationComment", ) action_configuration.classification_reason = AAZStrType( serialized_name="classificationReason", ) action_configuration.labels = AAZListType() action_configuration.owner = AAZObjectType() action_configuration.severity = AAZStrType() action_configuration.status = AAZStrType() labels = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.labels labels.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.labels.Element _element.label_name = AAZStrType( serialized_name="labelName", flags={"required": True}, ) _element.label_type = AAZStrType( serialized_name="labelType", flags={"read_only": True}, ) owner = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "ModifyProperties").action_configuration.owner owner.assigned_to = AAZStrType( serialized_name="assignedTo", ) owner.email = AAZStrType() owner.object_id = AAZStrType( serialized_name="objectId", ) owner.owner_type = AAZStrType( serialized_name="ownerType", ) owner.user_principal_name = AAZStrType( serialized_name="userPrincipalName", ) disc_run_playbook = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "RunPlaybook") disc_run_playbook.action_configuration = AAZObjectType( serialized_name="actionConfiguration", ) action_configuration = cls._schema_on_200_201.properties.actions.Element.discriminate_by( "action_type", "RunPlaybook").action_configuration action_configuration.logic_app_resource_id = AAZStrType( serialized_name="logicAppResourceId", ) action_configuration.tenant_id = AAZStrType( serialized_name="tenantId", ) triggering_logic = cls._schema_on_200_201.properties.triggering_logic triggering_logic.conditions = AAZListType() triggering_logic.expiration_time_utc = AAZStrType( serialized_name="expirationTimeUtc", ) triggering_logic.is_enabled = AAZBoolType( serialized_name="isEnabled", flags={"required": True}, ) triggering_logic.triggers_on = AAZStrType( serialized_name="triggersOn", flags={"required": True}, ) triggering_logic.triggers_when = AAZStrType( serialized_name="triggersWhen", flags={"required": True}, ) conditions = cls._schema_on_200_201.properties.triggering_logic.conditions conditions.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.triggering_logic.conditions.Element _element.condition_type = AAZStrType( serialized_name="conditionType", flags={"required": True}, ) disc_property = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property") disc_property.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property").condition_properties condition_properties.operator = AAZStrType() condition_properties.property_name = AAZStrType( serialized_name="propertyName", ) condition_properties.property_values = AAZListType( serialized_name="propertyValues", ) property_values = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "Property").condition_properties.property_values property_values.Element = AAZStrType() disc_property_array_changed = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyArrayChanged") disc_property_array_changed.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyArrayChanged").condition_properties condition_properties.array_type = AAZStrType( serialized_name="arrayType", ) condition_properties.change_type = AAZStrType( serialized_name="changeType", ) disc_property_changed = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged") disc_property_changed.condition_properties = AAZObjectType( serialized_name="conditionProperties", ) condition_properties = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged").condition_properties condition_properties.change_type = AAZStrType( serialized_name="changeType", ) condition_properties.operator = AAZStrType() condition_properties.property_name = AAZStrType( serialized_name="propertyName", ) condition_properties.property_values = AAZListType( serialized_name="propertyValues", ) property_values = cls._schema_on_200_201.properties.triggering_logic.conditions.Element.discriminate_by( "condition_type", "PropertyChanged").condition_properties.property_values property_values.Element = AAZStrType() system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) return cls._schema_on_200_201
class AutomationRulesCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
42
5
37
0
3
0
1
0
0
0
9
0
10
10
444
59
385
60
366
0
221
52
210
22
1
1
33
9,557
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/analytics_setting/_update.py
azext_sentinel.aaz.latest.sentinel.analytics_setting._update.Update.SecurityMLAnalyticsSettingsGet
class SecurityMLAnalyticsSettingsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "settingsResourceName", self.ctx.args.settings_resource_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _build_schema_security_ml_analytics_setting_read( cls._schema_on_200) return cls._schema_on_200
class SecurityMLAnalyticsSettingsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
7
0
7
0
1
0
1
0
0
0
8
0
9
9
86
13
73
25
56
0
33
18
23
2
1
1
11
9,558
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.MongoDBDatabaseGetPropertiesOptions
class MongoDBDatabaseGetPropertiesOptions(OptionsResource): """MongoDBDatabaseGetPropertiesOptions. :ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. :vartype throughput: int :ivar autoscale_settings: Specifies the Autoscale settings. :vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """
class MongoDBDatabaseGetPropertiesOptions(OptionsResource): '''MongoDBDatabaseGetPropertiesOptions. :ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. :vartype throughput: int :ivar autoscale_settings: Specifies the Autoscale settings. :vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings ''' pass
1
1
0
0
0
0
0
7
1
0
0
0
0
0
0
16
9
1
1
1
0
7
1
1
0
0
3
0
0
9,559
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/alert_rule/_create.py
azext_sentinel.aaz.latest.sentinel.alert_rule._create.Create.AlertRulesCreateOrUpdate
class AlertRulesCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200, 201]: return self.on_200_201(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "ruleId", self.ctx.args.rule_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_const("kind", "Fusion", AAZStrType, ".fusion", typ_kwargs={ "flags": {"required": True}}) _builder.set_const("kind", "MLBehaviorAnalytics", AAZStrType, ".ml_behavior_analytics", typ_kwargs={"flags": {"required": True}}) _builder.set_const("kind", "MicrosoftSecurityIncidentCreation", AAZStrType, ".ms_security_incident", typ_kwargs={"flags": {"required": True}}) _builder.set_const("kind", "NRT", AAZStrType, ".nrt", typ_kwargs={ "flags": {"required": True}}) _builder.set_const("kind", "Scheduled", AAZStrType, ".scheduled", typ_kwargs={ "flags": {"required": True}}) _builder.set_const("kind", "ThreatIntelligence", AAZStrType, ".threat_intelligence", typ_kwargs={"flags": {"required": True}}) _builder.discriminate_by("kind", "Fusion") _builder.discriminate_by("kind", "MLBehaviorAnalytics") _builder.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") _builder.discriminate_by("kind", "NRT") _builder.discriminate_by("kind", "Scheduled") _builder.discriminate_by("kind", "ThreatIntelligence") disc_fusion = _builder.get("{kind:Fusion}") if disc_fusion is not None: disc_fusion.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:Fusion}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".fusion.alert_rule_template_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".fusion.enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "scenarioExclusionPatterns", AAZListType, ".fusion.scenario_exclusion_patterns") properties.set_prop( "sourceSettings", AAZListType, ".fusion.source_settings") scenario_exclusion_patterns = _builder.get( "{kind:Fusion}.properties.scenarioExclusionPatterns") if scenario_exclusion_patterns is not None: scenario_exclusion_patterns.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.scenarioExclusionPatterns[]") if _elements is not None: _elements.set_prop("dateAddedInUTC", AAZStrType, ".date_added_in_utc", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("exclusionPattern", AAZStrType, ".exclusion_pattern", typ_kwargs={ "flags": {"required": True}}) source_settings = _builder.get( "{kind:Fusion}.properties.sourceSettings") if source_settings is not None: source_settings.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.sourceSettings[]") if _elements is not None: _elements.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("sourceName", AAZStrType, ".source_name", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "sourceSubTypes", AAZListType, ".source_sub_types") source_sub_types = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes") if source_sub_types is not None: source_sub_types.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[]") if _elements is not None: _elements.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("severityFilters", AAZObjectType, ".severity_filters", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("sourceSubTypeName", AAZStrType, ".source_sub_type_name", typ_kwargs={ "flags": {"required": True}}) severity_filters = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[].severityFilters") if severity_filters is not None: severity_filters.set_prop("filters", AAZListType, ".filters") filters = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[].severityFilters.filters") if filters is not None: filters.set_elements(AAZObjectType) _elements = _builder.get( "{kind:Fusion}.properties.sourceSettings[].sourceSubTypes[].severityFilters.filters[]") if _elements is not None: _elements.set_prop("enabled", AAZBoolType, ".enabled", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("severity", AAZStrType, ".severity", typ_kwargs={ "flags": {"required": True}}) disc_ml_behavior_analytics = _builder.get( "{kind:MLBehaviorAnalytics}") if disc_ml_behavior_analytics is not None: disc_ml_behavior_analytics.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:MLBehaviorAnalytics}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".ml_behavior_analytics.alert_rule_template_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".ml_behavior_analytics.enabled", typ_kwargs={ "flags": {"required": True}}) disc_microsoft_security_incident_creation = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}") if disc_microsoft_security_incident_creation is not None: disc_microsoft_security_incident_creation.set_prop( "properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) properties = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".ms_security_incident.alert_rule_template_name") properties.set_prop("description", AAZStrType, ".ms_security_incident.description") properties.set_prop("displayName", AAZStrType, ".ms_security_incident.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("displayNamesExcludeFilter", AAZListType, ".ms_security_incident.display_names_exclude_filter") properties.set_prop( "displayNamesFilter", AAZListType, ".ms_security_incident.display_names_filter") properties.set_prop("enabled", AAZBoolType, ".ms_security_incident.enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("productFilter", AAZStrType, ".ms_security_incident.product_filter", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "severitiesFilter", AAZListType, ".ms_security_incident.severities_filter") display_names_exclude_filter = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties.displayNamesExcludeFilter") if display_names_exclude_filter is not None: display_names_exclude_filter.set_elements(AAZStrType, ".") display_names_filter = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties.displayNamesFilter") if display_names_filter is not None: display_names_filter.set_elements(AAZStrType, ".") severities_filter = _builder.get( "{kind:MicrosoftSecurityIncidentCreation}.properties.severitiesFilter") if severities_filter is not None: severities_filter.set_elements(AAZStrType, ".") disc_nrt = _builder.get("{kind:NRT}") if disc_nrt is not None: disc_nrt.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:NRT}.properties") if properties is not None: _build_schema_alert_details_override_create(properties.set_prop( "alertDetailsOverride", AAZObjectType, ".nrt.alert_details_override")) properties.set_prop("alertRuleTemplateName", AAZStrType, ".nrt.alert_rule_template_name") properties.set_prop( "customDetails", AAZDictType, ".nrt.custom_details") properties.set_prop( "description", AAZStrType, ".nrt.description") properties.set_prop("displayName", AAZStrType, ".nrt.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".nrt.enabled", typ_kwargs={ "flags": {"required": True}}) _build_schema_entity_mappings_create(properties.set_prop( "entityMappings", AAZListType, ".nrt.entity_mappings")) _build_schema_incident_configuration_create(properties.set_prop( "incidentConfiguration", AAZObjectType, ".nrt.incident_configuration")) properties.set_prop("query", AAZStrType, ".nrt.query", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("severity", AAZStrType, ".nrt.severity", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionDuration", AAZStrType, ".nrt.suppression_duration", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionEnabled", AAZBoolType, ".nrt.suppression_enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("tactics", AAZListType, ".nrt.tactics") properties.set_prop( "techniques", AAZListType, ".nrt.techniques") properties.set_prop("templateVersion", AAZStrType, ".nrt.template_version") custom_details = _builder.get( "{kind:NRT}.properties.customDetails") if custom_details is not None: custom_details.set_elements(AAZStrType, ".") tactics = _builder.get("{kind:NRT}.properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get("{kind:NRT}.properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") disc_scheduled = _builder.get("{kind:Scheduled}") if disc_scheduled is not None: disc_scheduled.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:Scheduled}.properties") if properties is not None: _build_schema_alert_details_override_create(properties.set_prop( "alertDetailsOverride", AAZObjectType, ".scheduled.alert_details_override")) properties.set_prop( "alertRuleTemplateName", AAZStrType, ".scheduled.alert_rule_template_name") properties.set_prop( "customDetails", AAZDictType, ".scheduled.custom_details") properties.set_prop("description", AAZStrType, ".scheduled.description") properties.set_prop("displayName", AAZStrType, ".scheduled.display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".scheduled.enabled", typ_kwargs={ "flags": {"required": True}}) _build_schema_entity_mappings_create(properties.set_prop( "entityMappings", AAZListType, ".scheduled.entity_mappings")) properties.set_prop( "eventGroupingSettings", AAZObjectType, ".scheduled.event_grouping_settings") _build_schema_incident_configuration_create(properties.set_prop( "incidentConfiguration", AAZObjectType, ".scheduled.incident_configuration")) properties.set_prop("query", AAZStrType, ".scheduled.query", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("queryFrequency", AAZStrType, ".scheduled.query_frequency", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("queryPeriod", AAZStrType, ".scheduled.query_period", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("severity", AAZStrType, ".scheduled.severity", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionDuration", AAZStrType, ".scheduled.suppression_duration", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("suppressionEnabled", AAZBoolType, ".scheduled.suppression_enabled", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("tactics", AAZListType, ".scheduled.tactics") properties.set_prop("techniques", AAZListType, ".scheduled.techniques") properties.set_prop("templateVersion", AAZStrType, ".scheduled.template_version") properties.set_prop("triggerOperator", AAZStrType, ".scheduled.trigger_operator", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("triggerThreshold", AAZIntType, ".scheduled.trigger_threshold", typ_kwargs={ "flags": {"required": True}}) custom_details = _builder.get( "{kind:Scheduled}.properties.customDetails") if custom_details is not None: custom_details.set_elements(AAZStrType, ".") event_grouping_settings = _builder.get( "{kind:Scheduled}.properties.eventGroupingSettings") if event_grouping_settings is not None: event_grouping_settings.set_prop( "aggregationKind", AAZStrType, ".aggregation_kind") tactics = _builder.get("{kind:Scheduled}.properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get("{kind:Scheduled}.properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") disc_threat_intelligence = _builder.get( "{kind:ThreatIntelligence}") if disc_threat_intelligence is not None: disc_threat_intelligence.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get("{kind:ThreatIntelligence}.properties") if properties is not None: properties.set_prop("alertRuleTemplateName", AAZStrType, ".threat_intelligence.alert_rule_template_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("enabled", AAZBoolType, ".threat_intelligence.enabled", typ_kwargs={ "flags": {"required": True}}) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.etag = AAZStrType() _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.kind = AAZStrType( flags={"required": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) system_data.created_by = AAZStrType( serialized_name="createdBy", flags={"read_only": True}, ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", flags={"read_only": True}, ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", flags={"read_only": True}, ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", flags={"read_only": True}, ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", flags={"read_only": True}, ) disc_fusion = cls._schema_on_200_201.discriminate_by( "kind", "Fusion") disc_fusion.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.scenario_exclusion_patterns = AAZListType( serialized_name="scenarioExclusionPatterns", ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.source_settings = AAZListType( serialized_name="sourceSettings", ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) scenario_exclusion_patterns = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.scenario_exclusion_patterns scenario_exclusion_patterns.Element = AAZObjectType() _element = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.scenario_exclusion_patterns.Element _element.date_added_in_utc = AAZStrType( serialized_name="dateAddedInUTC", flags={"required": True}, ) _element.exclusion_pattern = AAZStrType( serialized_name="exclusionPattern", flags={"required": True}, ) source_settings = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings source_settings.Element = AAZObjectType() _element = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.source_name = AAZStrType( serialized_name="sourceName", flags={"required": True}, ) _element.source_sub_types = AAZListType( serialized_name="sourceSubTypes", ) source_sub_types = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types source_sub_types.Element = AAZObjectType() _element = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.severity_filters = AAZObjectType( serialized_name="severityFilters", flags={"required": True}, ) _element.source_sub_type_display_name = AAZStrType( serialized_name="sourceSubTypeDisplayName", flags={"read_only": True}, ) _element.source_sub_type_name = AAZStrType( serialized_name="sourceSubTypeName", flags={"required": True}, ) severity_filters = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters severity_filters.filters = AAZListType() severity_filters.is_supported = AAZBoolType( serialized_name="isSupported", flags={"read_only": True}, ) filters = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters.filters filters.Element = AAZObjectType() _element = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.source_settings.Element.source_sub_types.Element.severity_filters.filters.Element _element.enabled = AAZBoolType( flags={"required": True}, ) _element.severity = AAZStrType( flags={"required": True}, ) tactics = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200_201.discriminate_by( "kind", "Fusion").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) disc_ml_behavior_analytics = cls._schema_on_200_201.discriminate_by( "kind", "MLBehaviorAnalytics") disc_ml_behavior_analytics.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "MLBehaviorAnalytics").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) tactics = cls._schema_on_200_201.discriminate_by( "kind", "MLBehaviorAnalytics").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200_201.discriminate_by( "kind", "MLBehaviorAnalytics").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) disc_microsoft_security_incident_creation = cls._schema_on_200_201.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation") disc_microsoft_security_incident_creation.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.display_names_exclude_filter = AAZListType( serialized_name="displayNamesExcludeFilter", ) properties.display_names_filter = AAZListType( serialized_name="displayNamesFilter", ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.product_filter = AAZStrType( serialized_name="productFilter", flags={"required": True}, ) properties.severities_filter = AAZListType( serialized_name="severitiesFilter", ) display_names_exclude_filter = cls._schema_on_200_201.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_exclude_filter display_names_exclude_filter.Element = AAZStrType() display_names_filter = cls._schema_on_200_201.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.display_names_filter display_names_filter.Element = AAZStrType() severities_filter = cls._schema_on_200_201.discriminate_by( "kind", "MicrosoftSecurityIncidentCreation").properties.severities_filter severities_filter.Element = AAZStrType() disc_nrt = cls._schema_on_200_201.discriminate_by("kind", "NRT") disc_nrt.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "NRT").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.incident_configuration = AAZObjectType( serialized_name="incidentConfiguration", ) _build_schema_incident_configuration_read( properties.incident_configuration) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.severity = AAZStrType( flags={"required": True}, ) properties.suppression_duration = AAZStrType( serialized_name="suppressionDuration", flags={"required": True}, ) properties.suppression_enabled = AAZBoolType( serialized_name="suppressionEnabled", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.template_version = AAZStrType( serialized_name="templateVersion", ) custom_details = cls._schema_on_200_201.discriminate_by( "kind", "NRT").properties.custom_details custom_details.Element = AAZStrType() tactics = cls._schema_on_200_201.discriminate_by( "kind", "NRT").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200_201.discriminate_by( "kind", "NRT").properties.techniques techniques.Element = AAZStrType() disc_scheduled = cls._schema_on_200_201.discriminate_by( "kind", "Scheduled") disc_scheduled.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "Scheduled").properties properties.alert_details_override = AAZObjectType( serialized_name="alertDetailsOverride", ) _build_schema_alert_details_override_read( properties.alert_details_override) properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", ) properties.custom_details = AAZDictType( serialized_name="customDetails", ) properties.description = AAZStrType() properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.entity_mappings = AAZListType( serialized_name="entityMappings", ) _build_schema_entity_mappings_read(properties.entity_mappings) properties.event_grouping_settings = AAZObjectType( serialized_name="eventGroupingSettings", ) properties.incident_configuration = AAZObjectType( serialized_name="incidentConfiguration", ) _build_schema_incident_configuration_read( properties.incident_configuration) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.query = AAZStrType( flags={"required": True}, ) properties.query_frequency = AAZStrType( serialized_name="queryFrequency", flags={"required": True}, ) properties.query_period = AAZStrType( serialized_name="queryPeriod", flags={"required": True}, ) properties.severity = AAZStrType( flags={"required": True}, ) properties.suppression_duration = AAZStrType( serialized_name="suppressionDuration", flags={"required": True}, ) properties.suppression_enabled = AAZBoolType( serialized_name="suppressionEnabled", flags={"required": True}, ) properties.tactics = AAZListType() properties.techniques = AAZListType() properties.template_version = AAZStrType( serialized_name="templateVersion", ) properties.trigger_operator = AAZStrType( serialized_name="triggerOperator", flags={"required": True}, ) properties.trigger_threshold = AAZIntType( serialized_name="triggerThreshold", flags={"required": True}, ) custom_details = cls._schema_on_200_201.discriminate_by( "kind", "Scheduled").properties.custom_details custom_details.Element = AAZStrType() event_grouping_settings = cls._schema_on_200_201.discriminate_by( "kind", "Scheduled").properties.event_grouping_settings event_grouping_settings.aggregation_kind = AAZStrType( serialized_name="aggregationKind", ) tactics = cls._schema_on_200_201.discriminate_by( "kind", "Scheduled").properties.tactics tactics.Element = AAZStrType() techniques = cls._schema_on_200_201.discriminate_by( "kind", "Scheduled").properties.techniques techniques.Element = AAZStrType() disc_threat_intelligence = cls._schema_on_200_201.discriminate_by( "kind", "ThreatIntelligence") disc_threat_intelligence.properties = AAZObjectType( flags={"client_flatten": True}, ) properties = cls._schema_on_200_201.discriminate_by( "kind", "ThreatIntelligence").properties properties.alert_rule_template_name = AAZStrType( serialized_name="alertRuleTemplateName", flags={"required": True}, ) properties.description = AAZStrType( flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"read_only": True}, ) properties.enabled = AAZBoolType( flags={"required": True}, ) properties.last_modified_utc = AAZStrType( serialized_name="lastModifiedUtc", flags={"read_only": True}, ) properties.severity = AAZStrType( flags={"read_only": True}, ) properties.tactics = AAZListType( flags={"read_only": True}, ) properties.techniques = AAZListType( flags={"read_only": True}, ) tactics = cls._schema_on_200_201.discriminate_by( "kind", "ThreatIntelligence").properties.tactics tactics.Element = AAZStrType( flags={"read_only": True}, ) techniques = cls._schema_on_200_201.discriminate_by( "kind", "ThreatIntelligence").properties.techniques techniques.Element = AAZStrType( flags={"read_only": True}, ) return cls._schema_on_200_201
class AlertRulesCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
71
7
64
0
4
0
1
0
0
0
9
0
10
10
733
85
648
70
629
0
360
62
349
32
1
1
43
9,560
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/_update.py
azext_sentinel.aaz.latest.sentinel.bookmark._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("etag", AAZStrType, ".etag") _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: properties.set_prop("created", AAZStrType, ".created") _build_schema_user_info_update(properties.set_prop( "createdBy", AAZObjectType, ".created_by")) properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "entityMappings", AAZListType, ".entity_mappings") properties.set_prop("eventTime", AAZStrType, ".event_time") properties.set_prop( "incidentInfo", AAZObjectType, ".incident_info") properties.set_prop("labels", AAZListType, ".labels") properties.set_prop("notes", AAZStrType, ".notes") properties.set_prop("query", AAZStrType, ".query_content", typ_kwargs={ "flags": {"required": True}}) properties.set_prop( "queryEndTime", AAZStrType, ".query_end_time") properties.set_prop("queryResult", AAZStrType, ".query_result") properties.set_prop( "queryStartTime", AAZStrType, ".query_start_time") properties.set_prop("tactics", AAZListType, ".tactics") properties.set_prop("techniques", AAZListType, ".techniques") properties.set_prop("updated", AAZStrType, ".updated") _build_schema_user_info_update(properties.set_prop( "updatedBy", AAZObjectType, ".updated_by")) entity_mappings = _builder.get(".properties.entityMappings") if entity_mappings is not None: entity_mappings.set_elements(AAZObjectType) _elements = _builder.get(".properties.entityMappings[]") if _elements is not None: _elements.set_prop("entityType", AAZStrType, ".entity_type") _elements.set_prop( "fieldMappings", AAZListType, ".field_mappings") field_mappings = _builder.get( ".properties.entityMappings[].fieldMappings") if field_mappings is not None: field_mappings.set_elements(AAZObjectType) _elements = _builder.get( ".properties.entityMappings[].fieldMappings[]") if _elements is not None: _elements.set_prop("identifier", AAZStrType, ".identifier") _elements.set_prop("value", AAZStrType, ".value") incident_info = _builder.get(".properties.incidentInfo") if incident_info is not None: incident_info.set_prop( "incidentId", AAZStrType, ".incident_id") incident_info.set_prop( "relationName", AAZStrType, ".relation_name") incident_info.set_prop("severity", AAZStrType, ".severity") incident_info.set_prop("title", AAZStrType, ".title") labels = _builder.get(".properties.labels") if labels is not None: labels.set_elements(AAZStrType, ".") tactics = _builder.get(".properties.tactics") if tactics is not None: tactics.set_elements(AAZStrType, ".") techniques = _builder.get(".properties.techniques") if techniques is not None: techniques.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
34
5
29
0
6
0
1
0
0
0
2
0
2
2
71
12
59
12
56
0
55
12
52
10
1
1
11
9,561
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/relation/_delete.py
azext_sentinel.aaz.latest.sentinel.bookmark.relation._delete.Delete.BookmarkRelationsDelete
class BookmarkRelationsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "bookmarkId", self.ctx.args.bookmark_id, required=True, ), **self.serialize_url_param( "relationName", self.ctx.args.relation_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), **self.serialize_url_param( "workspaceName", self.ctx.args.workspace_name, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2022-06-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class BookmarkRelationsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
7
0
7
0
1
0
1
0
0
0
8
0
8
8
69
9
60
19
46
0
26
14
17
3
1
1
10
9,562
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferRegionalServiceResource
class DataTransferRegionalServiceResource(RegionalServiceResource): """Resource for a regional service location. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The regional service name. :vartype name: str :ivar location: The location name. :vartype location: str :ivar status: Describes the status of a service. Known values are: "Creating", "Running", "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus """
class DataTransferRegionalServiceResource(RegionalServiceResource): '''Resource for a regional service location. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The regional service name. :vartype name: str :ivar location: The location name. :vartype location: str :ivar status: Describes the status of a service. Known values are: "Creating", "Running", "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus ''' pass
1
1
0
0
0
0
0
10
1
0
0
0
0
0
0
16
13
2
1
1
0
10
1
1
0
0
3
0
0
9,563
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferServiceResource
class DataTransferServiceResource(_serialization.Model): """Describes the service response property. :ivar properties: Properties for DataTransferServiceResource. :vartype properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties """ _attribute_map = { "properties": {"key": "properties", "type": "DataTransferServiceResourceProperties"}, } def __init__( self, *, properties: Optional["_models.DataTransferServiceResourceProperties"] = None, **kwargs: Any ) -> None: """ :keyword properties: Properties for DataTransferServiceResource. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties """ super().__init__(**kwargs) self.properties = properties
class DataTransferServiceResource(_serialization.Model): '''Describes the service response property. :ivar properties: Properties for DataTransferServiceResource. :vartype properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties ''' def __init__( self, *, properties: Optional["_models.DataTransferServiceResourceProperties"] = None, **kwargs: Any ) -> None: ''' :keyword properties: Properties for DataTransferServiceResource. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties ''' pass
2
2
9
0
5
4
1
0.89
1
2
0
0
1
1
1
16
20
3
9
6
5
8
5
4
3
1
2
0
1
9,564
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferServiceResourceCreateUpdateProperties
class DataTransferServiceResourceCreateUpdateProperties( ServiceResourceCreateUpdateProperties ): # pylint: disable=name-too-long """Properties for Create or Update request for DataTransferServiceResource. All required parameters must be populated in order to send to server. :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int :ivar service_type: ServiceType for the service. Required. Known values are: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType """ _validation = { "instance_count": {"minimum": 0}, "service_type": {"required": True}, } _attribute_map = { "instance_size": {"key": "instanceSize", "type": "str"}, "instance_count": {"key": "instanceCount", "type": "int"}, "service_type": {"key": "serviceType", "type": "str"}, } def __init__( self, *, instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs: Any ) -> None: """ :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int """ super().__init__(instance_size=instance_size, instance_count=instance_count, **kwargs) self.service_type: str = "DataTransfer"
class DataTransferServiceResourceCreateUpdateProperties( ServiceResourceCreateUpdateProperties ): '''Properties for Create or Update request for DataTransferServiceResource. All required parameters must be populated in order to send to server. :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int :ivar service_type: ServiceType for the service. Required. Known values are: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType ''' def __init__( self, *, instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs: Any ) -> None: ''' :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int ''' pass
2
2
16
0
9
7
1
0.9
1
4
0
0
1
1
1
17
44
5
21
13
11
19
6
5
4
1
3
0
1
9,565
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferServiceResourceProperties
class DataTransferServiceResourceProperties(ServiceResourceProperties): """Properties for DataTransferServiceResource. 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 server. :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. :vartype additional_properties: dict[str, any] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int :ivar service_type: ServiceType for the service. Required. Known values are: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType :ivar status: Describes the status of a service. Known values are: "Creating", "Running", "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar locations: An array that contains all of the locations for the service. :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] """ _validation = { "creation_time": {"readonly": True}, "instance_count": {"minimum": 0}, "service_type": {"required": True}, "status": {"readonly": True}, "locations": {"readonly": True}, } _attribute_map = { "additional_properties": {"key": "", "type": "{object}"}, "creation_time": {"key": "creationTime", "type": "iso-8601"}, "instance_size": {"key": "instanceSize", "type": "str"}, "instance_count": {"key": "instanceCount", "type": "int"}, "service_type": {"key": "serviceType", "type": "str"}, "status": {"key": "status", "type": "str"}, "locations": {"key": "locations", "type": "[DataTransferRegionalServiceResource]"}, } def __init__( self, *, additional_properties: Optional[Dict[str, Any]] = None, instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs: Any ) -> None: """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. :paramtype additional_properties: dict[str, any] :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int """ super().__init__( additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs ) self.service_type: str = "DataTransfer" self.locations = None
class DataTransferServiceResourceProperties(ServiceResourceProperties): '''Properties for DataTransferServiceResource. 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 server. :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. :vartype additional_properties: dict[str, any] :ivar creation_time: Time of the last state change (ISO-8601 format). :vartype creation_time: ~datetime.datetime :ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :ivar instance_count: Instance count for the service. :vartype instance_count: int :ivar service_type: ServiceType for the service. Required. Known values are: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder". :vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType :ivar status: Describes the status of a service. Known values are: "Creating", "Running", "Updating", "Deleting", "Error", and "Stopped". :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus :ivar locations: An array that contains all of the locations for the service. :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] ''' def __init__( self, *, additional_properties: Optional[Dict[str, Any]] = None, instance_size: Optional[Union[str, "_models.ServiceSize"]] = None, instance_count: Optional[int] = None, **kwargs: Any ) -> None: ''' :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. :paramtype additional_properties: dict[str, any] :keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s", "Cosmos.D8s", and "Cosmos.D16s". :paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize :keyword instance_count: Instance count for the service. :paramtype instance_count: int ''' pass
2
2
26
0
16
10
1
0.97
1
4
0
0
1
2
1
17
71
6
33
13
24
32
7
6
5
1
3
0
1
9,566
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountConnectionString
class DatabaseAccountConnectionString(_serialization.Model): """Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. :ivar connection_string: Value of the connection string. :vartype connection_string: str :ivar description: Description of the connection string. :vartype description: str :ivar key_kind: Kind of the connection string key. Known values are: "Primary", "Secondary", "PrimaryReadonly", and "SecondaryReadonly". :vartype key_kind: str or ~azure.mgmt.cosmosdb.models.Kind :ivar type: Type of the connection string. Known values are: "Sql", "Table", "MongoDB", "Cassandra", "CassandraConnectorMetadata", "Gremlin", "SqlDedicatedGateway", "GremlinV2", and "Undefined". :vartype type: str or ~azure.mgmt.cosmosdb.models.Type """ _validation = { "connection_string": {"readonly": True}, "description": {"readonly": True}, "key_kind": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "connection_string": {"key": "connectionString", "type": "str"}, "description": {"key": "description", "type": "str"}, "key_kind": {"key": "keyKind", "type": "str"}, "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.connection_string = None self.description = None self.key_kind = None self.type = None
class DatabaseAccountConnectionString(_serialization.Model): '''Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. :ivar connection_string: Value of the connection string. :vartype connection_string: str :ivar description: Description of the connection string. :vartype description: str :ivar key_kind: Kind of the connection string key. Known values are: "Primary", "Secondary", "PrimaryReadonly", and "SecondaryReadonly". :vartype key_kind: str or ~azure.mgmt.cosmosdb.models.Kind :ivar type: Type of the connection string. Known values are: "Sql", "Table", "MongoDB", "Cassandra", "CassandraConnectorMetadata", "Gremlin", "SqlDedicatedGateway", "GremlinV2", and "Undefined". :vartype type: str or ~azure.mgmt.cosmosdb.models.Type ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
7
0
6
1
1
0.79
1
2
0
0
1
4
1
16
39
5
19
8
17
15
9
8
7
1
2
0
1
9,567
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountCreateUpdateParameters
class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB database accounts. 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 server. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :vartype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :ivar consistency_policy: The consistency policy for the Cosmos DB account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :ivar locations: An array that contains the georeplication locations enabled for the Cosmos DB account. Required. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar database_account_offer_type: The offer type for the database. Required. Default value is "Standard". :vartype database_account_offer_type: str :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :ivar is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :vartype is_virtual_network_filter_enabled: bool :ivar enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :vartype enable_automatic_failover: bool :ivar capabilities: List of Cosmos DB capabilities for the account. :vartype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :ivar virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :vartype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :ivar enable_multiple_write_locations: Enables the account to write in multiple locations. :vartype enable_multiple_write_locations: bool :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :vartype disable_key_based_metadata_write_access: bool :ivar key_vault_key_uri: The URI of the key vault. :vartype key_vault_key_uri: str :ivar default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str :ivar public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool :ivar api_properties: API specific properties. Currently, supported only for MongoDB API. :vartype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :ivar enable_analytical_storage: Flag to indicate whether to enable storage analytics. :vartype enable_analytical_storage: bool :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :vartype network_acl_bypass_resource_ids: list[str] :ivar diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :vartype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :ivar disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :vartype disable_local_auth: bool :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :ivar capacity: The object that represents all properties related to capacity enforcement on an account. :vartype capacity: ~azure.mgmt.cosmosdb.models.Capacity :ivar capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :vartype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool :ivar keys_metadata: This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :vartype enable_partition_merge: bool :ivar enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :vartype enable_burst_capacity: bool :ivar minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :vartype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :ivar customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :vartype customer_managed_key_status: str :ivar enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :vartype enable_priority_based_execution: bool :ivar default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :vartype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :ivar enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :vartype enable_per_region_per_partition_autoscale: bool """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "locations": {"required": True}, "database_account_offer_type": {"required": True, "constant": True}, "keys_metadata": {"readonly": True}, } _attribute_map = { "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}"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "kind": {"key": "kind", "type": "str"}, "consistency_policy": {"key": "properties.consistencyPolicy", "type": "ConsistencyPolicy"}, "locations": {"key": "properties.locations", "type": "[Location]"}, "database_account_offer_type": {"key": "properties.databaseAccountOfferType", "type": "str"}, "ip_rules": {"key": "properties.ipRules", "type": "[IpAddressOrRange]"}, "is_virtual_network_filter_enabled": {"key": "properties.isVirtualNetworkFilterEnabled", "type": "bool"}, "enable_automatic_failover": {"key": "properties.enableAutomaticFailover", "type": "bool"}, "capabilities": {"key": "properties.capabilities", "type": "[Capability]"}, "virtual_network_rules": {"key": "properties.virtualNetworkRules", "type": "[VirtualNetworkRule]"}, "enable_multiple_write_locations": {"key": "properties.enableMultipleWriteLocations", "type": "bool"}, "enable_cassandra_connector": {"key": "properties.enableCassandraConnector", "type": "bool"}, "connector_offer": {"key": "properties.connectorOffer", "type": "str"}, "disable_key_based_metadata_write_access": { "key": "properties.disableKeyBasedMetadataWriteAccess", "type": "bool", }, "key_vault_key_uri": {"key": "properties.keyVaultKeyUri", "type": "str"}, "default_identity": {"key": "properties.defaultIdentity", "type": "str"}, "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, "enable_free_tier": {"key": "properties.enableFreeTier", "type": "bool"}, "api_properties": {"key": "properties.apiProperties", "type": "ApiProperties"}, "enable_analytical_storage": {"key": "properties.enableAnalyticalStorage", "type": "bool"}, "analytical_storage_configuration": { "key": "properties.analyticalStorageConfiguration", "type": "AnalyticalStorageConfiguration", }, "create_mode": {"key": "properties.createMode", "type": "str"}, "backup_policy": {"key": "properties.backupPolicy", "type": "BackupPolicy"}, "cors": {"key": "properties.cors", "type": "[CorsPolicy]"}, "network_acl_bypass": {"key": "properties.networkAclBypass", "type": "str"}, "network_acl_bypass_resource_ids": {"key": "properties.networkAclBypassResourceIds", "type": "[str]"}, "diagnostic_log_settings": {"key": "properties.diagnosticLogSettings", "type": "DiagnosticLogSettings"}, "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, "restore_parameters": {"key": "properties.restoreParameters", "type": "RestoreParameters"}, "capacity": {"key": "properties.capacity", "type": "Capacity"}, "capacity_mode": {"key": "properties.capacityMode", "type": "str"}, "enable_materialized_views": {"key": "properties.enableMaterializedViews", "type": "bool"}, "keys_metadata": {"key": "properties.keysMetadata", "type": "DatabaseAccountKeysMetadata"}, "enable_partition_merge": {"key": "properties.enablePartitionMerge", "type": "bool"}, "enable_burst_capacity": {"key": "properties.enableBurstCapacity", "type": "bool"}, "minimal_tls_version": {"key": "properties.minimalTlsVersion", "type": "str"}, "customer_managed_key_status": {"key": "properties.customerManagedKeyStatus", "type": "str"}, "enable_priority_based_execution": {"key": "properties.enablePriorityBasedExecution", "type": "bool"}, "default_priority_level": {"key": "properties.defaultPriorityLevel", "type": "str"}, "enable_per_region_per_partition_autoscale": { "key": "properties.enablePerRegionPerPartitionAutoscale", "type": "bool", }, } database_account_offer_type = "Standard" def __init__( # pylint: disable=too-many-locals self, *, locations: List["_models.Location"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, kind: Optional[Union[str, "_models.DatabaseAccountKind"]] = None, consistency_policy: Optional["_models.ConsistencyPolicy"] = None, ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, capabilities: Optional[List["_models.Capability"]] = None, virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", backup_policy: Optional["_models.BackupPolicy"] = None, cors: Optional[List["_models.CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, restore_parameters: Optional["_models.RestoreParameters"] = None, capacity: Optional["_models.Capacity"] = None, capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None, enable_materialized_views: Optional[bool] = None, enable_partition_merge: Optional[bool] = None, enable_burst_capacity: Optional[bool] = None, minimal_tls_version: Optional[Union[str, "_models.MinimalTlsVersion"]] = None, customer_managed_key_status: Optional[str] = None, enable_priority_based_execution: Optional[bool] = None, default_priority_level: Optional[Union[str, "_models.DefaultPriorityLevel"]] = None, enable_per_region_per_partition_autoscale: Optional[bool] = None, **kwargs: Any ) -> None: """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :keyword consistency_policy: The consistency policy for the Cosmos DB account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :keyword locations: An array that contains the georeplication locations enabled for the Cosmos DB account. Required. :paramtype locations: list[~azure.mgmt.cosmosdb.models.Location] :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :keyword is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :paramtype is_virtual_network_filter_enabled: bool :keyword enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :paramtype enable_automatic_failover: bool :keyword capabilities: List of Cosmos DB capabilities for the account. :paramtype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :keyword virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :paramtype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :keyword enable_multiple_write_locations: Enables the account to write in multiple locations. :paramtype enable_multiple_write_locations: bool :keyword enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :paramtype disable_key_based_metadata_write_access: bool :keyword key_vault_key_uri: The URI of the key vault. :paramtype key_vault_key_uri: str :keyword default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str :keyword public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool :keyword api_properties: API specific properties. Currently, supported only for MongoDB API. :paramtype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :keyword enable_analytical_storage: Flag to indicate whether to enable storage analytics. :paramtype enable_analytical_storage: bool :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :keyword create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :paramtype network_acl_bypass_resource_ids: list[str] :keyword diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :paramtype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :keyword disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :paramtype disable_local_auth: bool :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :keyword capacity: The object that represents all properties related to capacity enforcement on an account. :paramtype capacity: ~azure.mgmt.cosmosdb.models.Capacity :keyword capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :paramtype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :paramtype enable_partition_merge: bool :keyword enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :paramtype enable_burst_capacity: bool :keyword minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :paramtype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :keyword customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :paramtype customer_managed_key_status: str :keyword enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :paramtype enable_priority_based_execution: bool :keyword default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :paramtype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :keyword enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :paramtype enable_per_region_per_partition_autoscale: bool """ super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.kind = kind self.consistency_policy = consistency_policy self.locations = locations self.ip_rules = ip_rules self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover self.capabilities = capabilities self.virtual_network_rules = virtual_network_rules self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri self.default_identity = default_identity self.public_network_access = public_network_access self.enable_free_tier = enable_free_tier self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage self.analytical_storage_configuration = analytical_storage_configuration self.create_mode = create_mode self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth self.restore_parameters = restore_parameters self.capacity = capacity self.capacity_mode = capacity_mode self.enable_materialized_views = enable_materialized_views self.keys_metadata = None self.enable_partition_merge = enable_partition_merge self.enable_burst_capacity = enable_burst_capacity self.minimal_tls_version = minimal_tls_version self.customer_managed_key_status = customer_managed_key_status self.enable_priority_based_execution = enable_priority_based_execution self.default_priority_level = default_priority_level self.enable_per_region_per_partition_autoscale = enable_per_region_per_partition_autoscale
class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): '''Parameters to create and update Cosmos DB database accounts. 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 server. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :vartype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :ivar consistency_policy: The consistency policy for the Cosmos DB account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :ivar locations: An array that contains the georeplication locations enabled for the Cosmos DB account. Required. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar database_account_offer_type: The offer type for the database. Required. Default value is "Standard". :vartype database_account_offer_type: str :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :ivar is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :vartype is_virtual_network_filter_enabled: bool :ivar enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :vartype enable_automatic_failover: bool :ivar capabilities: List of Cosmos DB capabilities for the account. :vartype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :ivar virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :vartype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :ivar enable_multiple_write_locations: Enables the account to write in multiple locations. :vartype enable_multiple_write_locations: bool :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :vartype disable_key_based_metadata_write_access: bool :ivar key_vault_key_uri: The URI of the key vault. :vartype key_vault_key_uri: str :ivar default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str :ivar public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool :ivar api_properties: API specific properties. Currently, supported only for MongoDB API. :vartype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :ivar enable_analytical_storage: Flag to indicate whether to enable storage analytics. :vartype enable_analytical_storage: bool :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :vartype network_acl_bypass_resource_ids: list[str] :ivar diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :vartype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :ivar disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :vartype disable_local_auth: bool :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :ivar capacity: The object that represents all properties related to capacity enforcement on an account. :vartype capacity: ~azure.mgmt.cosmosdb.models.Capacity :ivar capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :vartype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool :ivar keys_metadata: This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :vartype enable_partition_merge: bool :ivar enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :vartype enable_burst_capacity: bool :ivar minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :vartype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :ivar customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :vartype customer_managed_key_status: str :ivar enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :vartype enable_priority_based_execution: bool :ivar default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :vartype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :ivar enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :vartype enable_per_region_per_partition_autoscale: bool ''' def __init__( # pylint: disable=too-many-locals self, *, locations: List["_models.Location"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, kind: Optional[Union[str, "_models.DatabaseAccountKind"]] = None, consistency_policy: Optional["_models.ConsistencyPolicy"] = None, ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, capabilities: Optional[List["_models.Capability"]] = None, virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", backup_policy: Optional["_models.BackupPolicy"] = None, cors: Optional[List["_models.CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, restore_parameters: Optional["_models.RestoreParameters"] = None, capacity: Optional["_models.Capacity"] = None, capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None, enable_materialized_views: Optional[bool] = None, enable_partition_merge: Optional[bool] = None, enable_burst_capacity: Optional[bool] = None, minimal_tls_version: Optional[Union[str, "_models.MinimalTlsVersion"]] = None, customer_managed_key_status: Optional[str] = None, enable_priority_based_execution: Optional[bool] = None, default_priority_level: Optional[Union[str, "_models.DefaultPriorityLevel"]] = None, enable_per_region_per_partition_autoscale: Optional[bool] = None, **kwargs: Any ) -> None: ''' :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :keyword consistency_policy: The consistency policy for the Cosmos DB account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :keyword locations: An array that contains the georeplication locations enabled for the Cosmos DB account. Required. :paramtype locations: list[~azure.mgmt.cosmosdb.models.Location] :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :keyword is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :paramtype is_virtual_network_filter_enabled: bool :keyword enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :paramtype enable_automatic_failover: bool :keyword capabilities: List of Cosmos DB capabilities for the account. :paramtype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :keyword virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :paramtype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :keyword enable_multiple_write_locations: Enables the account to write in multiple locations. :paramtype enable_multiple_write_locations: bool :keyword enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :paramtype disable_key_based_metadata_write_access: bool :keyword key_vault_key_uri: The URI of the key vault. :paramtype key_vault_key_uri: str :keyword default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str :keyword public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool :keyword api_properties: API specific properties. Currently, supported only for MongoDB API. :paramtype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :keyword enable_analytical_storage: Flag to indicate whether to enable storage analytics. :paramtype enable_analytical_storage: bool :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :keyword create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :paramtype network_acl_bypass_resource_ids: list[str] :keyword diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :paramtype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :keyword disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :paramtype disable_local_auth: bool :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :keyword capacity: The object that represents all properties related to capacity enforcement on an account. :paramtype capacity: ~azure.mgmt.cosmosdb.models.Capacity :keyword capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :paramtype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :paramtype enable_partition_merge: bool :keyword enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :paramtype enable_burst_capacity: bool :keyword minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :paramtype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :keyword customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :paramtype customer_managed_key_status: str :keyword enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :paramtype enable_priority_based_execution: bool :keyword default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :paramtype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :keyword enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :paramtype enable_per_region_per_partition_autoscale: bool ''' pass
2
2
201
0
84
118
1
1.66
1
4
0
0
1
38
1
17
405
7
150
87
104
249
44
43
42
1
3
0
1
9,568
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountGetResults
class DatabaseAccountGetResults(ARMResourceProperties): """An Azure Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :vartype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData :ivar provisioning_state: The provisioning state of the resource. :vartype provisioning_state: str :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. :vartype document_endpoint: str :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default value: Standard. Default value is "Standard". :vartype database_account_offer_type: str :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :ivar is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :vartype is_virtual_network_filter_enabled: bool :ivar enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :vartype enable_automatic_failover: bool :ivar consistency_policy: The consistency policy for the Cosmos DB database account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :ivar capabilities: List of Cosmos DB capabilities for the account. :vartype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :ivar write_locations: An array that contains the write location for the Cosmos DB account. :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB account. :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar failover_policies: An array that contains the regions ordered by their failover priorities. :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :ivar virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :vartype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the Cosmos DB account. :vartype private_endpoint_connections: list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] :ivar enable_multiple_write_locations: Enables the account to write in multiple locations. :vartype enable_multiple_write_locations: bool :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :vartype disable_key_based_metadata_write_access: bool :ivar key_vault_key_uri: The URI of the key vault. :vartype key_vault_key_uri: str :ivar default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str :ivar public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool :ivar api_properties: API specific properties. :vartype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :ivar enable_analytical_storage: Flag to indicate whether to enable storage analytics. :vartype enable_analytical_storage: bool :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar instance_id: A unique identifier assigned to the database account. :vartype instance_id: str :ivar create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :vartype network_acl_bypass_resource_ids: list[str] :ivar diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :vartype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :ivar disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :vartype disable_local_auth: bool :ivar capacity: The object that represents all properties related to capacity enforcement on an account. :vartype capacity: ~azure.mgmt.cosmosdb.models.Capacity :ivar capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :vartype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :ivar capacity_mode_change_transition_state: The object that represents the migration state for the CapacityMode of the Cosmos DB account. :vartype capacity_mode_change_transition_state: ~azure.mgmt.cosmosdb.models.CapacityModeChangeTransitionState :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool :ivar keys_metadata: The object that represents the metadata for the Account Keys of the Cosmos DB account. :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :vartype enable_partition_merge: bool :ivar enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :vartype enable_burst_capacity: bool :ivar minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :vartype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :ivar customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :vartype customer_managed_key_status: str :ivar enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :vartype enable_priority_based_execution: bool :ivar default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :vartype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :ivar enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :vartype enable_per_region_per_partition_autoscale: bool """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "system_data": {"readonly": True}, "provisioning_state": {"readonly": True}, "document_endpoint": {"readonly": True}, "database_account_offer_type": {"readonly": True}, "write_locations": {"readonly": True}, "read_locations": {"readonly": True}, "locations": {"readonly": True}, "failover_policies": {"readonly": True}, "private_endpoint_connections": {"readonly": True}, "instance_id": {"readonly": True}, "keys_metadata": {"readonly": True}, } _attribute_map = { "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}"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "kind": {"key": "kind", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "document_endpoint": {"key": "properties.documentEndpoint", "type": "str"}, "database_account_offer_type": {"key": "properties.databaseAccountOfferType", "type": "str"}, "ip_rules": {"key": "properties.ipRules", "type": "[IpAddressOrRange]"}, "is_virtual_network_filter_enabled": {"key": "properties.isVirtualNetworkFilterEnabled", "type": "bool"}, "enable_automatic_failover": {"key": "properties.enableAutomaticFailover", "type": "bool"}, "consistency_policy": {"key": "properties.consistencyPolicy", "type": "ConsistencyPolicy"}, "capabilities": {"key": "properties.capabilities", "type": "[Capability]"}, "write_locations": {"key": "properties.writeLocations", "type": "[Location]"}, "read_locations": {"key": "properties.readLocations", "type": "[Location]"}, "locations": {"key": "properties.locations", "type": "[Location]"}, "failover_policies": {"key": "properties.failoverPolicies", "type": "[FailoverPolicy]"}, "virtual_network_rules": {"key": "properties.virtualNetworkRules", "type": "[VirtualNetworkRule]"}, "private_endpoint_connections": { "key": "properties.privateEndpointConnections", "type": "[PrivateEndpointConnection]", }, "enable_multiple_write_locations": {"key": "properties.enableMultipleWriteLocations", "type": "bool"}, "enable_cassandra_connector": {"key": "properties.enableCassandraConnector", "type": "bool"}, "connector_offer": {"key": "properties.connectorOffer", "type": "str"}, "disable_key_based_metadata_write_access": { "key": "properties.disableKeyBasedMetadataWriteAccess", "type": "bool", }, "key_vault_key_uri": {"key": "properties.keyVaultKeyUri", "type": "str"}, "default_identity": {"key": "properties.defaultIdentity", "type": "str"}, "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, "enable_free_tier": {"key": "properties.enableFreeTier", "type": "bool"}, "api_properties": {"key": "properties.apiProperties", "type": "ApiProperties"}, "enable_analytical_storage": {"key": "properties.enableAnalyticalStorage", "type": "bool"}, "analytical_storage_configuration": { "key": "properties.analyticalStorageConfiguration", "type": "AnalyticalStorageConfiguration", }, "instance_id": {"key": "properties.instanceId", "type": "str"}, "create_mode": {"key": "properties.createMode", "type": "str"}, "restore_parameters": {"key": "properties.restoreParameters", "type": "RestoreParameters"}, "backup_policy": {"key": "properties.backupPolicy", "type": "BackupPolicy"}, "cors": {"key": "properties.cors", "type": "[CorsPolicy]"}, "network_acl_bypass": {"key": "properties.networkAclBypass", "type": "str"}, "network_acl_bypass_resource_ids": {"key": "properties.networkAclBypassResourceIds", "type": "[str]"}, "diagnostic_log_settings": {"key": "properties.diagnosticLogSettings", "type": "DiagnosticLogSettings"}, "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, "capacity": {"key": "properties.capacity", "type": "Capacity"}, "capacity_mode": {"key": "properties.capacityMode", "type": "str"}, "capacity_mode_change_transition_state": { "key": "properties.capacityModeChangeTransitionState", "type": "CapacityModeChangeTransitionState", }, "enable_materialized_views": {"key": "properties.enableMaterializedViews", "type": "bool"}, "keys_metadata": {"key": "properties.keysMetadata", "type": "DatabaseAccountKeysMetadata"}, "enable_partition_merge": {"key": "properties.enablePartitionMerge", "type": "bool"}, "enable_burst_capacity": {"key": "properties.enableBurstCapacity", "type": "bool"}, "minimal_tls_version": {"key": "properties.minimalTlsVersion", "type": "str"}, "customer_managed_key_status": {"key": "properties.customerManagedKeyStatus", "type": "str"}, "enable_priority_based_execution": {"key": "properties.enablePriorityBasedExecution", "type": "bool"}, "default_priority_level": {"key": "properties.defaultPriorityLevel", "type": "str"}, "enable_per_region_per_partition_autoscale": { "key": "properties.enablePerRegionPerPartitionAutoscale", "type": "bool", }, } def __init__( # pylint: disable=too-many-locals self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, kind: Optional[Union[str, "_models.DatabaseAccountKind"]] = None, ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, consistency_policy: Optional["_models.ConsistencyPolicy"] = None, capabilities: Optional[List["_models.Capability"]] = None, virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", restore_parameters: Optional["_models.RestoreParameters"] = None, backup_policy: Optional["_models.BackupPolicy"] = None, cors: Optional[List["_models.CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, capacity: Optional["_models.Capacity"] = None, capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None, capacity_mode_change_transition_state: Optional["_models.CapacityModeChangeTransitionState"] = None, enable_materialized_views: Optional[bool] = None, enable_partition_merge: Optional[bool] = None, enable_burst_capacity: Optional[bool] = None, minimal_tls_version: Optional[Union[str, "_models.MinimalTlsVersion"]] = None, customer_managed_key_status: Optional[str] = None, enable_priority_based_execution: Optional[bool] = None, default_priority_level: Optional[Union[str, "_models.DefaultPriorityLevel"]] = None, enable_per_region_per_partition_autoscale: Optional[bool] = None, **kwargs: Any ) -> None: """ :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :keyword is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :paramtype is_virtual_network_filter_enabled: bool :keyword enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :paramtype enable_automatic_failover: bool :keyword consistency_policy: The consistency policy for the Cosmos DB database account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :keyword capabilities: List of Cosmos DB capabilities for the account. :paramtype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :keyword virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :paramtype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :keyword enable_multiple_write_locations: Enables the account to write in multiple locations. :paramtype enable_multiple_write_locations: bool :keyword enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :paramtype disable_key_based_metadata_write_access: bool :keyword key_vault_key_uri: The URI of the key vault. :paramtype key_vault_key_uri: str :keyword default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str :keyword public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool :keyword api_properties: API specific properties. :paramtype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :keyword enable_analytical_storage: Flag to indicate whether to enable storage analytics. :paramtype enable_analytical_storage: bool :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :keyword create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :paramtype network_acl_bypass_resource_ids: list[str] :keyword diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :paramtype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :keyword disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :paramtype disable_local_auth: bool :keyword capacity: The object that represents all properties related to capacity enforcement on an account. :paramtype capacity: ~azure.mgmt.cosmosdb.models.Capacity :keyword capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :paramtype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :keyword capacity_mode_change_transition_state: The object that represents the migration state for the CapacityMode of the Cosmos DB account. :paramtype capacity_mode_change_transition_state: ~azure.mgmt.cosmosdb.models.CapacityModeChangeTransitionState :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :paramtype enable_partition_merge: bool :keyword enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :paramtype enable_burst_capacity: bool :keyword minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :paramtype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :keyword customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :paramtype customer_managed_key_status: str :keyword enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :paramtype enable_priority_based_execution: bool :keyword default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :paramtype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :keyword enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :paramtype enable_per_region_per_partition_autoscale: bool """ super().__init__(location=location, tags=tags, identity=identity, **kwargs) self.kind = kind self.system_data = None self.provisioning_state = None self.document_endpoint = None self.database_account_offer_type = None self.ip_rules = ip_rules self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover self.consistency_policy = consistency_policy self.capabilities = capabilities self.write_locations = None self.read_locations = None self.locations = None self.failover_policies = None self.virtual_network_rules = virtual_network_rules self.private_endpoint_connections = None self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri self.default_identity = default_identity self.public_network_access = public_network_access self.enable_free_tier = enable_free_tier self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage self.analytical_storage_configuration = analytical_storage_configuration self.instance_id = None self.create_mode = create_mode self.restore_parameters = restore_parameters self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth self.capacity = capacity self.capacity_mode = capacity_mode self.capacity_mode_change_transition_state = capacity_mode_change_transition_state self.enable_materialized_views = enable_materialized_views self.keys_metadata = None self.enable_partition_merge = enable_partition_merge self.enable_burst_capacity = enable_burst_capacity self.minimal_tls_version = minimal_tls_version self.customer_managed_key_status = customer_managed_key_status self.enable_priority_based_execution = enable_priority_based_execution self.default_priority_level = default_priority_level self.enable_per_region_per_partition_autoscale = enable_per_region_per_partition_autoscale
class DatabaseAccountGetResults(ARMResourceProperties): '''An Azure Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :vartype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData :ivar provisioning_state: The provisioning state of the resource. :vartype provisioning_state: str :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. :vartype document_endpoint: str :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default value: Standard. Default value is "Standard". :vartype database_account_offer_type: str :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :ivar is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :vartype is_virtual_network_filter_enabled: bool :ivar enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :vartype enable_automatic_failover: bool :ivar consistency_policy: The consistency policy for the Cosmos DB database account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :ivar capabilities: List of Cosmos DB capabilities for the account. :vartype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :ivar write_locations: An array that contains the write location for the Cosmos DB account. :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB account. :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar failover_policies: An array that contains the regions ordered by their failover priorities. :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :ivar virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :vartype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the Cosmos DB account. :vartype private_endpoint_connections: list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] :ivar enable_multiple_write_locations: Enables the account to write in multiple locations. :vartype enable_multiple_write_locations: bool :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :vartype disable_key_based_metadata_write_access: bool :ivar key_vault_key_uri: The URI of the key vault. :vartype key_vault_key_uri: str :ivar default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str :ivar public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool :ivar api_properties: API specific properties. :vartype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :ivar enable_analytical_storage: Flag to indicate whether to enable storage analytics. :vartype enable_analytical_storage: bool :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar instance_id: A unique identifier assigned to the database account. :vartype instance_id: str :ivar create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :ivar restore_parameters: Parameters to indicate the information about the restore. :vartype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :vartype network_acl_bypass_resource_ids: list[str] :ivar diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :vartype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :ivar disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :vartype disable_local_auth: bool :ivar capacity: The object that represents all properties related to capacity enforcement on an account. :vartype capacity: ~azure.mgmt.cosmosdb.models.Capacity :ivar capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :vartype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :ivar capacity_mode_change_transition_state: The object that represents the migration state for the CapacityMode of the Cosmos DB account. :vartype capacity_mode_change_transition_state: ~azure.mgmt.cosmosdb.models.CapacityModeChangeTransitionState :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool :ivar keys_metadata: The object that represents the metadata for the Account Keys of the Cosmos DB account. :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :vartype enable_partition_merge: bool :ivar enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :vartype enable_burst_capacity: bool :ivar minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :vartype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :ivar customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :vartype customer_managed_key_status: str :ivar enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :vartype enable_priority_based_execution: bool :ivar default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :vartype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :ivar enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :vartype enable_per_region_per_partition_autoscale: bool ''' def __init__( # pylint: disable=too-many-locals self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, kind: Optional[Union[str, "_models.DatabaseAccountKind"]] = None, ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, consistency_policy: Optional["_models.ConsistencyPolicy"] = None, capabilities: Optional[List["_models.Capability"]] = None, virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, create_mode: Union[str, "_models.CreateMode"] = "Default", restore_parameters: Optional["_models.RestoreParameters"] = None, backup_policy: Optional["_models.BackupPolicy"] = None, cors: Optional[List["_models.CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, capacity: Optional["_models.Capacity"] = None, capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None, capacity_mode_change_transition_state: Optional["_models.CapacityModeChangeTransitionState"] = None, enable_materialized_views: Optional[bool] = None, enable_partition_merge: Optional[bool] = None, enable_burst_capacity: Optional[bool] = None, minimal_tls_version: Optional[Union[str, "_models.MinimalTlsVersion"]] = None, customer_managed_key_status: Optional[str] = None, enable_priority_based_execution: Optional[bool] = None, default_priority_level: Optional[Union[str, "_models.DefaultPriorityLevel"]] = None, enable_per_region_per_partition_autoscale: Optional[bool] = None, **kwargs: Any ) -> None: ''' :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword kind: Indicates the type of database account. This can only be set at database account creation. Known values are: "GlobalDocumentDB", "MongoDB", and "Parse". :paramtype kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :keyword is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :paramtype is_virtual_network_filter_enabled: bool :keyword enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :paramtype enable_automatic_failover: bool :keyword consistency_policy: The consistency policy for the Cosmos DB database account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :keyword capabilities: List of Cosmos DB capabilities for the account. :paramtype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :keyword virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :paramtype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :keyword enable_multiple_write_locations: Enables the account to write in multiple locations. :paramtype enable_multiple_write_locations: bool :keyword enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :paramtype disable_key_based_metadata_write_access: bool :keyword key_vault_key_uri: The URI of the key vault. :paramtype key_vault_key_uri: str :keyword default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str :keyword public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool :keyword api_properties: API specific properties. :paramtype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :keyword enable_analytical_storage: Flag to indicate whether to enable storage analytics. :paramtype enable_analytical_storage: bool :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :keyword create_mode: Enum to indicate the mode of account creation. Known values are: "Default" and "Restore". :paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :keyword restore_parameters: Parameters to indicate the information about the restore. :paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :paramtype network_acl_bypass_resource_ids: list[str] :keyword diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :paramtype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :keyword disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :paramtype disable_local_auth: bool :keyword capacity: The object that represents all properties related to capacity enforcement on an account. :paramtype capacity: ~azure.mgmt.cosmosdb.models.Capacity :keyword capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :paramtype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :keyword capacity_mode_change_transition_state: The object that represents the migration state for the CapacityMode of the Cosmos DB account. :paramtype capacity_mode_change_transition_state: ~azure.mgmt.cosmosdb.models.CapacityModeChangeTransitionState :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :paramtype enable_partition_merge: bool :keyword enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :paramtype enable_burst_capacity: bool :keyword minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :paramtype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :keyword customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :paramtype customer_managed_key_status: str :keyword enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :paramtype enable_priority_based_execution: bool :keyword default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :paramtype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :keyword enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :paramtype enable_per_region_per_partition_autoscale: bool ''' pass
2
2
212
0
94
119
1
1.49
1
4
0
0
1
48
1
17
457
5
182
96
136
271
53
52
51
1
3
0
1
9,569
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountKeysMetadata
class DatabaseAccountKeysMetadata(_serialization.Model): """The metadata related to each access key for the given Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_master_key: The metadata related to the Primary Read-Write Key for the given Cosmos DB database account. :vartype primary_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata :ivar secondary_master_key: The metadata related to the Secondary Read-Write Key for the given Cosmos DB database account. :vartype secondary_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata :ivar primary_readonly_master_key: The metadata related to the Primary Read-Only Key for the given Cosmos DB database account. :vartype primary_readonly_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata :ivar secondary_readonly_master_key: The metadata related to the Secondary Read-Only Key for the given Cosmos DB database account. :vartype secondary_readonly_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata """ _validation = { "primary_master_key": {"readonly": True}, "secondary_master_key": {"readonly": True}, "primary_readonly_master_key": {"readonly": True}, "secondary_readonly_master_key": {"readonly": True}, } _attribute_map = { "primary_master_key": {"key": "primaryMasterKey", "type": "AccountKeyMetadata"}, "secondary_master_key": {"key": "secondaryMasterKey", "type": "AccountKeyMetadata"}, "primary_readonly_master_key": {"key": "primaryReadonlyMasterKey", "type": "AccountKeyMetadata"}, "secondary_readonly_master_key": {"key": "secondaryReadonlyMasterKey", "type": "AccountKeyMetadata"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.primary_master_key = None self.secondary_master_key = None self.primary_readonly_master_key = None self.secondary_readonly_master_key = None
class DatabaseAccountKeysMetadata(_serialization.Model): '''The metadata related to each access key for the given Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_master_key: The metadata related to the Primary Read-Write Key for the given Cosmos DB database account. :vartype primary_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata :ivar secondary_master_key: The metadata related to the Secondary Read-Write Key for the given Cosmos DB database account. :vartype secondary_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata :ivar primary_readonly_master_key: The metadata related to the Primary Read-Only Key for the given Cosmos DB database account. :vartype primary_readonly_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata :ivar secondary_readonly_master_key: The metadata related to the Secondary Read-Only Key for the given Cosmos DB database account. :vartype secondary_readonly_master_key: ~azure.mgmt.cosmosdb.models.AccountKeyMetadata ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
7
0
6
1
1
0.84
1
2
0
0
1
4
1
16
40
5
19
8
17
16
9
8
7
1
2
0
1
9,570
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountListConnectionStringsResult
class DatabaseAccountListConnectionStringsResult(_serialization.Model): # pylint: disable=name-too-long """The connection strings for the given database account. :ivar connection_strings: An array that contains the connection strings for the Cosmos DB account. :vartype connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] """ _attribute_map = { "connection_strings": {"key": "connectionStrings", "type": "[DatabaseAccountConnectionString]"}, } def __init__( self, *, connection_strings: Optional[List["_models.DatabaseAccountConnectionString"]] = None, **kwargs: Any ) -> None: """ :keyword connection_strings: An array that contains the connection strings for the Cosmos DB account. :paramtype connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] """ super().__init__(**kwargs) self.connection_strings = connection_strings
class DatabaseAccountListConnectionStringsResult(_serialization.Model): '''The connection strings for the given database account. :ivar connection_strings: An array that contains the connection strings for the Cosmos DB account. :vartype connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] ''' def __init__( self, *, connection_strings: Optional[List["_models.DatabaseAccountConnectionString"]] = None, **kwargs: Any ) -> None: ''' :keyword connection_strings: An array that contains the connection strings for the Cosmos DB account. :paramtype connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] ''' pass
2
2
11
0
5
6
1
1.33
1
2
0
0
1
1
1
16
23
3
9
6
5
12
5
4
3
1
2
0
1
9,571
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountListKeysResult
class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): """The access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. :vartype primary_readonly_master_key: str :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. :vartype secondary_readonly_master_key: str :ivar primary_master_key: Base 64 encoded value of the primary read-write key. :vartype primary_master_key: str :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. :vartype secondary_master_key: str """ _validation = { "primary_readonly_master_key": {"readonly": True}, "secondary_readonly_master_key": {"readonly": True}, "primary_master_key": {"readonly": True}, "secondary_master_key": {"readonly": True}, } _attribute_map = { "primary_readonly_master_key": {"key": "primaryReadonlyMasterKey", "type": "str"}, "secondary_readonly_master_key": {"key": "secondaryReadonlyMasterKey", "type": "str"}, "primary_master_key": {"key": "primaryMasterKey", "type": "str"}, "secondary_master_key": {"key": "secondaryMasterKey", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.primary_master_key = None self.secondary_master_key = None
class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): '''The access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. :vartype primary_readonly_master_key: str :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. :vartype secondary_readonly_master_key: str :ivar primary_master_key: Base 64 encoded value of the primary read-write key. :vartype primary_master_key: str :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. :vartype secondary_master_key: str ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
5
0
4
1
1
0.71
1
2
0
0
1
2
1
17
34
5
17
6
15
12
7
6
5
1
3
0
1
9,572
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountListReadOnlyKeysResult
class DatabaseAccountListReadOnlyKeysResult(_serialization.Model): """The read-only access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. :vartype primary_readonly_master_key: str :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. :vartype secondary_readonly_master_key: str """ _validation = { "primary_readonly_master_key": {"readonly": True}, "secondary_readonly_master_key": {"readonly": True}, } _attribute_map = { "primary_readonly_master_key": {"key": "primaryReadonlyMasterKey", "type": "str"}, "secondary_readonly_master_key": {"key": "secondaryReadonlyMasterKey", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.primary_readonly_master_key = None self.secondary_readonly_master_key = None
class DatabaseAccountListReadOnlyKeysResult(_serialization.Model): '''The read-only access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. :vartype primary_readonly_master_key: str :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. :vartype secondary_readonly_master_key: str ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
5
0
4
1
1
0.62
1
2
0
1
1
2
1
16
26
5
13
6
11
8
7
6
5
1
2
0
1
9,573
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountRegenerateKeyParameters
class DatabaseAccountRegenerateKeyParameters(_serialization.Model): """Parameters to regenerate the keys within the database account. All required parameters must be populated in order to send to server. :ivar key_kind: The access key to regenerate. Required. Known values are: "primary", "secondary", "primaryReadonly", and "secondaryReadonly". :vartype key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ _validation = { "key_kind": {"required": True}, } _attribute_map = { "key_kind": {"key": "keyKind", "type": "str"}, } def __init__(self, *, key_kind: Union[str, "_models.KeyKind"], **kwargs: Any) -> None: """ :keyword key_kind: The access key to regenerate. Required. Known values are: "primary", "secondary", "primaryReadonly", and "secondaryReadonly". :paramtype key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ super().__init__(**kwargs) self.key_kind = key_kind
class DatabaseAccountRegenerateKeyParameters(_serialization.Model): '''Parameters to regenerate the keys within the database account. All required parameters must be populated in order to send to server. :ivar key_kind: The access key to regenerate. Required. Known values are: "primary", "secondary", "primaryReadonly", and "secondaryReadonly". :vartype key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind ''' def __init__(self, *, key_kind: Union[str, "_models.KeyKind"], **kwargs: Any) -> None: ''' :keyword key_kind: The access key to regenerate. Required. Known values are: "primary", "secondary", "primaryReadonly", and "secondaryReadonly". :paramtype key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind ''' pass
2
2
8
0
3
5
1
1.1
1
3
0
0
1
1
1
16
26
5
10
5
8
11
6
5
4
1
2
0
1
9,574
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountUpdateParameters
class DatabaseAccountUpdateParameters(_serialization.Model): """Parameters for patching Azure Cosmos DB database account properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar consistency_policy: The consistency policy for the Cosmos DB account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :ivar locations: An array that contains the georeplication locations enabled for the Cosmos DB account. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :ivar is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :vartype is_virtual_network_filter_enabled: bool :ivar enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :vartype enable_automatic_failover: bool :ivar capabilities: List of Cosmos DB capabilities for the account. :vartype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :ivar virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :vartype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :ivar enable_multiple_write_locations: Enables the account to write in multiple locations. :vartype enable_multiple_write_locations: bool :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :vartype disable_key_based_metadata_write_access: bool :ivar key_vault_key_uri: The URI of the key vault. :vartype key_vault_key_uri: str :ivar default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str :ivar public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool :ivar api_properties: API specific properties. Currently, supported only for MongoDB API. :vartype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :ivar enable_analytical_storage: Flag to indicate whether to enable storage analytics. :vartype enable_analytical_storage: bool :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :vartype network_acl_bypass_resource_ids: list[str] :ivar diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :vartype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :ivar disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :vartype disable_local_auth: bool :ivar capacity: The object that represents all properties related to capacity enforcement on an account. :vartype capacity: ~azure.mgmt.cosmosdb.models.Capacity :ivar capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :vartype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool :ivar keys_metadata: This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :vartype enable_partition_merge: bool :ivar enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :vartype enable_burst_capacity: bool :ivar minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :vartype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :ivar customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :vartype customer_managed_key_status: str :ivar enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :vartype enable_priority_based_execution: bool :ivar default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :vartype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :ivar enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :vartype enable_per_region_per_partition_autoscale: bool """ _validation = { "keys_metadata": {"readonly": True}, } _attribute_map = { "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, "consistency_policy": {"key": "properties.consistencyPolicy", "type": "ConsistencyPolicy"}, "locations": {"key": "properties.locations", "type": "[Location]"}, "ip_rules": {"key": "properties.ipRules", "type": "[IpAddressOrRange]"}, "is_virtual_network_filter_enabled": {"key": "properties.isVirtualNetworkFilterEnabled", "type": "bool"}, "enable_automatic_failover": {"key": "properties.enableAutomaticFailover", "type": "bool"}, "capabilities": {"key": "properties.capabilities", "type": "[Capability]"}, "virtual_network_rules": {"key": "properties.virtualNetworkRules", "type": "[VirtualNetworkRule]"}, "enable_multiple_write_locations": {"key": "properties.enableMultipleWriteLocations", "type": "bool"}, "enable_cassandra_connector": {"key": "properties.enableCassandraConnector", "type": "bool"}, "connector_offer": {"key": "properties.connectorOffer", "type": "str"}, "disable_key_based_metadata_write_access": { "key": "properties.disableKeyBasedMetadataWriteAccess", "type": "bool", }, "key_vault_key_uri": {"key": "properties.keyVaultKeyUri", "type": "str"}, "default_identity": {"key": "properties.defaultIdentity", "type": "str"}, "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, "enable_free_tier": {"key": "properties.enableFreeTier", "type": "bool"}, "api_properties": {"key": "properties.apiProperties", "type": "ApiProperties"}, "enable_analytical_storage": {"key": "properties.enableAnalyticalStorage", "type": "bool"}, "analytical_storage_configuration": { "key": "properties.analyticalStorageConfiguration", "type": "AnalyticalStorageConfiguration", }, "backup_policy": {"key": "properties.backupPolicy", "type": "BackupPolicy"}, "cors": {"key": "properties.cors", "type": "[CorsPolicy]"}, "network_acl_bypass": {"key": "properties.networkAclBypass", "type": "str"}, "network_acl_bypass_resource_ids": {"key": "properties.networkAclBypassResourceIds", "type": "[str]"}, "diagnostic_log_settings": {"key": "properties.diagnosticLogSettings", "type": "DiagnosticLogSettings"}, "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, "capacity": {"key": "properties.capacity", "type": "Capacity"}, "capacity_mode": {"key": "properties.capacityMode", "type": "str"}, "enable_materialized_views": {"key": "properties.enableMaterializedViews", "type": "bool"}, "keys_metadata": {"key": "properties.keysMetadata", "type": "DatabaseAccountKeysMetadata"}, "enable_partition_merge": {"key": "properties.enablePartitionMerge", "type": "bool"}, "enable_burst_capacity": {"key": "properties.enableBurstCapacity", "type": "bool"}, "minimal_tls_version": {"key": "properties.minimalTlsVersion", "type": "str"}, "customer_managed_key_status": {"key": "properties.customerManagedKeyStatus", "type": "str"}, "enable_priority_based_execution": {"key": "properties.enablePriorityBasedExecution", "type": "bool"}, "default_priority_level": {"key": "properties.defaultPriorityLevel", "type": "str"}, "enable_per_region_per_partition_autoscale": { "key": "properties.enablePerRegionPerPartitionAutoscale", "type": "bool", }, } def __init__( # pylint: disable=too-many-locals self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, consistency_policy: Optional["_models.ConsistencyPolicy"] = None, locations: Optional[List["_models.Location"]] = None, ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, capabilities: Optional[List["_models.Capability"]] = None, virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, backup_policy: Optional["_models.BackupPolicy"] = None, cors: Optional[List["_models.CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, capacity: Optional["_models.Capacity"] = None, capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None, enable_materialized_views: Optional[bool] = None, enable_partition_merge: Optional[bool] = None, enable_burst_capacity: Optional[bool] = None, minimal_tls_version: Optional[Union[str, "_models.MinimalTlsVersion"]] = None, customer_managed_key_status: Optional[str] = None, enable_priority_based_execution: Optional[bool] = None, default_priority_level: Optional[Union[str, "_models.DefaultPriorityLevel"]] = None, enable_per_region_per_partition_autoscale: Optional[bool] = None, **kwargs: Any ) -> None: """ :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword consistency_policy: The consistency policy for the Cosmos DB account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :keyword locations: An array that contains the georeplication locations enabled for the Cosmos DB account. :paramtype locations: list[~azure.mgmt.cosmosdb.models.Location] :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :keyword is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :paramtype is_virtual_network_filter_enabled: bool :keyword enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :paramtype enable_automatic_failover: bool :keyword capabilities: List of Cosmos DB capabilities for the account. :paramtype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :keyword virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :paramtype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :keyword enable_multiple_write_locations: Enables the account to write in multiple locations. :paramtype enable_multiple_write_locations: bool :keyword enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :paramtype disable_key_based_metadata_write_access: bool :keyword key_vault_key_uri: The URI of the key vault. :paramtype key_vault_key_uri: str :keyword default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str :keyword public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool :keyword api_properties: API specific properties. Currently, supported only for MongoDB API. :paramtype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :keyword enable_analytical_storage: Flag to indicate whether to enable storage analytics. :paramtype enable_analytical_storage: bool :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :paramtype network_acl_bypass_resource_ids: list[str] :keyword diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :paramtype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :keyword disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :paramtype disable_local_auth: bool :keyword capacity: The object that represents all properties related to capacity enforcement on an account. :paramtype capacity: ~azure.mgmt.cosmosdb.models.Capacity :keyword capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :paramtype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :paramtype enable_partition_merge: bool :keyword enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :paramtype enable_burst_capacity: bool :keyword minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :paramtype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :keyword customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :paramtype customer_managed_key_status: str :keyword enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :paramtype enable_priority_based_execution: bool :keyword default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :paramtype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :keyword enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :paramtype enable_per_region_per_partition_autoscale: bool """ super().__init__(**kwargs) self.tags = tags self.location = location self.identity = identity self.consistency_policy = consistency_policy self.locations = locations self.ip_rules = ip_rules self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover self.capabilities = capabilities self.virtual_network_rules = virtual_network_rules self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri self.default_identity = default_identity self.public_network_access = public_network_access self.enable_free_tier = enable_free_tier self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage self.analytical_storage_configuration = analytical_storage_configuration self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth self.capacity = capacity self.capacity_mode = capacity_mode self.enable_materialized_views = enable_materialized_views self.keys_metadata = None self.enable_partition_merge = enable_partition_merge self.enable_burst_capacity = enable_burst_capacity self.minimal_tls_version = minimal_tls_version self.customer_managed_key_status = customer_managed_key_status self.enable_priority_based_execution = enable_priority_based_execution self.default_priority_level = default_priority_level self.enable_per_region_per_partition_autoscale = enable_per_region_per_partition_autoscale
class DatabaseAccountUpdateParameters(_serialization.Model): '''Parameters for patching Azure Cosmos DB database account properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :vartype tags: dict[str, str] :ivar location: The location of the resource group to which the resource belongs. :vartype location: str :ivar identity: Identity for the resource. :vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar consistency_policy: The consistency policy for the Cosmos DB account. :vartype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :ivar locations: An array that contains the georeplication locations enabled for the Cosmos DB account. :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] :ivar ip_rules: List of IpRules. :vartype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :ivar is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :vartype is_virtual_network_filter_enabled: bool :ivar enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :vartype enable_automatic_failover: bool :ivar capabilities: List of Cosmos DB capabilities for the account. :vartype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :ivar virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :vartype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :ivar enable_multiple_write_locations: Enables the account to write in multiple locations. :vartype enable_multiple_write_locations: bool :ivar enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :vartype enable_cassandra_connector: bool :ivar connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :vartype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :ivar disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :vartype disable_key_based_metadata_write_access: bool :ivar key_vault_key_uri: The URI of the key vault. :vartype key_vault_key_uri: str :ivar default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :vartype default_identity: str :ivar public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :ivar enable_free_tier: Flag to indicate whether Free Tier is enabled. :vartype enable_free_tier: bool :ivar api_properties: API specific properties. Currently, supported only for MongoDB API. :vartype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :ivar enable_analytical_storage: Flag to indicate whether to enable storage analytics. :vartype enable_analytical_storage: bool :ivar analytical_storage_configuration: Analytical storage specific properties. :vartype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :ivar backup_policy: The object representing the policy for taking backups on an account. :vartype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :ivar cors: The CORS policy for the Cosmos DB database account. :vartype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :ivar network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :vartype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :ivar network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :vartype network_acl_bypass_resource_ids: list[str] :ivar diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :vartype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :ivar disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :vartype disable_local_auth: bool :ivar capacity: The object that represents all properties related to capacity enforcement on an account. :vartype capacity: ~azure.mgmt.cosmosdb.models.Capacity :ivar capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :vartype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :ivar enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :vartype enable_materialized_views: bool :ivar keys_metadata: This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. :vartype keys_metadata: ~azure.mgmt.cosmosdb.models.DatabaseAccountKeysMetadata :ivar enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :vartype enable_partition_merge: bool :ivar enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :vartype enable_burst_capacity: bool :ivar minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :vartype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :ivar customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :vartype customer_managed_key_status: str :ivar enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :vartype enable_priority_based_execution: bool :ivar default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :vartype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :ivar enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :vartype enable_per_region_per_partition_autoscale: bool ''' def __init__( # pylint: disable=too-many-locals self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, consistency_policy: Optional["_models.ConsistencyPolicy"] = None, locations: Optional[List["_models.Location"]] = None, ip_rules: Optional[List["_models.IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, capabilities: Optional[List["_models.Capability"]] = None, virtual_network_rules: Optional[List["_models.VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, enable_cassandra_connector: Optional[bool] = None, connector_offer: Optional[Union[str, "_models.ConnectorOffer"]] = None, disable_key_based_metadata_write_access: Optional[bool] = None, key_vault_key_uri: Optional[str] = None, default_identity: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, enable_free_tier: Optional[bool] = None, api_properties: Optional["_models.ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["_models.AnalyticalStorageConfiguration"] = None, backup_policy: Optional["_models.BackupPolicy"] = None, cors: Optional[List["_models.CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "_models.NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["_models.DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, capacity: Optional["_models.Capacity"] = None, capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None, enable_materialized_views: Optional[bool] = None, enable_partition_merge: Optional[bool] = None, enable_burst_capacity: Optional[bool] = None, minimal_tls_version: Optional[Union[str, "_models.MinimalTlsVersion"]] = None, customer_managed_key_status: Optional[str] = None, enable_priority_based_execution: Optional[bool] = None, default_priority_level: Optional[Union[str, "_models.DefaultPriorityLevel"]] = None, enable_per_region_per_partition_autoscale: Optional[bool] = None, **kwargs: Any ) -> None: ''' :keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :paramtype tags: dict[str, str] :keyword location: The location of the resource group to which the resource belongs. :paramtype location: str :keyword identity: Identity for the resource. :paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :keyword consistency_policy: The consistency policy for the Cosmos DB account. :paramtype consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :keyword locations: An array that contains the georeplication locations enabled for the Cosmos DB account. :paramtype locations: list[~azure.mgmt.cosmosdb.models.Location] :keyword ip_rules: List of IpRules. :paramtype ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :keyword is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual Network ACL rules. :paramtype is_virtual_network_filter_enabled: bool :keyword enable_automatic_failover: Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :paramtype enable_automatic_failover: bool :keyword capabilities: List of Cosmos DB capabilities for the account. :paramtype capabilities: list[~azure.mgmt.cosmosdb.models.Capability] :keyword virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :paramtype virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] :keyword enable_multiple_write_locations: Enables the account to write in multiple locations. :paramtype enable_multiple_write_locations: bool :keyword enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. :paramtype enable_cassandra_connector: bool :keyword connector_offer: The cassandra connector offer type for the Cosmos DB database C* account. "Small" :paramtype connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer :keyword disable_key_based_metadata_write_access: Disable write operations on metadata resources (databases, containers, throughput) via account keys. :paramtype disable_key_based_metadata_write_access: bool :keyword key_vault_key_uri: The URI of the key vault. :paramtype key_vault_key_uri: str :keyword default_identity: The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. :paramtype default_identity: str :keyword public_network_access: Whether requests from Public Network are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :keyword enable_free_tier: Flag to indicate whether Free Tier is enabled. :paramtype enable_free_tier: bool :keyword api_properties: API specific properties. Currently, supported only for MongoDB API. :paramtype api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :keyword enable_analytical_storage: Flag to indicate whether to enable storage analytics. :paramtype enable_analytical_storage: bool :keyword analytical_storage_configuration: Analytical storage specific properties. :paramtype analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration :keyword backup_policy: The object representing the policy for taking backups on an account. :paramtype backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :keyword cors: The CORS policy for the Cosmos DB database account. :paramtype cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] :keyword network_acl_bypass: Indicates what services are allowed to bypass firewall checks. Known values are: "None" and "AzureServices". :paramtype network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass :keyword network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :paramtype network_acl_bypass_resource_ids: list[str] :keyword diagnostic_log_settings: The Object representing the different Diagnostic log settings for the Cosmos DB Account. :paramtype diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :keyword disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :paramtype disable_local_auth: bool :keyword capacity: The object that represents all properties related to capacity enforcement on an account. :paramtype capacity: ~azure.mgmt.cosmosdb.models.Capacity :keyword capacity_mode: Indicates the capacityMode of the Cosmos DB account. Known values are: "None", "Provisioned", and "Serverless". :paramtype capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode :keyword enable_materialized_views: Flag to indicate whether to enable MaterializedViews on the Cosmos DB account. :paramtype enable_materialized_views: bool :keyword enable_partition_merge: Flag to indicate enabling/disabling of Partition Merge feature on the account. :paramtype enable_partition_merge: bool :keyword enable_burst_capacity: Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account. :paramtype enable_burst_capacity: bool :keyword minimal_tls_version: Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. Known values are: "Tls", "Tls11", and "Tls12". :paramtype minimal_tls_version: str or ~azure.mgmt.cosmosdb.models.MinimalTlsVersion :keyword customer_managed_key_status: Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. :paramtype customer_managed_key_status: str :keyword enable_priority_based_execution: Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account. :paramtype enable_priority_based_execution: bool :keyword default_priority_level: Enum to indicate default Priority Level of request for Priority Based Execution. Known values are: "High" and "Low". :paramtype default_priority_level: str or ~azure.mgmt.cosmosdb.models.DefaultPriorityLevel :keyword enable_per_region_per_partition_autoscale: Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account. :paramtype enable_per_region_per_partition_autoscale: bool ''' pass
2
2
190
0
81
110
1
1.66
1
4
0
0
1
38
1
16
360
5
134
83
91
222
43
42
41
1
2
0
1
9,575
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseAccountsListResult
class DatabaseAccountsListResult(_serialization.Model): """The List operation response, that contains the database accounts and their properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of database account and their properties. :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] """ _validation = { "value": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[DatabaseAccountGetResults]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None
class DatabaseAccountsListResult(_serialization.Model): '''The List operation response, that contains the database accounts and their properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of database account and their properties. :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.6
1
2
0
0
1
1
1
16
21
5
10
5
8
6
6
5
4
1
2
0
1
9,576
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DatabaseRestoreResource
class DatabaseRestoreResource(_serialization.Model): """Specific Databases to restore. :ivar database_name: The name of the database available for restore. :vartype database_name: str :ivar collection_names: The names of the collections available for restore. :vartype collection_names: list[str] """ _attribute_map = { "database_name": {"key": "databaseName", "type": "str"}, "collection_names": {"key": "collectionNames", "type": "[str]"}, } def __init__( self, *, database_name: Optional[str] = None, collection_names: Optional[List[str]] = None, **kwargs: Any ) -> None: """ :keyword database_name: The name of the database available for restore. :paramtype database_name: str :keyword collection_names: The names of the collections available for restore. :paramtype collection_names: list[str] """ super().__init__(**kwargs) self.database_name = database_name self.collection_names = collection_names
class DatabaseRestoreResource(_serialization.Model): '''Specific Databases to restore. :ivar database_name: The name of the database available for restore. :vartype database_name: str :ivar collection_names: The names of the collections available for restore. :vartype collection_names: list[str] ''' def __init__( self, *, database_name: Optional[str] = None, collection_names: Optional[List[str]] = None, **kwargs: Any ) -> None: ''' :keyword database_name: The name of the database available for restore. :paramtype database_name: str :keyword collection_names: The names of the collections available for restore. :paramtype collection_names: list[str] ''' pass
2
2
12
0
6
6
1
1.09
1
3
0
0
1
2
1
16
26
3
11
7
7
12
6
5
4
1
2
0
1
9,577
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DiagnosticLogSettings
class DiagnosticLogSettings(_serialization.Model): """Indicates what diagnostic log settings are to be enabled. :ivar enable_full_text_query: Describe the level of detail with which queries are to be logged. Known values are: "None", "True", and "False". :vartype enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery """ _attribute_map = { "enable_full_text_query": {"key": "enableFullTextQuery", "type": "str"}, } def __init__( self, *, enable_full_text_query: Optional[Union[str, "_models.EnableFullTextQuery"]] = None, **kwargs: Any ) -> None: """ :keyword enable_full_text_query: Describe the level of detail with which queries are to be logged. Known values are: "None", "True", and "False". :paramtype enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery """ super().__init__(**kwargs) self.enable_full_text_query = enable_full_text_query
class DiagnosticLogSettings(_serialization.Model): '''Indicates what diagnostic log settings are to be enabled. :ivar enable_full_text_query: Describe the level of detail with which queries are to be logged. Known values are: "None", "True", and "False". :vartype enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery ''' def __init__( self, *, enable_full_text_query: Optional[Union[str, "_models.EnableFullTextQuery"]] = None, **kwargs: Any ) -> None: ''' :keyword enable_full_text_query: Describe the level of detail with which queries are to be logged. Known values are: "None", "True", and "False". :paramtype enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery ''' pass
2
2
10
0
5
5
1
1.11
1
3
0
0
1
1
1
16
22
3
9
6
5
10
5
4
3
1
2
0
1
9,578
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ErrorDetail
class ErrorDetail(_serialization.Model): """The error detail. Variables are only populated by the server, and will be ignored when sending a request. :ivar code: The error code. :vartype code: str :ivar message: The error message. :vartype message: str :ivar target: The error target. :vartype target: str :ivar details: The error details. :vartype details: list[~azure.mgmt.cosmosdb.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.cosmosdb.models.ErrorAdditionalInfo] """ _validation = { "code": {"readonly": True}, "message": {"readonly": True}, "target": {"readonly": True}, "details": {"readonly": True}, "additional_info": {"readonly": True}, } _attribute_map = { "code": {"key": "code", "type": "str"}, "message": {"key": "message", "type": "str"}, "target": {"key": "target", "type": "str"}, "details": {"key": "details", "type": "[ErrorDetail]"}, "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None self.message = None self.target = None self.details = None self.additional_info = None
class ErrorDetail(_serialization.Model): '''The error detail. Variables are only populated by the server, and will be ignored when sending a request. :ivar code: The error code. :vartype code: str :ivar message: The error message. :vartype message: str :ivar target: The error target. :vartype target: str :ivar details: The error details. :vartype details: list[~azure.mgmt.cosmosdb.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~azure.mgmt.cosmosdb.models.ErrorAdditionalInfo] ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
8
0
7
1
1
0.64
1
2
0
0
1
5
1
16
41
5
22
9
20
14
10
9
8
1
2
0
1
9,579
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferJobProperties
class DataTransferJobProperties(_serialization.Model): """The properties of a DataTransfer Job. 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 server. :ivar job_name: Job Name. :vartype job_name: str :ivar source: Source DataStore details. Required. :vartype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar destination: Destination DataStore details. Required. :vartype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar status: Job Status. :vartype status: str :ivar processed_count: Processed Count. :vartype processed_count: int :ivar total_count: Total Count. :vartype total_count: int :ivar last_updated_utc_time: Last Updated Time (ISO-8601 format). :vartype last_updated_utc_time: ~datetime.datetime :ivar worker_count: Worker count. :vartype worker_count: int :ivar error: Error response for Faulted job. :vartype error: ~azure.mgmt.cosmosdb.models.ErrorResponseAutoGenerated :ivar duration: Total Duration of Job. :vartype duration: str :ivar mode: Mode of job execution. Known values are: "Offline" and "Online". :vartype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode """ _validation = { "job_name": {"readonly": True}, "source": {"required": True}, "destination": {"required": True}, "status": {"readonly": True}, "processed_count": {"readonly": True}, "total_count": {"readonly": True}, "last_updated_utc_time": {"readonly": True}, "worker_count": {"minimum": 0}, "error": {"readonly": True}, "duration": {"readonly": True}, } _attribute_map = { "job_name": {"key": "jobName", "type": "str"}, "source": {"key": "source", "type": "DataTransferDataSourceSink"}, "destination": {"key": "destination", "type": "DataTransferDataSourceSink"}, "status": {"key": "status", "type": "str"}, "processed_count": {"key": "processedCount", "type": "int"}, "total_count": {"key": "totalCount", "type": "int"}, "last_updated_utc_time": {"key": "lastUpdatedUtcTime", "type": "iso-8601"}, "worker_count": {"key": "workerCount", "type": "int"}, "error": {"key": "error", "type": "ErrorResponseAutoGenerated"}, "duration": {"key": "duration", "type": "str"}, "mode": {"key": "mode", "type": "str"}, } def __init__( self, *, source: "_models.DataTransferDataSourceSink", destination: "_models.DataTransferDataSourceSink", worker_count: Optional[int] = None, mode: Optional[Union[str, "_models.DataTransferJobMode"]] = None, **kwargs: Any ) -> None: """ :keyword source: Source DataStore details. Required. :paramtype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword destination: Destination DataStore details. Required. :paramtype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword worker_count: Worker count. :paramtype worker_count: int :keyword mode: Mode of job execution. Known values are: "Offline" and "Online". :paramtype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode """ super().__init__(**kwargs) self.job_name = None self.source = source self.destination = destination self.status = None self.processed_count = None self.total_count = None self.last_updated_utc_time = None self.worker_count = worker_count self.error = None self.duration = None self.mode = mode
class DataTransferJobProperties(_serialization.Model): '''The properties of a DataTransfer Job. 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 server. :ivar job_name: Job Name. :vartype job_name: str :ivar source: Source DataStore details. Required. :vartype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar destination: Destination DataStore details. Required. :vartype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar status: Job Status. :vartype status: str :ivar processed_count: Processed Count. :vartype processed_count: int :ivar total_count: Total Count. :vartype total_count: int :ivar last_updated_utc_time: Last Updated Time (ISO-8601 format). :vartype last_updated_utc_time: ~datetime.datetime :ivar worker_count: Worker count. :vartype worker_count: int :ivar error: Error response for Faulted job. :vartype error: ~azure.mgmt.cosmosdb.models.ErrorResponseAutoGenerated :ivar duration: Total Duration of Job. :vartype duration: str :ivar mode: Mode of job execution. Known values are: "Offline" and "Online". :vartype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode ''' def __init__( self, *, source: "_models.DataTransferDataSourceSink", destination: "_models.DataTransferDataSourceSink", worker_count: Optional[int] = None, mode: Optional[Union[str, "_models.DataTransferJobMode"]] = None, **kwargs: Any ) -> None: ''' :keyword source: Source DataStore details. Required. :paramtype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword destination: Destination DataStore details. Required. :paramtype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword worker_count: Worker count. :paramtype worker_count: int :keyword mode: Mode of job execution. Known values are: "Offline" and "Online". :paramtype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode ''' pass
2
2
31
0
21
10
1
0.77
1
4
0
0
1
11
1
16
89
6
47
23
37
36
16
15
14
1
2
0
1
9,580
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ErrorResponse
class ErrorResponse(_serialization.Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.cosmosdb.models.ErrorDetail """ _attribute_map = { "error": {"key": "error", "type": "ErrorDetail"}, } def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.cosmosdb.models.ErrorDetail """ super().__init__(**kwargs) self.error = error
class ErrorResponse(_serialization.Model): '''Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.cosmosdb.models.ErrorDetail ''' def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: ''' :keyword error: The error object. :paramtype error: ~azure.mgmt.cosmosdb.models.ErrorDetail ''' pass
2
2
7
0
3
4
1
1.29
1
2
0
0
1
1
1
16
19
3
7
4
5
9
5
4
3
1
2
0
1
9,581
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferJobGetResults
class DataTransferJobGetResults(ARMProxyResource): """A Cosmos DB Data Transfer Job. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the database account. :vartype id: str :ivar name: The name of the database account. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar job_name: Job Name. :vartype job_name: str :ivar source: Source DataStore details. :vartype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar destination: Destination DataStore details. :vartype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar status: Job Status. :vartype status: str :ivar processed_count: Processed Count. :vartype processed_count: int :ivar total_count: Total Count. :vartype total_count: int :ivar last_updated_utc_time: Last Updated Time (ISO-8601 format). :vartype last_updated_utc_time: ~datetime.datetime :ivar worker_count: Worker count. :vartype worker_count: int :ivar error: Error response for Faulted job. :vartype error: ~azure.mgmt.cosmosdb.models.ErrorResponseAutoGenerated :ivar duration: Total Duration of Job. :vartype duration: str :ivar mode: Mode of job execution. Known values are: "Offline" and "Online". :vartype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "job_name": {"readonly": True}, "status": {"readonly": True}, "processed_count": {"readonly": True}, "total_count": {"readonly": True}, "last_updated_utc_time": {"readonly": True}, "worker_count": {"minimum": 0}, "error": {"readonly": True}, "duration": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "job_name": {"key": "properties.jobName", "type": "str"}, "source": {"key": "properties.source", "type": "DataTransferDataSourceSink"}, "destination": {"key": "properties.destination", "type": "DataTransferDataSourceSink"}, "status": {"key": "properties.status", "type": "str"}, "processed_count": {"key": "properties.processedCount", "type": "int"}, "total_count": {"key": "properties.totalCount", "type": "int"}, "last_updated_utc_time": {"key": "properties.lastUpdatedUtcTime", "type": "iso-8601"}, "worker_count": {"key": "properties.workerCount", "type": "int"}, "error": {"key": "properties.error", "type": "ErrorResponseAutoGenerated"}, "duration": {"key": "properties.duration", "type": "str"}, "mode": {"key": "properties.mode", "type": "str"}, } def __init__( self, *, source: Optional["_models.DataTransferDataSourceSink"] = None, destination: Optional["_models.DataTransferDataSourceSink"] = None, worker_count: Optional[int] = None, mode: Optional[Union[str, "_models.DataTransferJobMode"]] = None, **kwargs: Any ) -> None: """ :keyword source: Source DataStore details. :paramtype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword destination: Destination DataStore details. :paramtype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword worker_count: Worker count. :paramtype worker_count: int :keyword mode: Mode of job execution. Known values are: "Offline" and "Online". :paramtype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode """ super().__init__(**kwargs) self.job_name = None self.source = source self.destination = destination self.status = None self.processed_count = None self.total_count = None self.last_updated_utc_time = None self.worker_count = worker_count self.error = None self.duration = None self.mode = mode
class DataTransferJobGetResults(ARMProxyResource): '''A Cosmos DB Data Transfer Job. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the database account. :vartype id: str :ivar name: The name of the database account. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar job_name: Job Name. :vartype job_name: str :ivar source: Source DataStore details. :vartype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar destination: Destination DataStore details. :vartype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :ivar status: Job Status. :vartype status: str :ivar processed_count: Processed Count. :vartype processed_count: int :ivar total_count: Total Count. :vartype total_count: int :ivar last_updated_utc_time: Last Updated Time (ISO-8601 format). :vartype last_updated_utc_time: ~datetime.datetime :ivar worker_count: Worker count. :vartype worker_count: int :ivar error: Error response for Faulted job. :vartype error: ~azure.mgmt.cosmosdb.models.ErrorResponseAutoGenerated :ivar duration: Total Duration of Job. :vartype duration: str :ivar mode: Mode of job execution. Known values are: "Offline" and "Online". :vartype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode ''' def __init__( self, *, source: Optional["_models.DataTransferDataSourceSink"] = None, destination: Optional["_models.DataTransferDataSourceSink"] = None, worker_count: Optional[int] = None, mode: Optional[Union[str, "_models.DataTransferJobMode"]] = None, **kwargs: Any ) -> None: ''' :keyword source: Source DataStore details. :paramtype source: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword destination: Destination DataStore details. :paramtype destination: ~azure.mgmt.cosmosdb.models.DataTransferDataSourceSink :keyword worker_count: Worker count. :paramtype worker_count: int :keyword mode: Mode of job execution. Known values are: "Offline" and "Online". :paramtype mode: str or ~azure.mgmt.cosmosdb.models.DataTransferJobMode ''' pass
2
2
31
0
21
10
1
0.8
1
4
0
0
1
11
1
17
97
5
51
23
41
41
16
15
14
1
3
0
1
9,582
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferDataSourceSink
class DataTransferDataSourceSink(_serialization.Model): """Base class for all DataTransfer source/sink. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobDataTransferDataSourceSink, BaseCosmosDataTransferDataSourceSink, CosmosMongoVCoreDataTransferDataSourceSink All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent """ _validation = { "component": {"required": True}, } _attribute_map = { "component": {"key": "component", "type": "str"}, } _subtype_map = { "component": { "AzureBlobStorage": "AzureBlobDataTransferDataSourceSink", "BaseCosmosDataTransferDataSourceSink": "BaseCosmosDataTransferDataSourceSink", "CosmosDBMongoVCore": "CosmosMongoVCoreDataTransferDataSourceSink", } } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.component: Optional[str] = None
class DataTransferDataSourceSink(_serialization.Model): '''Base class for all DataTransfer source/sink. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobDataTransferDataSourceSink, BaseCosmosDataTransferDataSourceSink, CosmosMongoVCoreDataTransferDataSourceSink All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.59
1
3
0
3
1
1
1
16
34
7
17
6
15
10
7
6
5
1
2
0
1
9,583
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2024_05_01_preview/aio/operations/_eureka_servers_operations.py
azext_spring.vendored_sdks.appplatform.v2024_05_01_preview.aio.operations._eureka_servers_operations.EurekaServersOperations
class EurekaServersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`eureka_servers` attribute. """ models = _models def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async async def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> _models.EurekaServerResourceCollection: """List the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: EurekaServerResourceCollection or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.EurekaServerResourceCollection] = kwargs.pop("cls", None) _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("EurekaServerResourceCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace_async async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.EurekaServerResource: """Get the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: EurekaServerResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("EurekaServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _update_put_initial( self, resource_group_name: str, service_name: str, eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]], **kwargs: Any ) -> _models.EurekaServerResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(eureka_server_resource, (IOBase, bytes)): _content = eureka_server_resource else: _json = self._serialize.body(eureka_server_resource, "EurekaServerResource") _request = build_update_put_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 200: deserialized = self._deserialize("EurekaServerResource", pipeline_response) if response.status_code == 201: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = self._deserialize("EurekaServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload async def begin_update_put( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: """Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_update_put( self, resource_group_name: str, service_name: str, eureka_server_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: """Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_update_put( self, resource_group_name: str, service_name: str, eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: """Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Is either a EurekaServerResource type or a IO[bytes] type. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._update_put_initial( resource_group_name=resource_group_name, service_name=service_name, eureka_server_resource=eureka_server_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("EurekaServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.EurekaServerResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.EurekaServerResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _update_patch_initial( self, resource_group_name: str, service_name: str, eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]], **kwargs: Any ) -> _models.EurekaServerResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(eureka_server_resource, (IOBase, bytes)): _content = eureka_server_resource else: _json = self._serialize.body(eureka_server_resource, "EurekaServerResource") _request = build_update_patch_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 200: deserialized = self._deserialize("EurekaServerResource", pipeline_response) if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = self._deserialize("EurekaServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload async def begin_update_patch( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: """Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_update_patch( self, resource_group_name: str, service_name: str, eureka_server_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: """Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_update_patch( self, resource_group_name: str, service_name: str, eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: """Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Is either a EurekaServerResource type or a IO[bytes] type. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._update_patch_initial( resource_group_name=resource_group_name, service_name=service_name, eureka_server_resource=eureka_server_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("EurekaServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.EurekaServerResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.EurekaServerResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class EurekaServersOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`eureka_servers` attribute. ''' def __init__(self, *args, **kwargs) -> None: pass @distributed_trace_async async def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> _models.EurekaServerResourceCollection: '''List the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: EurekaServerResourceCollection or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResourceCollection :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.EurekaServerResource: '''Get the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: EurekaServerResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _update_put_initial( self, resource_group_name: str, service_name: str, eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]], **kwargs: Any ) -> _models.EurekaServerResource: pass @overload async def begin_update_put( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: '''Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_update_put( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: '''Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_update_put( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: '''Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Is either a EurekaServerResource type or a IO[bytes] type. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _update_patch_initial( self, resource_group_name: str, service_name: str, eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]], **kwargs: Any ) -> _models.EurekaServerResource: pass @overload async def begin_update_patch( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: '''Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_update_patch( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: '''Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Required. :type eureka_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_update_patch( self, resource_group_name: str, service_name: str, eureka_server_resource: _models.EurekaServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.EurekaServerResource]: '''Update the eureka server settings. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param eureka_server_resource: Parameters for the update operation. Is either a EurekaServerResource type or a IO[bytes] type. Required. :type eureka_server_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.EurekaServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
22
9
41
4
27
11
3
0.41
0
7
0
0
11
5
11
11
548
69
350
157
270
145
165
91
151
6
0
1
42
9,584
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2024_05_01_preview/aio/operations/_dev_tool_portals_operations.py
azext_spring.vendored_sdks.appplatform.v2024_05_01_preview.aio.operations._dev_tool_portals_operations.DevToolPortalsOperations
class DevToolPortalsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`dev_tool_portals` attribute. """ models = _models def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> AsyncIterable["_models.DevToolPortalResource"]: """Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.DevToolPortalResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request async def extract_data(pipeline_response): deserialized = self._deserialize("DevToolPortalResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any ) -> _models.DevToolPortalResource: """Get the Application Live and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :return: DevToolPortalResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.DevToolPortalResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, dev_tool_portal_name=dev_tool_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("DevToolPortalResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _create_or_update_initial( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: Union[_models.DevToolPortalResource, IO[bytes]], **kwargs: Any ) -> _models.DevToolPortalResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DevToolPortalResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(dev_tool_portal_resource, (IOBase, bytes)): _content = dev_tool_portal_resource else: _json = self._serialize.body(dev_tool_portal_resource, "DevToolPortalResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, dev_tool_portal_name=dev_tool_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("DevToolPortalResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("DevToolPortalResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: _models.DevToolPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DevToolPortalResource]: """Create the default Dev Tool Portal or update the existing Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :param dev_tool_portal_resource: Parameters for the create or update operation. Required. :type dev_tool_portal_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DevToolPortalResource]: """Create the default Dev Tool Portal or update the existing Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :param dev_tool_portal_resource: Parameters for the create or update operation. Required. :type dev_tool_portal_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: Union[_models.DevToolPortalResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.DevToolPortalResource]: """Create the default Dev Tool Portal or update the existing Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :param dev_tool_portal_resource: Parameters for the create or update operation. Is either a DevToolPortalResource type or a IO[bytes] type. Required. :type dev_tool_portal_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DevToolPortalResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, dev_tool_portal_name=dev_tool_portal_name, dev_tool_portal_resource=dev_tool_portal_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("DevToolPortalResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.DevToolPortalResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.DevToolPortalResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, dev_tool_portal_name=dev_tool_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Disable the default Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, dev_tool_portal_name=dev_tool_portal_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method)
class DevToolPortalsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`dev_tool_portals` attribute. ''' def __init__(self, *args, **kwargs) -> None: pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> AsyncIterable["_models.DevToolPortalResource"]: '''Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass async def extract_data(pipeline_response): pass async def get_next(next_link=None): pass @distributed_trace_async async def get_next(next_link=None): '''Get the Application Live and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :return: DevToolPortalResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _create_or_update_initial( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: Union[_models.DevToolPortalResource, IO[bytes]], **kwargs: Any ) -> _models.DevToolPortalResource: pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: _models.DevToolPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DevToolPortalResource]: '''Create the default Dev Tool Portal or update the existing Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :param dev_tool_portal_resource: Parameters for the create or update operation. Required. :type dev_tool_portal_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: _models.DevToolPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DevToolPortalResource]: '''Create the default Dev Tool Portal or update the existing Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :param dev_tool_portal_resource: Parameters for the create or update operation. Required. :type dev_tool_portal_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, dev_tool_portal_resource: _models.DevToolPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DevToolPortalResource]: '''Create the default Dev Tool Portal or update the existing Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :param dev_tool_portal_resource: Parameters for the create or update operation. Is either a DevToolPortalResource type or a IO[bytes] type. Required. :type dev_tool_portal_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either DevToolPortalResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DevToolPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Disable the default Dev Tool Portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param dev_tool_portal_name: The name of Dev Tool Portal. Required. :type dev_tool_portal_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
21
7
37
4
27
8
3
0.36
0
7
0
0
9
5
9
9
491
62
328
135
267
118
163
89
148
6
0
1
42
9,585
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2024_05_01_preview/aio/operations/_deployments_operations.py
azext_spring.vendored_sdks.appplatform.v2024_05_01_preview.aio.operations._deployments_operations.DeploymentsOperations
class DeploymentsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`deployments` attribute. """ models = _models def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentResource: """Get a Deployment and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: DeploymentResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.DeploymentResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("DeploymentResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: Union[_models.DeploymentResource, IO[bytes]], **kwargs: Any ) -> _models.DeploymentResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(deployment_resource, (IOBase, bytes)): _content = deployment_resource else: _json = self._serialize.body(deployment_resource, "DeploymentResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("DeploymentResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("DeploymentResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("DeploymentResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: """Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the create or update operation. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: """Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the create or update operation. Required. :type deployment_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: Union[_models.DeploymentResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: """Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the create or update operation. Is either a DeploymentResource type or a IO[bytes] type. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, deployment_resource=deployment_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("DeploymentResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.DeploymentResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.DeploymentResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Operation to delete a Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: Union[_models.DeploymentResource, IO[bytes]], **kwargs: Any ) -> _models.DeploymentResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(deployment_resource, (IOBase, bytes)): _content = deployment_resource else: _json = self._serialize.body(deployment_resource, "DeploymentResource") _request = build_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("DeploymentResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("DeploymentResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: """Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the update operation. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: """Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the update operation. Required. :type deployment_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: Union[_models.DeploymentResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: """Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the update operation. Is either a DeploymentResource type or a IO[bytes] type. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, deployment_resource=deployment_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("DeploymentResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.DeploymentResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.DeploymentResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @distributed_trace def list( self, resource_group_name: str, service_name: str, app_name: str, version: Optional[List[str]] = None, expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.DeploymentResource"]: """Handles requests to list all resources in an App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param version: Version of the deployments to be listed. Default value is None. :type version: list[str] :param expand: The expand expression to apply on the operation. Default value is None. :type expand: str :return: An iterator like instance of either DeploymentResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.DeploymentResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, version=version, expand=expand, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request async def extract_data(pipeline_response): deserialized = self._deserialize("DeploymentResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) @distributed_trace def list_for_cluster( self, resource_group_name: str, service_name: str, version: Optional[List[str]] = None, expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.DeploymentResource"]: """List deployments for a certain service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param version: Version of the deployments to be listed. Default value is None. :type version: list[str] :param expand: The expand expression to apply on the operation. Default value is None. :type expand: str :return: An iterator like instance of either DeploymentResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.DeploymentResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_for_cluster_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, version=version, expand=expand, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request async def extract_data(pipeline_response): deserialized = self._deserialize("DeploymentResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_start_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def begin_start( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Start the deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._start_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _stop_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_stop_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def begin_stop( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Stop the deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._stop_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_restart_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def begin_restart( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Restart the deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._restart_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _enable_remote_debugging_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[Union[_models.RemoteDebuggingPayload, IO[bytes]]] = None, **kwargs: Any ) -> _models.RemoteDebugging: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RemoteDebugging] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(remote_debugging_payload, (IOBase, bytes)): _content = remote_debugging_payload else: if remote_debugging_payload is not None: _json = self._serialize.body(remote_debugging_payload, "RemoteDebuggingPayload") else: _json = None _request = build_enable_remote_debugging_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("RemoteDebugging", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("RemoteDebugging", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_enable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[_models.RemoteDebuggingPayload] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: """Enable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param remote_debugging_payload: Parameters for enable remote debugging. Default value is None. :type remote_debugging_payload: ~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebuggingPayload :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_enable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: """Enable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param remote_debugging_payload: Parameters for enable remote debugging. Default value is None. :type remote_debugging_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_enable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[Union[_models.RemoteDebuggingPayload, IO[bytes]]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: """Enable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param remote_debugging_payload: Parameters for enable remote debugging. Is either a RemoteDebuggingPayload type or a IO[bytes] type. Default value is None. :type remote_debugging_payload: ~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebuggingPayload or IO[bytes] :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RemoteDebugging] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._enable_remote_debugging_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, remote_debugging_payload=remote_debugging_payload, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("RemoteDebugging", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.RemoteDebugging].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.RemoteDebugging]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _disable_remote_debugging_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> _models.RemoteDebugging: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.RemoteDebugging] = kwargs.pop("cls", None) _request = build_disable_remote_debugging_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("RemoteDebugging", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("RemoteDebugging", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace_async async def begin_disable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: """Disable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.RemoteDebugging] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._disable_remote_debugging_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("RemoteDebugging", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.RemoteDebugging].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.RemoteDebugging]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @distributed_trace_async async def get_remote_debugging_config( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> _models.RemoteDebugging: """Get remote debugging config. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: RemoteDebugging or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.RemoteDebugging] = kwargs.pop("cls", None) _request = build_get_remote_debugging_config_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("RemoteDebugging", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace_async async def get_log_file_url( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> Optional[_models.LogFileUrlResponse]: """Get deployment log file URL. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: LogFileUrlResponse or None or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.LogFileUrlResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[Optional[_models.LogFileUrlResponse]] = kwargs.pop("cls", None) _request = build_get_log_file_url_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: deserialized = self._deserialize("LogFileUrlResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _generate_heap_dump_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(diagnostic_parameters, (IOBase, bytes)): _content = diagnostic_parameters else: _json = self._serialize.body(diagnostic_parameters, "DiagnosticParameters") _request = build_generate_heap_dump_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @overload async def begin_generate_heap_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Generate Heap Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_generate_heap_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Generate Heap Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_generate_heap_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Generate Heap Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Is either a DiagnosticParameters type or a IO[bytes] type. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._generate_heap_dump_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, diagnostic_parameters=diagnostic_parameters, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _generate_thread_dump_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(diagnostic_parameters, (IOBase, bytes)): _content = diagnostic_parameters else: _json = self._serialize.body(diagnostic_parameters, "DiagnosticParameters") _request = build_generate_thread_dump_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @overload async def begin_generate_thread_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Generate Thread Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_generate_thread_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Generate Thread Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_generate_thread_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Generate Thread Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Is either a DiagnosticParameters type or a IO[bytes] type. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._generate_thread_dump_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, diagnostic_parameters=diagnostic_parameters, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_jfr_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(diagnostic_parameters, (IOBase, bytes)): _content = diagnostic_parameters else: _json = self._serialize.body(diagnostic_parameters, "DiagnosticParameters") _request = build_start_jfr_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @overload async def begin_start_jfr( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Start JFR. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_start_jfr( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Start JFR. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_start_jfr( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[None]: """Start JFR. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Is either a DiagnosticParameters type or a IO[bytes] type. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._start_jfr_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, deployment_name=deployment_name, diagnostic_parameters=diagnostic_parameters, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method)
class DeploymentsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`deployments` attribute. ''' def __init__(self, *args, **kwargs) -> None: pass @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentResource: '''Get a Deployment and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: DeploymentResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: Union[_models.DeploymentResource, IO[bytes]], **kwargs: Any ) -> _models.DeploymentResource: pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: '''Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the create or update operation. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: '''Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the create or update operation. Required. :type deployment_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: '''Create a new Deployment or update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the create or update operation. Is either a DeploymentResource type or a IO[bytes] type. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Operation to delete a Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: Union[_models.DeploymentResource, IO[bytes]], **kwargs: Any ) -> _models.DeploymentResource: pass @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: '''Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the update operation. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: '''Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the update operation. Required. :type deployment_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, deployment_resource: _models.DeploymentResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentResource]: '''Operation to update an exiting Deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param deployment_resource: Parameters for the update operation. Is either a DeploymentResource type or a IO[bytes] type. Required. :type deployment_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either DeploymentResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, app_name: str, version: Optional[List[str]] = None, expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.DeploymentResource"]: '''Handles requests to list all resources in an App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param version: Version of the deployments to be listed. Default value is None. :type version: list[str] :param expand: The expand expression to apply on the operation. Default value is None. :type expand: str :return: An iterator like instance of either DeploymentResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass async def extract_data(pipeline_response): pass async def get_next(next_link=None): pass @distributed_trace def list_for_cluster( self, resource_group_name: str, service_name: str, version: Optional[List[str]] = None, expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.DeploymentResource"]: '''List deployments for a certain service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param version: Version of the deployments to be listed. Default value is None. :type version: list[str] :param expand: The expand expression to apply on the operation. Default value is None. :type expand: str :return: An iterator like instance of either DeploymentResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.DeploymentResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass async def extract_data(pipeline_response): pass async def get_next(next_link=None): pass async def _start_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_start( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Start the deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _stop_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_stop( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Stop the deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _restart_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_restart( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Restart the deployment. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _enable_remote_debugging_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[Union[_models.RemoteDebuggingPayload, IO[bytes]]] = None, **kwargs: Any ) -> _models.RemoteDebugging: pass @overload async def begin_enable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[_models.RemoteDebuggingPayload] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: '''Enable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param remote_debugging_payload: Parameters for enable remote debugging. Default value is None. :type remote_debugging_payload: ~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebuggingPayload :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_enable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[_models.RemoteDebuggingPayload] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: '''Enable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param remote_debugging_payload: Parameters for enable remote debugging. Default value is None. :type remote_debugging_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_enable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, remote_debugging_payload: Optional[_models.RemoteDebuggingPayload] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: '''Enable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param remote_debugging_payload: Parameters for enable remote debugging. Is either a RemoteDebuggingPayload type or a IO[bytes] type. Default value is None. :type remote_debugging_payload: ~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebuggingPayload or IO[bytes] :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _disable_remote_debugging_initial( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> _models.RemoteDebugging: pass @distributed_trace_async async def begin_disable_remote_debugging( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> AsyncLROPoller[_models.RemoteDebugging]: '''Disable remote debugging. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: An instance of AsyncLROPoller that returns either RemoteDebugging or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace_async async def get_remote_debugging_config( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> _models.RemoteDebugging: '''Get remote debugging config. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: RemoteDebugging or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.RemoteDebugging :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def get_log_file_url( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any ) -> Optional[_models.LogFileUrlResponse]: '''Get deployment log file URL. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :return: LogFileUrlResponse or None or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.LogFileUrlResponse or None :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _generate_heap_dump_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> None: pass @overload async def begin_generate_heap_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Generate Heap Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_generate_heap_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Generate Heap Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_generate_heap_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Generate Heap Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Is either a DiagnosticParameters type or a IO[bytes] type. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _generate_thread_dump_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> None: pass @overload async def begin_generate_thread_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Generate Thread Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_generate_thread_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Generate Thread Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_generate_thread_dump( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Generate Thread Dump. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Is either a DiagnosticParameters type or a IO[bytes] type. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _start_jfr_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]], **kwargs: Any ) -> None: pass @overload async def begin_start_jfr( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Start JFR. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_start_jfr( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Start JFR. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Required. :type diagnostic_parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_start_jfr( self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, diagnostic_parameters: _models.DiagnosticParameters, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: '''Start JFR. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param deployment_name: The name of the Deployment resource. Required. :type deployment_name: str :param diagnostic_parameters: Parameters for the diagnostic operation. Is either a DiagnosticParameters type or a IO[bytes] type. Required. :type diagnostic_parameters: ~azure.mgmt.appplatform.v2024_05_01_preview.models.DiagnosticParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
86
29
41
4
28
11
3
0.4
0
7
0
0
40
5
40
40
2,271
248
1,508
638
1,165
598
664
353
606
7
0
2
168
9,586
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2024_05_01_preview/aio/operations/_customized_accelerators_operations.py
azext_spring.vendored_sdks.appplatform.v2024_05_01_preview.aio.operations._customized_accelerators_operations.CustomizedAcceleratorsOperations
class CustomizedAcceleratorsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`customized_accelerators` attribute. """ models = _models def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> AsyncIterable["_models.CustomizedAcceleratorResource"]: """Handle requests to list all customized accelerators. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :return: An iterator like instance of either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.CustomizedAcceleratorResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request async def extract_data(pipeline_response): deserialized = self._deserialize("CustomizedAcceleratorResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, **kwargs: Any ) -> _models.CustomizedAcceleratorResource: """Get the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :return: CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.CustomizedAcceleratorResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("CustomizedAcceleratorResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _create_or_update_initial( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: Union[_models.CustomizedAcceleratorResource, IO[bytes]], **kwargs: Any ) -> _models.CustomizedAcceleratorResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomizedAcceleratorResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(customized_accelerator_resource, (IOBase, bytes)): _content = customized_accelerator_resource else: _json = self._serialize.body(customized_accelerator_resource, "CustomizedAcceleratorResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("CustomizedAcceleratorResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("CustomizedAcceleratorResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: _models.CustomizedAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorResource]: """Create or update the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param customized_accelerator_resource: The customized accelerator for the create or update operation. Required. :type customized_accelerator_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorResource]: """Create or update the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param customized_accelerator_resource: The customized accelerator for the create or update operation. Required. :type customized_accelerator_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: Union[_models.CustomizedAcceleratorResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorResource]: """Create or update the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param customized_accelerator_resource: The customized accelerator for the create or update operation. Is either a CustomizedAcceleratorResource type or a IO[bytes] type. Required. :type customized_accelerator_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomizedAcceleratorResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, customized_accelerator_resource=customized_accelerator_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("CustomizedAcceleratorResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.CustomizedAcceleratorResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.CustomizedAcceleratorResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Delete the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _validate_initial( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: Union[_models.CustomizedAcceleratorProperties, IO[bytes]], **kwargs: Any ) -> Optional[_models.CustomizedAcceleratorValidateResult]: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.CustomizedAcceleratorValidateResult]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(properties, (IOBase, bytes)): _content = properties else: _json = self._serialize.body(properties, "CustomizedAcceleratorProperties") _request = build_validate_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None response_headers = {} if response.status_code == 200: deserialized = self._deserialize("CustomizedAcceleratorValidateResult", pipeline_response) if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload async def begin_validate( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: _models.CustomizedAcceleratorProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]: """Check the customized accelerator are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param properties: Customized accelerator properties to be validated. Required. :type properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_validate( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]: """Check the customized accelerator are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param properties: Customized accelerator properties to be validated. Required. :type properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_validate( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: Union[_models.CustomizedAcceleratorProperties, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]: """Check the customized accelerator are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param properties: Customized accelerator properties to be validated. Is either a CustomizedAcceleratorProperties type or a IO[bytes] type. Required. :type properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorProperties or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomizedAcceleratorValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._validate_initial( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, customized_accelerator_name=customized_accelerator_name, properties=properties, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("CustomizedAcceleratorValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.CustomizedAcceleratorValidateResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class CustomizedAcceleratorsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`customized_accelerators` attribute. ''' def __init__(self, *args, **kwargs) -> None: pass @distributed_trace def list( self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> AsyncIterable["_models.CustomizedAcceleratorResource"]: '''Handle requests to list all customized accelerators. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :return: An iterator like instance of either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass async def extract_data(pipeline_response): pass async def get_next(next_link=None): pass @distributed_trace_async async def get_next(next_link=None): '''Get the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :return: CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _create_or_update_initial( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: Union[_models.CustomizedAcceleratorResource, IO[bytes]], **kwargs: Any ) -> _models.CustomizedAcceleratorResource: pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: _models.CustomizedAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorResource]: '''Create or update the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param customized_accelerator_resource: The customized accelerator for the create or update operation. Required. :type customized_accelerator_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: _models.CustomizedAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorResource]: '''Create or update the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param customized_accelerator_resource: The customized accelerator for the create or update operation. Required. :type customized_accelerator_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, customized_accelerator_resource: _models.CustomizedAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorResource]: '''Create or update the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param customized_accelerator_resource: The customized accelerator for the create or update operation. Is either a CustomizedAcceleratorResource type or a IO[bytes] type. Required. :type customized_accelerator_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Delete the customized accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _validate_initial( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: Union[_models.CustomizedAcceleratorProperties, IO[bytes]], **kwargs: Any ) -> Optional[_models.CustomizedAcceleratorValidateResult]: pass @overload async def begin_validate( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: _models.CustomizedAcceleratorProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]: '''Check the customized accelerator are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param properties: Customized accelerator properties to be validated. Required. :type properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_validate( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: _models.CustomizedAcceleratorProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]: '''Check the customized accelerator are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param properties: Customized accelerator properties to be validated. Required. :type properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_validate( self, resource_group_name: str, service_name: str, application_accelerator_name: str, customized_accelerator_name: str, properties: _models.CustomizedAcceleratorProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomizedAcceleratorValidateResult]: '''Check the customized accelerator are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param customized_accelerator_name: The name of the customized accelerator. Required. :type customized_accelerator_name: str :param properties: Customized accelerator properties to be validated. Is either a CustomizedAcceleratorProperties type or a IO[bytes] type. Required. :type properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorProperties or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomizedAcceleratorValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomizedAcceleratorValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
29
10
41
4
29
11
3
0.4
0
7
0
0
13
5
13
13
756
83
495
223
371
200
221
119
201
6
0
1
57
9,587
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2024_05_01_preview/aio/operations/_custom_domains_operations.py
azext_spring.vendored_sdks.appplatform.v2024_05_01_preview.aio.operations._custom_domains_operations.CustomDomainsOperations
class CustomDomainsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`custom_domains` attribute. """ models = _models def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any ) -> _models.CustomDomainResource: """Get the custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :return: CustomDomainResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.CustomDomainResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("CustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: Union[_models.CustomDomainResource, IO[bytes]], **kwargs: Any ) -> _models.CustomDomainResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomDomainResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(domain_resource, (IOBase, bytes)): _content = domain_resource else: _json = self._serialize.body(domain_resource, "CustomDomainResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("CustomDomainResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("CustomDomainResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("CustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: """Create or update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: """Create or update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: Union[_models.CustomDomainResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: """Create or update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Is either a CustomDomainResource type or a IO[bytes] type. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomDomainResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, domain_resource=domain_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("CustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.CustomDomainResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.CustomDomainResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Delete the custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: Union[_models.CustomDomainResource, IO[bytes]], **kwargs: Any ) -> _models.CustomDomainResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomDomainResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(domain_resource, (IOBase, bytes)): _content = domain_resource else: _json = self._serialize.body(domain_resource, "CustomDomainResource") _request = build_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("CustomDomainResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("CustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: """Update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: """Update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: Union[_models.CustomDomainResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: """Update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Is either a CustomDomainResource type or a IO[bytes] type. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomDomainResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, domain_name=domain_name, domain_resource=domain_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("CustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.CustomDomainResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.CustomDomainResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @distributed_trace def list( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> AsyncIterable["_models.CustomDomainResource"]: """List the custom domains of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: An iterator like instance of either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.CustomDomainResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request async def extract_data(pipeline_response): deserialized = self._deserialize("CustomDomainResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data)
class CustomDomainsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`custom_domains` attribute. ''' def __init__(self, *args, **kwargs) -> None: pass @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any ) -> _models.CustomDomainResource: '''Get the custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :return: CustomDomainResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: Union[_models.CustomDomainResource, IO[bytes]], **kwargs: Any ) -> _models.CustomDomainResource: pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: '''Create or update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: '''Create or update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: '''Create or update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Is either a CustomDomainResource type or a IO[bytes] type. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Delete the custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: Union[_models.CustomDomainResource, IO[bytes]], **kwargs: Any ) -> _models.CustomDomainResource: pass @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: '''Update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: '''Update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Required. :type domain_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_update( self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, domain_resource: _models.CustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.CustomDomainResource]: '''Update custom domain of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param domain_name: The name of the custom domain resource. Required. :type domain_name: str :param domain_resource: Parameters for the create or update operation. Is either a CustomDomainResource type or a IO[bytes] type. Required. :type domain_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> AsyncIterable["_models.CustomDomainResource"]: '''List the custom domains of one lifecycle application. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: An iterator like instance of either CustomDomainResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.CustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass async def extract_data(pipeline_response): pass async def get_next(next_link=None): pass
29
10
40
4
28
10
3
0.41
0
7
0
0
13
5
13
13
734
83
477
206
368
196
218
117
198
7
0
1
57
9,588
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2024_05_01_preview/aio/operations/_container_registries_operations.py
azext_spring.vendored_sdks.appplatform.v2024_05_01_preview.aio.operations._container_registries_operations.ContainerRegistriesOperations
class ContainerRegistriesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`container_registries` attribute. """ models = _models def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> AsyncIterable["_models.ContainerRegistryResource"]: """List container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.ContainerRegistryResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request async def extract_data(pipeline_response): deserialized = self._deserialize("ContainerRegistryResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) @distributed_trace_async async def get( self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> _models.ContainerRegistryResource: """Get the container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: ContainerRegistryResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[_models.ContainerRegistryResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore async def _create_or_update_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]], **kwargs: Any ) -> _models.ContainerRegistryResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerRegistryResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(container_registry_resource, (IOBase, bytes)): _content = container_registry_resource else: _json = self._serialize.body(container_registry_resource, "ContainerRegistryResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryResource]: """Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryResource]: """Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryResource]: """Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Is either a ContainerRegistryResource type or a IO[bytes] type. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerRegistryResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, container_registry_resource=container_registry_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.ContainerRegistryResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.ContainerRegistryResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _validate_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]], **kwargs: Any ) -> Optional[_models.ContainerRegistryValidateResult]: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ContainerRegistryValidateResult]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(container_registry_properties, (IOBase, bytes)): _content = container_registry_properties else: _json = self._serialize.body(container_registry_properties, "ContainerRegistryProperties") _request = build_validate_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None response_headers = {} if response.status_code == 200: deserialized = self._deserialize("ContainerRegistryValidateResult", pipeline_response) if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload async def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryValidateResult]: """Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload async def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryValidateResult]: """Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async async def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryValidateResult]: """Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Is either a ContainerRegistryProperties type or a IO[bytes] type. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryProperties or IO[bytes] :return: An instance of AsyncLROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( "api_version", _params.pop("api-version", self._api_version or "2024-05-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerRegistryValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._validate_initial( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, container_registry_properties=container_registry_properties, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ContainerRegistryValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: return AsyncLROPoller[_models.ContainerRegistryValidateResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return AsyncLROPoller[_models.ContainerRegistryValidateResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class ContainerRegistriesOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2024_05_01_preview.aio.AppPlatformManagementClient`'s :attr:`container_registries` attribute. ''' def __init__(self, *args, **kwargs) -> None: pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> AsyncIterable["_models.ContainerRegistryResource"]: '''List container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass async def extract_data(pipeline_response): pass async def get_next(next_link=None): pass @distributed_trace_async async def get_next(next_link=None): '''Get the container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: ContainerRegistryResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass async def _create_or_update_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]], **kwargs: Any ) -> _models.ContainerRegistryResource: pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryResource]: '''Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryResource]: '''Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryResource]: '''Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Is either a ContainerRegistryResource type or a IO[bytes] type. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource or IO[bytes] :return: An instance of AsyncLROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> None: pass @distributed_trace_async async def begin_delete( self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: '''Delete a container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass async def _validate_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]], **kwargs: Any ) -> Optional[_models.ContainerRegistryValidateResult]: pass @overload async def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryValidateResult]: '''Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload async def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryValidateResult]: '''Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace_async async def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.ContainerRegistryValidateResult]: '''Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Is either a ContainerRegistryProperties type or a IO[bytes] type. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryProperties or IO[bytes] :return: An instance of AsyncLROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.v2024_05_01_preview.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
29
10
39
4
27
9
3
0.38
0
7
0
0
13
5
13
13
711
83
470
200
369
180
221
119
201
6
0
1
57
9,589
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ContinuousModeBackupPolicy
class ContinuousModeBackupPolicy(BackupPolicy): """The object representing continuous mode backup policy. All required parameters must be populated in order to send to server. :ivar type: Describes the mode of backups. Required. Known values are: "Periodic" and "Continuous". :vartype type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :ivar migration_state: The object representing the state of the migration between the backup policies. :vartype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState :ivar continuous_mode_properties: Configuration values for continuous mode backup. :vartype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties """ _validation = { "type": {"required": True}, } _attribute_map = { "type": {"key": "type", "type": "str"}, "migration_state": {"key": "migrationState", "type": "BackupPolicyMigrationState"}, "continuous_mode_properties": {"key": "continuousModeProperties", "type": "ContinuousModeProperties"}, } def __init__( self, *, migration_state: Optional["_models.BackupPolicyMigrationState"] = None, continuous_mode_properties: Optional["_models.ContinuousModeProperties"] = None, **kwargs: Any ) -> None: """ :keyword migration_state: The object representing the state of the migration between the backup policies. :paramtype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState :keyword continuous_mode_properties: Configuration values for continuous mode backup. :paramtype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties """ super().__init__(migration_state=migration_state, **kwargs) self.type: str = "Continuous" self.continuous_mode_properties = continuous_mode_properties
class ContinuousModeBackupPolicy(BackupPolicy): '''The object representing continuous mode backup policy. All required parameters must be populated in order to send to server. :ivar type: Describes the mode of backups. Required. Known values are: "Periodic" and "Continuous". :vartype type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType :ivar migration_state: The object representing the state of the migration between the backup policies. :vartype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState :ivar continuous_mode_properties: Configuration values for continuous mode backup. :vartype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties ''' def __init__( self, *, migration_state: Optional["_models.BackupPolicyMigrationState"] = None, continuous_mode_properties: Optional["_models.ContinuousModeProperties"] = None, **kwargs: Any ) -> None: ''' :keyword migration_state: The object representing the state of the migration between the backup policies. :paramtype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState :keyword continuous_mode_properties: Configuration values for continuous mode backup. :paramtype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties ''' pass
2
2
17
0
10
7
1
0.95
1
3
0
0
1
2
1
17
42
5
19
12
11
18
7
6
5
1
3
0
1
9,590
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ContinuousModeProperties
class ContinuousModeProperties(_serialization.Model): """Configuration values for periodic mode backup. :ivar tier: Enum to indicate type of Continuos backup mode. Known values are: "Continuous7Days" and "Continuous30Days". :vartype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier """ _attribute_map = { "tier": {"key": "tier", "type": "str"}, } def __init__(self, *, tier: Optional[Union[str, "_models.ContinuousTier"]] = None, **kwargs: Any) -> None: """ :keyword tier: Enum to indicate type of Continuos backup mode. Known values are: "Continuous7Days" and "Continuous30Days". :paramtype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier """ super().__init__(**kwargs) self.tier = tier
class ContinuousModeProperties(_serialization.Model): '''Configuration values for periodic mode backup. :ivar tier: Enum to indicate type of Continuos backup mode. Known values are: "Continuous7Days" and "Continuous30Days". :vartype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier ''' def __init__(self, *, tier: Optional[Union[str, "_models.ContinuousTier"]] = None, **kwargs: Any) -> None: ''' :keyword tier: Enum to indicate type of Continuos backup mode. Known values are: "Continuous7Days" and "Continuous30Days". :paramtype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier ''' pass
2
2
8
0
3
5
1
1.43
1
3
0
0
1
1
1
16
20
3
7
4
5
10
5
4
3
1
2
0
1
9,591
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CorsPolicy
class CorsPolicy(_serialization.Model): """The CORS policy for the Cosmos DB database account. All required parameters must be populated in order to send to server. :ivar allowed_origins: The origin domains that are permitted to make a request against the service via CORS. Required. :vartype allowed_origins: str :ivar allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a CORS request. :vartype allowed_methods: str :ivar allowed_headers: The request headers that the origin domain may specify on the CORS request. :vartype allowed_headers: str :ivar exposed_headers: The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. :vartype exposed_headers: str :ivar max_age_in_seconds: The maximum amount time that a browser should cache the preflight OPTIONS request. :vartype max_age_in_seconds: int """ _validation = { "allowed_origins": {"required": True}, "max_age_in_seconds": {"maximum": 2147483647, "minimum": 1}, } _attribute_map = { "allowed_origins": {"key": "allowedOrigins", "type": "str"}, "allowed_methods": {"key": "allowedMethods", "type": "str"}, "allowed_headers": {"key": "allowedHeaders", "type": "str"}, "exposed_headers": {"key": "exposedHeaders", "type": "str"}, "max_age_in_seconds": {"key": "maxAgeInSeconds", "type": "int"}, } def __init__( self, *, allowed_origins: str, allowed_methods: Optional[str] = None, allowed_headers: Optional[str] = None, exposed_headers: Optional[str] = None, max_age_in_seconds: Optional[int] = None, **kwargs: Any ) -> None: """ :keyword allowed_origins: The origin domains that are permitted to make a request against the service via CORS. Required. :paramtype allowed_origins: str :keyword allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a CORS request. :paramtype allowed_methods: str :keyword allowed_headers: The request headers that the origin domain may specify on the CORS request. :paramtype allowed_headers: str :keyword exposed_headers: The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. :paramtype exposed_headers: str :keyword max_age_in_seconds: The maximum amount time that a browser should cache the preflight OPTIONS request. :paramtype max_age_in_seconds: int """ super().__init__(**kwargs) self.allowed_origins = allowed_origins self.allowed_methods = allowed_methods self.allowed_headers = allowed_headers self.exposed_headers = exposed_headers self.max_age_in_seconds = max_age_in_seconds
class CorsPolicy(_serialization.Model): '''The CORS policy for the Cosmos DB database account. All required parameters must be populated in order to send to server. :ivar allowed_origins: The origin domains that are permitted to make a request against the service via CORS. Required. :vartype allowed_origins: str :ivar allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a CORS request. :vartype allowed_methods: str :ivar allowed_headers: The request headers that the origin domain may specify on the CORS request. :vartype allowed_headers: str :ivar exposed_headers: The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. :vartype exposed_headers: str :ivar max_age_in_seconds: The maximum amount time that a browser should cache the preflight OPTIONS request. :vartype max_age_in_seconds: int ''' def __init__( self, *, allowed_origins: str, allowed_methods: Optional[str] = None, allowed_headers: Optional[str] = None, exposed_headers: Optional[str] = None, max_age_in_seconds: Optional[int] = None, **kwargs: Any ) -> None: ''' :keyword allowed_origins: The origin domains that are permitted to make a request against the service via CORS. Required. :paramtype allowed_origins: str :keyword allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a CORS request. :paramtype allowed_methods: str :keyword allowed_headers: The request headers that the origin domain may specify on the CORS request. :paramtype allowed_headers: str :keyword exposed_headers: The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. :paramtype exposed_headers: str :keyword max_age_in_seconds: The maximum amount time that a browser should cache the preflight OPTIONS request. :paramtype max_age_in_seconds: int ''' pass
2
2
33
0
16
17
1
1.25
1
4
0
0
1
5
1
16
68
5
28
18
17
35
10
9
8
1
2
0
1
9,592
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CosmosCassandraDataTransferDataSourceSink
class CosmosCassandraDataTransferDataSourceSink(BaseCosmosDataTransferDataSourceSink): # pylint: disable=name-too-long """A CosmosDB Cassandra API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar remote_account_name: :vartype remote_account_name: str :ivar keyspace_name: Required. :vartype keyspace_name: str :ivar table_name: Required. :vartype table_name: str """ _validation = { "component": {"required": True}, "keyspace_name": {"required": True}, "table_name": {"required": True}, } _attribute_map = { "component": {"key": "component", "type": "str"}, "remote_account_name": {"key": "remoteAccountName", "type": "str"}, "keyspace_name": {"key": "keyspaceName", "type": "str"}, "table_name": {"key": "tableName", "type": "str"}, } def __init__( self, *, keyspace_name: str, table_name: str, remote_account_name: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword remote_account_name: :paramtype remote_account_name: str :keyword keyspace_name: Required. :paramtype keyspace_name: str :keyword table_name: Required. :paramtype table_name: str """ super().__init__(remote_account_name=remote_account_name, **kwargs) self.component: str = "CosmosDBCassandra" self.keyspace_name = keyspace_name self.table_name = table_name
class CosmosCassandraDataTransferDataSourceSink(BaseCosmosDataTransferDataSourceSink): '''A CosmosDB Cassandra API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar remote_account_name: :vartype remote_account_name: str :ivar keyspace_name: Required. :vartype keyspace_name: str :ivar table_name: Required. :vartype table_name: str ''' def __init__( self, *, keyspace_name: str, table_name: str, remote_account_name: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword remote_account_name: :paramtype remote_account_name: str :keyword keyspace_name: Required. :paramtype keyspace_name: str :keyword table_name: Required. :paramtype table_name: str ''' pass
2
2
15
0
7
8
1
1.11
1
3
0
0
1
3
1
18
44
5
19
9
15
21
8
7
6
1
4
0
1
9,593
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CosmosMongoDataTransferDataSourceSink
class CosmosMongoDataTransferDataSourceSink(BaseCosmosDataTransferDataSourceSink): """A CosmosDB Mongo API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar remote_account_name: :vartype remote_account_name: str :ivar database_name: Required. :vartype database_name: str :ivar collection_name: Required. :vartype collection_name: str """ _validation = { "component": {"required": True}, "database_name": {"required": True}, "collection_name": {"required": True}, } _attribute_map = { "component": {"key": "component", "type": "str"}, "remote_account_name": {"key": "remoteAccountName", "type": "str"}, "database_name": {"key": "databaseName", "type": "str"}, "collection_name": {"key": "collectionName", "type": "str"}, } def __init__( self, *, database_name: str, collection_name: str, remote_account_name: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword remote_account_name: :paramtype remote_account_name: str :keyword database_name: Required. :paramtype database_name: str :keyword collection_name: Required. :paramtype collection_name: str """ super().__init__(remote_account_name=remote_account_name, **kwargs) self.component: str = "CosmosDBMongo" self.database_name = database_name self.collection_name = collection_name
class CosmosMongoDataTransferDataSourceSink(BaseCosmosDataTransferDataSourceSink): '''A CosmosDB Mongo API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar remote_account_name: :vartype remote_account_name: str :ivar database_name: Required. :vartype database_name: str :ivar collection_name: Required. :vartype collection_name: str ''' def __init__( self, *, database_name: str, collection_name: str, remote_account_name: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword remote_account_name: :paramtype remote_account_name: str :keyword database_name: Required. :paramtype database_name: str :keyword collection_name: Required. :paramtype collection_name: str ''' pass
2
2
15
0
7
8
1
1.05
1
3
0
0
1
3
1
18
44
5
19
9
15
20
8
7
6
1
4
0
1
9,594
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CosmosMongoVCoreDataTransferDataSourceSink
class CosmosMongoVCoreDataTransferDataSourceSink(DataTransferDataSourceSink): # pylint: disable=name-too-long """A CosmosDB Mongo vCore API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar database_name: Required. :vartype database_name: str :ivar collection_name: Required. :vartype collection_name: str :ivar host_name: :vartype host_name: str :ivar connection_string_key_vault_uri: :vartype connection_string_key_vault_uri: str """ _validation = { "component": {"required": True}, "database_name": {"required": True}, "collection_name": {"required": True}, } _attribute_map = { "component": {"key": "component", "type": "str"}, "database_name": {"key": "databaseName", "type": "str"}, "collection_name": {"key": "collectionName", "type": "str"}, "host_name": {"key": "hostName", "type": "str"}, "connection_string_key_vault_uri": {"key": "connectionStringKeyVaultUri", "type": "str"}, } def __init__( self, *, database_name: str, collection_name: str, host_name: Optional[str] = None, connection_string_key_vault_uri: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword database_name: Required. :paramtype database_name: str :keyword collection_name: Required. :paramtype collection_name: str :keyword host_name: :paramtype host_name: str :keyword connection_string_key_vault_uri: :paramtype connection_string_key_vault_uri: str """ super().__init__(**kwargs) self.component: str = "CosmosDBMongoVCore" self.database_name = database_name self.collection_name = collection_name self.host_name = host_name self.connection_string_key_vault_uri = connection_string_key_vault_uri
class CosmosMongoVCoreDataTransferDataSourceSink(DataTransferDataSourceSink): '''A CosmosDB Mongo vCore API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar database_name: Required. :vartype database_name: str :ivar collection_name: Required. :vartype collection_name: str :ivar host_name: :vartype host_name: str :ivar connection_string_key_vault_uri: :vartype connection_string_key_vault_uri: str ''' def __init__( self, *, database_name: str, collection_name: str, host_name: Optional[str] = None, connection_string_key_vault_uri: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword database_name: Required. :paramtype database_name: str :keyword collection_name: Required. :paramtype collection_name: str :keyword host_name: :paramtype host_name: str :keyword connection_string_key_vault_uri: :paramtype connection_string_key_vault_uri: str ''' pass
2
2
25
0
15
10
1
0.89
1
3
0
0
1
5
1
17
57
5
28
17
18
25
10
9
8
1
3
0
1
9,595
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CosmosSqlDataTransferDataSourceSink
class CosmosSqlDataTransferDataSourceSink(BaseCosmosDataTransferDataSourceSink): """A CosmosDB No Sql API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar remote_account_name: :vartype remote_account_name: str :ivar database_name: Required. :vartype database_name: str :ivar container_name: Required. :vartype container_name: str """ _validation = { "component": {"required": True}, "database_name": {"required": True}, "container_name": {"required": True}, } _attribute_map = { "component": {"key": "component", "type": "str"}, "remote_account_name": {"key": "remoteAccountName", "type": "str"}, "database_name": {"key": "databaseName", "type": "str"}, "container_name": {"key": "containerName", "type": "str"}, } def __init__( self, *, database_name: str, container_name: str, remote_account_name: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword remote_account_name: :paramtype remote_account_name: str :keyword database_name: Required. :paramtype database_name: str :keyword container_name: Required. :paramtype container_name: str """ super().__init__(remote_account_name=remote_account_name, **kwargs) self.component: str = "CosmosDBSql" self.database_name = database_name self.container_name = container_name
class CosmosSqlDataTransferDataSourceSink(BaseCosmosDataTransferDataSourceSink): '''A CosmosDB No Sql API data source/sink. All required parameters must be populated in order to send to server. :ivar component: Known values are: "CosmosDBCassandra", "CosmosDBMongo", "CosmosDBMongoVCore", "CosmosDBSql", and "AzureBlobStorage". :vartype component: str or ~azure.mgmt.cosmosdb.models.DataTransferComponent :ivar remote_account_name: :vartype remote_account_name: str :ivar database_name: Required. :vartype database_name: str :ivar container_name: Required. :vartype container_name: str ''' def __init__( self, *, database_name: str, container_name: str, remote_account_name: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword remote_account_name: :paramtype remote_account_name: str :keyword database_name: Required. :paramtype database_name: str :keyword container_name: Required. :paramtype container_name: str ''' pass
2
2
15
0
7
8
1
1.05
1
3
0
0
1
3
1
18
44
5
19
9
15
20
8
7
6
1
4
0
1
9,596
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CreateJobRequest
class CreateJobRequest(ARMProxyResource): """Parameters to create Data Transfer Job. 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 server. :ivar id: The unique resource identifier of the database account. :vartype id: str :ivar name: The name of the database account. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar properties: Data Transfer Create Job Properties. Required. :vartype properties: ~azure.mgmt.cosmosdb.models.DataTransferJobProperties """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "properties": {"required": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "properties": {"key": "properties", "type": "DataTransferJobProperties"}, } def __init__(self, *, properties: "_models.DataTransferJobProperties", **kwargs: Any) -> None: """ :keyword properties: Data Transfer Create Job Properties. Required. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataTransferJobProperties """ super().__init__(**kwargs) self.properties = properties
class CreateJobRequest(ARMProxyResource): '''Parameters to create Data Transfer Job. 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 server. :ivar id: The unique resource identifier of the database account. :vartype id: str :ivar name: The name of the database account. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar properties: Data Transfer Create Job Properties. Required. :vartype properties: ~azure.mgmt.cosmosdb.models.DataTransferJobProperties ''' def __init__(self, *, properties: "_models.DataTransferJobProperties", **kwargs: Any) -> None: ''' :keyword properties: Data Transfer Create Job Properties. Required. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataTransferJobProperties ''' pass
2
2
7
0
3
4
1
1
1
2
0
0
1
1
1
17
38
6
16
5
14
16
6
5
4
1
3
0
1
9,597
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.CreateUpdateOptions
class CreateUpdateOptions(_serialization.Model): """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". :ivar throughput: Request Units per second. For example, "throughput": 10000. :vartype throughput: int :ivar autoscale_settings: Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. :vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ _attribute_map = { "throughput": {"key": "throughput", "type": "int"}, "autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"}, } def __init__( self, *, throughput: Optional[int] = None, autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs: Any ) -> None: """ :keyword throughput: Request Units per second. For example, "throughput": 10000. :paramtype throughput: int :keyword autoscale_settings: Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ super().__init__(**kwargs) self.throughput = throughput self.autoscale_settings = autoscale_settings
class CreateUpdateOptions(_serialization.Model): '''CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". :ivar throughput: Request Units per second. For example, "throughput": 10000. :vartype throughput: int :ivar autoscale_settings: Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. :vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings ''' def __init__( self, *, throughput: Optional[int] = None, autoscale_settings: Optional["_models.AutoscaleSettings"] = None, **kwargs: Any ) -> None: ''' :keyword throughput: Request Units per second. For example, "throughput": 10000. :paramtype throughput: int :keyword autoscale_settings: Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. :paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings ''' pass
2
2
17
0
10
7
1
1
1
3
0
0
1
2
1
16
33
3
15
11
7
15
6
5
4
1
2
0
1
9,598
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataCenterResource
class DataCenterResource(ARMProxyResource): """A managed Cassandra data center. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the database account. :vartype id: str :ivar name: The name of the database account. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar properties: Properties of a managed Cassandra data center. :vartype properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties """ _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"}, "properties": {"key": "properties", "type": "DataCenterResourceProperties"}, } def __init__(self, *, properties: Optional["_models.DataCenterResourceProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Properties of a managed Cassandra data center. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties """ super().__init__(**kwargs) self.properties = properties
class DataCenterResource(ARMProxyResource): '''A managed Cassandra data center. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource identifier of the database account. :vartype id: str :ivar name: The name of the database account. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str :ivar properties: Properties of a managed Cassandra data center. :vartype properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties ''' def __init__(self, *, properties: Optional["_models.DataCenterResourceProperties"] = None, **kwargs: Any) -> None: ''' :keyword properties: Properties of a managed Cassandra data center. :paramtype properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties ''' pass
2
2
7
0
3
4
1
1
1
2
0
0
1
1
1
17
35
5
15
5
13
15
6
5
4
1
3
0
1
9,599
Azure/azure-cli-extensions
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataCenterResourceProperties
class DataCenterResourceProperties(_serialization.Model): """Properties of a managed Cassandra data center. Variables are only populated by the server, and will be ignored when sending a request. :ivar provisioning_state: The status of the resource at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :ivar data_center_location: The region this data center should be created in. :vartype data_center_location: str :ivar delegated_subnet_id: Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual network>`/subnets/:code:`<subnet>`'. :vartype delegated_subnet_id: str :ivar node_count: The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. :vartype node_count: int :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. Generally you will want to use the seedNodes property on the cluster, which aggregates the seed nodes from all data centers in the cluster. :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] :ivar base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys are allowed. :vartype base64_encoded_cassandra_yaml_fragment: str :ivar managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key. :vartype managed_disk_customer_key_uri: str :ivar backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for encryption of the backup storage account. :vartype backup_storage_customer_key_uri: str :ivar sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. :vartype sku: str :ivar disk_sku: Disk SKU used for data centers. Default value is P30. :vartype disk_sku: str :ivar disk_capacity: Number of disks attached to each node. Default is 4. :vartype disk_capacity: int :ivar availability_zone: If the data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. :vartype availability_zone: bool :ivar authentication_method_ldap_properties: Ldap authentication method properties. This feature is in preview. :vartype authentication_method_ldap_properties: ~azure.mgmt.cosmosdb.models.AuthenticationMethodLdapProperties :ivar deallocated: Whether the data center has been deallocated. :vartype deallocated: bool :ivar provision_error: Error related to resource provisioning. :vartype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError :ivar private_endpoint_ip_address: Ip of the VPN Endpoint for this data center. :vartype private_endpoint_ip_address: str """ _validation = { "seed_nodes": {"readonly": True}, } _attribute_map = { "provisioning_state": {"key": "provisioningState", "type": "str"}, "data_center_location": {"key": "dataCenterLocation", "type": "str"}, "delegated_subnet_id": {"key": "delegatedSubnetId", "type": "str"}, "node_count": {"key": "nodeCount", "type": "int"}, "seed_nodes": {"key": "seedNodes", "type": "[SeedNode]"}, "base64_encoded_cassandra_yaml_fragment": {"key": "base64EncodedCassandraYamlFragment", "type": "str"}, "managed_disk_customer_key_uri": {"key": "managedDiskCustomerKeyUri", "type": "str"}, "backup_storage_customer_key_uri": {"key": "backupStorageCustomerKeyUri", "type": "str"}, "sku": {"key": "sku", "type": "str"}, "disk_sku": {"key": "diskSku", "type": "str"}, "disk_capacity": {"key": "diskCapacity", "type": "int"}, "availability_zone": {"key": "availabilityZone", "type": "bool"}, "authentication_method_ldap_properties": { "key": "authenticationMethodLdapProperties", "type": "AuthenticationMethodLdapProperties", }, "deallocated": {"key": "deallocated", "type": "bool"}, "provision_error": {"key": "provisionError", "type": "CassandraError"}, "private_endpoint_ip_address": {"key": "privateEndpointIpAddress", "type": "str"}, } def __init__( self, *, provisioning_state: Optional[Union[str, "_models.ManagedCassandraProvisioningState"]] = None, data_center_location: Optional[str] = None, delegated_subnet_id: Optional[str] = None, node_count: Optional[int] = None, base64_encoded_cassandra_yaml_fragment: Optional[str] = None, managed_disk_customer_key_uri: Optional[str] = None, backup_storage_customer_key_uri: Optional[str] = None, sku: Optional[str] = None, disk_sku: Optional[str] = None, disk_capacity: Optional[int] = None, availability_zone: Optional[bool] = None, authentication_method_ldap_properties: Optional["_models.AuthenticationMethodLdapProperties"] = None, deallocated: Optional[bool] = None, provision_error: Optional["_models.CassandraError"] = None, private_endpoint_ip_address: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword provisioning_state: The status of the resource at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :paramtype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :keyword data_center_location: The region this data center should be created in. :paramtype data_center_location: str :keyword delegated_subnet_id: Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual network>`/subnets/:code:`<subnet>`'. :paramtype delegated_subnet_id: str :keyword node_count: The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. :paramtype node_count: int :keyword base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys are allowed. :paramtype base64_encoded_cassandra_yaml_fragment: str :keyword managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key. :paramtype managed_disk_customer_key_uri: str :keyword backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for encryption of the backup storage account. :paramtype backup_storage_customer_key_uri: str :keyword sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. :paramtype sku: str :keyword disk_sku: Disk SKU used for data centers. Default value is P30. :paramtype disk_sku: str :keyword disk_capacity: Number of disks attached to each node. Default is 4. :paramtype disk_capacity: int :keyword availability_zone: If the data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. :paramtype availability_zone: bool :keyword authentication_method_ldap_properties: Ldap authentication method properties. This feature is in preview. :paramtype authentication_method_ldap_properties: ~azure.mgmt.cosmosdb.models.AuthenticationMethodLdapProperties :keyword deallocated: Whether the data center has been deallocated. :paramtype deallocated: bool :keyword provision_error: Error related to resource provisioning. :paramtype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError :keyword private_endpoint_ip_address: Ip of the VPN Endpoint for this data center. :paramtype private_endpoint_ip_address: str """ super().__init__(**kwargs) self.provisioning_state = provisioning_state self.data_center_location = data_center_location self.delegated_subnet_id = delegated_subnet_id self.node_count = node_count self.seed_nodes = None self.base64_encoded_cassandra_yaml_fragment = base64_encoded_cassandra_yaml_fragment self.managed_disk_customer_key_uri = managed_disk_customer_key_uri self.backup_storage_customer_key_uri = backup_storage_customer_key_uri self.sku = sku self.disk_sku = disk_sku self.disk_capacity = disk_capacity self.availability_zone = availability_zone self.authentication_method_ldap_properties = authentication_method_ldap_properties self.deallocated = deallocated self.provision_error = provision_error self.private_endpoint_ip_address = private_endpoint_ip_address
class DataCenterResourceProperties(_serialization.Model): '''Properties of a managed Cassandra data center. Variables are only populated by the server, and will be ignored when sending a request. :ivar provisioning_state: The status of the resource at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :ivar data_center_location: The region this data center should be created in. :vartype data_center_location: str :ivar delegated_subnet_id: Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual network>`/subnets/:code:`<subnet>`'. :vartype delegated_subnet_id: str :ivar node_count: The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. :vartype node_count: int :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. Generally you will want to use the seedNodes property on the cluster, which aggregates the seed nodes from all data centers in the cluster. :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] :ivar base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys are allowed. :vartype base64_encoded_cassandra_yaml_fragment: str :ivar managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key. :vartype managed_disk_customer_key_uri: str :ivar backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for encryption of the backup storage account. :vartype backup_storage_customer_key_uri: str :ivar sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. :vartype sku: str :ivar disk_sku: Disk SKU used for data centers. Default value is P30. :vartype disk_sku: str :ivar disk_capacity: Number of disks attached to each node. Default is 4. :vartype disk_capacity: int :ivar availability_zone: If the data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. :vartype availability_zone: bool :ivar authentication_method_ldap_properties: Ldap authentication method properties. This feature is in preview. :vartype authentication_method_ldap_properties: ~azure.mgmt.cosmosdb.models.AuthenticationMethodLdapProperties :ivar deallocated: Whether the data center has been deallocated. :vartype deallocated: bool :ivar provision_error: Error related to resource provisioning. :vartype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError :ivar private_endpoint_ip_address: Ip of the VPN Endpoint for this data center. :vartype private_endpoint_ip_address: str ''' def __init__( self, *, provisioning_state: Optional[Union[str, "_models.ManagedCassandraProvisioningState"]] = None, data_center_location: Optional[str] = None, delegated_subnet_id: Optional[str] = None, node_count: Optional[int] = None, base64_encoded_cassandra_yaml_fragment: Optional[str] = None, managed_disk_customer_key_uri: Optional[str] = None, backup_storage_customer_key_uri: Optional[str] = None, sku: Optional[str] = None, disk_sku: Optional[str] = None, disk_capacity: Optional[int] = None, availability_zone: Optional[bool] = None, authentication_method_ldap_properties: Optional["_models.AuthenticationMethodLdapProperties"] = None, deallocated: Optional[bool] = None, provision_error: Optional["_models.CassandraError"] = None, private_endpoint_ip_address: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword provisioning_state: The status of the resource at the time the operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :paramtype provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState :keyword data_center_location: The region this data center should be created in. :paramtype data_center_location: str :keyword delegated_subnet_id: Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual network>`/subnets/:code:`<subnet>`'. :paramtype delegated_subnet_id: str :keyword node_count: The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. :paramtype node_count: int :keyword base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys are allowed. :paramtype base64_encoded_cassandra_yaml_fragment: str :keyword managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key. :paramtype managed_disk_customer_key_uri: str :keyword backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for encryption of the backup storage account. :paramtype backup_storage_customer_key_uri: str :keyword sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. :paramtype sku: str :keyword disk_sku: Disk SKU used for data centers. Default value is P30. :paramtype disk_sku: str :keyword disk_capacity: Number of disks attached to each node. Default is 4. :paramtype disk_capacity: int :keyword availability_zone: If the data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. :paramtype availability_zone: bool :keyword authentication_method_ldap_properties: Ldap authentication method properties. This feature is in preview. :paramtype authentication_method_ldap_properties: ~azure.mgmt.cosmosdb.models.AuthenticationMethodLdapProperties :keyword deallocated: Whether the data center has been deallocated. :paramtype deallocated: bool :keyword provision_error: Error related to resource provisioning. :paramtype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError :keyword private_endpoint_ip_address: Ip of the VPN Endpoint for this data center. :paramtype private_endpoint_ip_address: str ''' pass
2
2
87
0
37
50
1
1.69
1
5
0
0
1
16
1
16
172
5
62
39
41
105
21
20
19
1
2
0
1