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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,000 |
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.CassandraTableGetPropertiesResource
|
class CassandraTableGetPropertiesResource(CassandraTableResource, ExtendedResourceProperties):
"""CassandraTableGetPropertiesResource.
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 Cassandra table. Required.
:vartype id: str
:ivar default_ttl: Time to live of the Cosmos DB Cassandra table.
:vartype default_ttl: int
:ivar schema: Schema of the Cosmos DB Cassandra table.
:vartype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:ivar analytical_storage_ttl: Analytical TTL.
:vartype analytical_storage_ttl: int
"""
_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"},
"default_ttl": {"key": "defaultTtl", "type": "int"},
"schema": {"key": "schema", "type": "CassandraSchema"},
"analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"},
}
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
default_ttl: Optional[int] = None,
schema: Optional["_models.CassandraSchema"] = None,
analytical_storage_ttl: Optional[int] = None,
**kwargs: Any
) -> None:
"""
:keyword id: Name of the Cosmos DB Cassandra table. Required.
:paramtype id: str
:keyword default_ttl: Time to live of the Cosmos DB Cassandra table.
:paramtype default_ttl: int
:keyword schema: Schema of the Cosmos DB Cassandra table.
:paramtype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:keyword analytical_storage_ttl: Analytical TTL.
:paramtype analytical_storage_ttl: int
"""
super().__init__(
id=id, default_ttl=default_ttl, schema=schema, analytical_storage_ttl=analytical_storage_ttl, **kwargs
)
self.rid = None
self.ts = None
self.etag = None
self.id = id
self.default_ttl = default_ttl
self.schema = schema
self.analytical_storage_ttl = analytical_storage_ttl
|
class CassandraTableGetPropertiesResource(CassandraTableResource, ExtendedResourceProperties):
'''CassandraTableGetPropertiesResource.
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 Cassandra table. Required.
:vartype id: str
:ivar default_ttl: Time to live of the Cosmos DB Cassandra table.
:vartype default_ttl: int
:ivar schema: Schema of the Cosmos DB Cassandra table.
:vartype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:ivar analytical_storage_ttl: Analytical TTL.
:vartype analytical_storage_ttl: int
'''
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
default_ttl: Optional[int] = None,
schema: Optional["_models.CassandraSchema"] = None,
analytical_storage_ttl: Optional[int] = None,
**kwargs: Any
) -> None:
'''
:keyword id: Name of the Cosmos DB Cassandra table. Required.
:paramtype id: str
:keyword default_ttl: Time to live of the Cosmos DB Cassandra table.
:paramtype default_ttl: int
:keyword schema: Schema of the Cosmos DB Cassandra table.
:paramtype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:keyword analytical_storage_ttl: Analytical TTL.
:paramtype analytical_storage_ttl: int
'''
pass
| 2 | 2 | 29 | 0 | 19 | 11 | 1 | 0.86 | 2 | 4 | 0 | 0 | 1 | 7 | 1 | 18 | 70 | 6 | 35 | 19 | 25 | 30 | 12 | 11 | 10 | 1 | 3 | 0 | 1 |
10,001 |
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.CassandraTableGetResults
|
class CassandraTableGetResults(ARMResourceProperties):
"""An Azure Cosmos DB Cassandra table.
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.CassandraTableGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions
"""
_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": "CassandraTableGetPropertiesResource"},
"options": {"key": "properties.options", "type": "CassandraTableGetPropertiesOptions"},
}
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.CassandraTableGetPropertiesResource"] = None,
options: Optional["_models.CassandraTableGetPropertiesOptions"] = 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.CassandraTableGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class CassandraTableGetResults(ARMResourceProperties):
'''An Azure Cosmos DB Cassandra table.
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.CassandraTableGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions
'''
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.CassandraTableGetPropertiesResource"] = None,
options: Optional["_models.CassandraTableGetPropertiesOptions"] = 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.CassandraTableGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions
'''
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 |
10,002 |
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.CassandraTableListResult
|
class CassandraTableListResult(_serialization.Model):
"""The List operation response, that contains the Cassandra tables and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Cassandra tables and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.CassandraTableGetResults]
"""
_validation = {
"value": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[CassandraTableGetResults]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
|
class CassandraTableListResult(_serialization.Model):
'''The List operation response, that contains the Cassandra tables and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Cassandra tables and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.CassandraTableGetResults]
'''
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 |
10,003 |
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.CassandraTableResource
|
class CassandraTableResource(_serialization.Model):
"""Cosmos DB Cassandra table resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Cassandra table. Required.
:vartype id: str
:ivar default_ttl: Time to live of the Cosmos DB Cassandra table.
:vartype default_ttl: int
:ivar schema: Schema of the Cosmos DB Cassandra table.
:vartype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:ivar analytical_storage_ttl: Analytical TTL.
:vartype analytical_storage_ttl: int
"""
_validation = {
"id": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"default_ttl": {"key": "defaultTtl", "type": "int"},
"schema": {"key": "schema", "type": "CassandraSchema"},
"analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"},
}
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
default_ttl: Optional[int] = None,
schema: Optional["_models.CassandraSchema"] = None,
analytical_storage_ttl: Optional[int] = None,
**kwargs: Any
) -> None:
"""
:keyword id: Name of the Cosmos DB Cassandra table. Required.
:paramtype id: str
:keyword default_ttl: Time to live of the Cosmos DB Cassandra table.
:paramtype default_ttl: int
:keyword schema: Schema of the Cosmos DB Cassandra table.
:paramtype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:keyword analytical_storage_ttl: Analytical TTL.
:paramtype analytical_storage_ttl: int
"""
super().__init__(**kwargs)
self.id = id
self.default_ttl = default_ttl
self.schema = schema
self.analytical_storage_ttl = analytical_storage_ttl
|
class CassandraTableResource(_serialization.Model):
'''Cosmos DB Cassandra table resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Cassandra table. Required.
:vartype id: str
:ivar default_ttl: Time to live of the Cosmos DB Cassandra table.
:vartype default_ttl: int
:ivar schema: Schema of the Cosmos DB Cassandra table.
:vartype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:ivar analytical_storage_ttl: Analytical TTL.
:vartype analytical_storage_ttl: int
'''
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
default_ttl: Optional[int] = None,
schema: Optional["_models.CassandraSchema"] = None,
analytical_storage_ttl: Optional[int] = None,
**kwargs: Any
) -> None:
'''
:keyword id: Name of the Cosmos DB Cassandra table. Required.
:paramtype id: str
:keyword default_ttl: Time to live of the Cosmos DB Cassandra table.
:paramtype default_ttl: int
:keyword schema: Schema of the Cosmos DB Cassandra table.
:paramtype schema: ~azure.mgmt.cosmosdb.models.CassandraSchema
:keyword analytical_storage_ttl: Analytical TTL.
:paramtype analytical_storage_ttl: int
'''
pass
| 2 | 2 | 24 | 0 | 14 | 11 | 1 | 0.92 | 1 | 4 | 0 | 1 | 1 | 4 | 1 | 16 | 50 | 5 | 24 | 16 | 14 | 22 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
10,004 |
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/incident/_update.py
|
azext_sentinel.aaz.latest.sentinel.incident._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(
"classification", AAZStrType, ".classification")
properties.set_prop("classificationComment",
AAZStrType, ".classification_comment")
properties.set_prop("classificationReason",
AAZStrType, ".classification_reason")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("firstActivityTimeUtc",
AAZStrType, ".first_activity_time_utc")
properties.set_prop("labels", AAZListType, ".labels")
properties.set_prop("lastActivityTimeUtc",
AAZStrType, ".last_activity_time_utc")
properties.set_prop("owner", AAZObjectType, ".owner")
properties.set_prop("providerIncidentId",
AAZStrType, ".provider_incident_id")
properties.set_prop(
"providerName", AAZStrType, ".provider_name")
properties.set_prop("severity", AAZStrType, ".severity", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("status", AAZStrType, ".status", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("title", AAZStrType, ".title", typ_kwargs={
"flags": {"required": True}})
labels = _builder.get(".properties.labels")
if labels is not None:
labels.set_elements(AAZObjectType)
_elements = _builder.get(".properties.labels[]")
if _elements is not None:
_elements.set_prop("labelName", AAZStrType, ".label_name", typ_kwargs={
"flags": {"required": True}})
owner = _builder.get(".properties.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")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 22 | 3 | 20 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 47 | 7 | 40 | 8 | 37 | 0 | 36 | 8 | 33 | 5 | 1 | 1 | 6 |
10,005 |
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.CassandraViewCreateUpdateParameters
|
class CassandraViewCreateUpdateParameters(ARMResourceProperties):
"""Parameters to create and update Cosmos DB Cassandra view.
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 Cassandra view. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource
: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": "CassandraViewResource"},
"options": {"key": "properties.options", "type": "CreateUpdateOptions"},
}
def __init__(
self,
*,
resource: "_models.CassandraViewResource",
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 Cassandra view. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource
: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 CassandraViewCreateUpdateParameters(ARMResourceProperties):
'''Parameters to create and update Cosmos DB Cassandra view.
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 Cassandra view. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource
: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.CassandraViewResource",
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 Cassandra view. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource
: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 |
10,006 |
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/incident/comment/_create.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._create.Create.IncidentCommentsCreateOrUpdate
|
class IncidentCommentsCreateOrUpdate(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/incidents/{incidentId}/comments/{incidentCommentId}",
**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(
"incidentCommentId", self.ctx.args.incident_comment_id,
required=True,
),
**self.serialize_url_param(
"incidentId", self.ctx.args.incident_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("message", AAZStrType, ".message", 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.author = AAZObjectType(
flags={"read_only": True},
)
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.message = AAZStrType(
flags={"required": True},
)
author = cls._schema_on_200_201.properties.author
author.email = AAZStrType(
flags={"read_only": True},
)
author.name = AAZStrType(
flags={"read_only": True},
)
author.object_id = AAZStrType(
serialized_name="objectId",
flags={"read_only": True},
)
author.user_principal_name = AAZStrType(
serialized_name="userPrincipalName",
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},
)
return cls._schema_on_200_201
|
class IncidentCommentsCreateOrUpdate(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 185 | 20 | 165 | 33 | 146 | 0 | 64 | 25 | 53 | 2 | 1 | 1 | 13 |
10,007 |
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.CassandraKeyspaceGetPropertiesOptions
|
class CassandraKeyspaceGetPropertiesOptions(OptionsResource):
"""CassandraKeyspaceGetPropertiesOptions.
: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 CassandraKeyspaceGetPropertiesOptions(OptionsResource):
'''CassandraKeyspaceGetPropertiesOptions.
: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 |
10,008 |
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/incident/comment/_update.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._update.Update.IncidentCommentsGet
|
class IncidentCommentsGet(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/incidents/{incidentId}/comments/{incidentCommentId}",
**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(
"incidentCommentId", self.ctx.args.incident_comment_id,
required=True,
),
**self.serialize_url_param(
"incidentId", self.ctx.args.incident_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_incident_comment_read(cls._schema_on_200)
return cls._schema_on_200
|
class IncidentCommentsGet(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 |
10,009 |
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/incident/comment/_update.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._update.Update.IncidentCommentsCreateOrUpdate
|
class IncidentCommentsCreateOrUpdate(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/incidents/{incidentId}/comments/{incidentCommentId}",
**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(
"incidentCommentId", self.ctx.args.incident_comment_id,
required=True,
),
**self.serialize_url_param(
"incidentId", self.ctx.args.incident_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,
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_incident_comment_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class IncidentCommentsCreateOrUpdate(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 |
10,010 |
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/incident/comment/_show.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._show.Show.IncidentCommentsGet
|
class IncidentCommentsGet(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/incidents/{incidentId}/comments/{incidentCommentId}",
**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(
"incidentCommentId", self.ctx.args.incident_comment_id,
required=True,
),
**self.serialize_url_param(
"incidentId", self.ctx.args.incident_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.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.author = AAZObjectType(
flags={"read_only": True},
)
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.message = AAZStrType(
flags={"required": True},
)
author = cls._schema_on_200.properties.author
author.email = AAZStrType(
flags={"read_only": True},
)
author.name = AAZStrType(
flags={"read_only": True},
)
author.object_id = AAZStrType(
serialized_name="objectId",
flags={"read_only": True},
)
author.user_principal_name = AAZStrType(
serialized_name="userPrincipalName",
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},
)
return cls._schema_on_200
|
class IncidentCommentsGet(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 166 | 17 | 149 | 29 | 132 | 0 | 56 | 22 | 46 | 2 | 1 | 1 | 11 |
10,011 |
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/incident/comment/_list.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._list.List.IncidentCommentsList
|
class IncidentCommentsList(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/incidents/{incidentId}/comments",
**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(
"incidentId", self.ctx.args.incident_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(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"$orderby", self.ctx.args.orderby,
),
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**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.author = AAZObjectType(
flags={"read_only": True},
)
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.message = AAZStrType(
flags={"required": True},
)
author = cls._schema_on_200.value.Element.properties.author
author.email = AAZStrType(
flags={"read_only": True},
)
author.name = AAZStrType(
flags={"read_only": True},
)
author.object_id = AAZStrType(
serialized_name="objectId",
flags={"read_only": True},
)
author.user_principal_name = AAZStrType(
serialized_name="userPrincipalName",
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},
)
return cls._schema_on_200
|
class IncidentCommentsList(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 | 18 | 1 | 17 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 186 | 19 | 167 | 31 | 150 | 0 | 61 | 24 | 51 | 2 | 1 | 1 | 11 |
10,012 |
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.BackupPolicy
|
class BackupPolicy(_serialization.Model):
"""The object representing the policy for taking backups on an account.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ContinuousModeBackupPolicy, PeriodicModeBackupPolicy
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
"""
_validation = {
"type": {"required": True},
}
_attribute_map = {
"type": {"key": "type", "type": "str"},
"migration_state": {"key": "migrationState", "type": "BackupPolicyMigrationState"},
}
_subtype_map = {"type": {"Continuous": "ContinuousModeBackupPolicy", "Periodic": "PeriodicModeBackupPolicy"}}
def __init__(
self, *, migration_state: Optional["_models.BackupPolicyMigrationState"] = 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
"""
super().__init__(**kwargs)
self.type: Optional[str] = None
self.migration_state = migration_state
|
class BackupPolicy(_serialization.Model):
'''The object representing the policy for taking backups on an account.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ContinuousModeBackupPolicy, PeriodicModeBackupPolicy
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
'''
def __init__(
self, *, migration_state: Optional["_models.BackupPolicyMigrationState"] = 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
'''
pass
| 2 | 2 | 11 | 0 | 6 | 5 | 1 | 1.07 | 1 | 3 | 0 | 2 | 1 | 2 | 1 | 16 | 38 | 7 | 15 | 9 | 11 | 16 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
10,013 |
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.BackupPolicyMigrationState
|
class BackupPolicyMigrationState(_serialization.Model):
"""The object representing the state of the migration between the backup policies.
:ivar status: Describes the status of migration between backup policy types. Known values are:
"Invalid", "InProgress", "Completed", and "Failed".
:vartype status: str or ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationStatus
:ivar target_type: Describes the target backup policy type of the backup policy migration.
Known values are: "Periodic" and "Continuous".
:vartype target_type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType
:ivar start_time: Time at which the backup policy migration started (ISO-8601 format).
:vartype start_time: ~datetime.datetime
"""
_attribute_map = {
"status": {"key": "status", "type": "str"},
"target_type": {"key": "targetType", "type": "str"},
"start_time": {"key": "startTime", "type": "iso-8601"},
}
def __init__(
self,
*,
status: Optional[Union[str, "_models.BackupPolicyMigrationStatus"]] = None,
target_type: Optional[Union[str, "_models.BackupPolicyType"]] = None,
start_time: Optional[datetime.datetime] = None,
**kwargs: Any
) -> None:
"""
:keyword status: Describes the status of migration between backup policy types. Known values
are: "Invalid", "InProgress", "Completed", and "Failed".
:paramtype status: str or ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationStatus
:keyword target_type: Describes the target backup policy type of the backup policy migration.
Known values are: "Periodic" and "Continuous".
:paramtype target_type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType
:keyword start_time: Time at which the backup policy migration started (ISO-8601 format).
:paramtype start_time: ~datetime.datetime
"""
super().__init__(**kwargs)
self.status = status
self.target_type = target_type
self.start_time = start_time
|
class BackupPolicyMigrationState(_serialization.Model):
'''The object representing the state of the migration between the backup policies.
:ivar status: Describes the status of migration between backup policy types. Known values are:
"Invalid", "InProgress", "Completed", and "Failed".
:vartype status: str or ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationStatus
:ivar target_type: Describes the target backup policy type of the backup policy migration.
Known values are: "Periodic" and "Continuous".
:vartype target_type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType
:ivar start_time: Time at which the backup policy migration started (ISO-8601 format).
:vartype start_time: ~datetime.datetime
'''
def __init__(
self,
*,
status: Optional[Union[str, "_models.BackupPolicyMigrationStatus"]] = None,
target_type: Optional[Union[str, "_models.BackupPolicyType"]] = None,
start_time: Optional[datetime.datetime] = None,
**kwargs: Any
) -> None:
'''
:keyword status: Describes the status of migration between backup policy types. Known values
are: "Invalid", "InProgress", "Completed", and "Failed".
:paramtype status: str or ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationStatus
:keyword target_type: Describes the target backup policy type of the backup policy migration.
Known values are: "Periodic" and "Continuous".
:paramtype target_type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType
:keyword start_time: Time at which the backup policy migration started (ISO-8601 format).
:paramtype start_time: ~datetime.datetime
'''
pass
| 2 | 2 | 22 | 0 | 12 | 10 | 1 | 1.11 | 1 | 4 | 0 | 0 | 1 | 3 | 1 | 16 | 41 | 3 | 18 | 13 | 9 | 20 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
10,014 |
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.BackupResource
|
class BackupResource(_serialization.Model):
"""A restorable backup of a Cassandra cluster.
:ivar backup_id: The unique identifier of backup.
:vartype backup_id: str
:ivar backup_state: The current state of the backup. Known values are: "Initiated",
"InProgress", "Succeeded", and "Failed".
:vartype backup_state: str or ~azure.mgmt.cosmosdb.models.BackupState
:ivar backup_start_timestamp: The time at which the backup process begins.
:vartype backup_start_timestamp: ~datetime.datetime
:ivar backup_stop_timestamp: The time at which the backup process ends.
:vartype backup_stop_timestamp: ~datetime.datetime
:ivar backup_expiry_timestamp: The time at which the backup will expire.
:vartype backup_expiry_timestamp: ~datetime.datetime
"""
_attribute_map = {
"backup_id": {"key": "backupId", "type": "str"},
"backup_state": {"key": "backupState", "type": "str"},
"backup_start_timestamp": {"key": "backupStartTimestamp", "type": "iso-8601"},
"backup_stop_timestamp": {"key": "backupStopTimestamp", "type": "iso-8601"},
"backup_expiry_timestamp": {"key": "backupExpiryTimestamp", "type": "iso-8601"},
}
def __init__(
self,
*,
backup_id: Optional[str] = None,
backup_state: Optional[Union[str, "_models.BackupState"]] = None,
backup_start_timestamp: Optional[datetime.datetime] = None,
backup_stop_timestamp: Optional[datetime.datetime] = None,
backup_expiry_timestamp: Optional[datetime.datetime] = None,
**kwargs: Any
) -> None:
"""
:keyword backup_id: The unique identifier of backup.
:paramtype backup_id: str
:keyword backup_state: The current state of the backup. Known values are: "Initiated",
"InProgress", "Succeeded", and "Failed".
:paramtype backup_state: str or ~azure.mgmt.cosmosdb.models.BackupState
:keyword backup_start_timestamp: The time at which the backup process begins.
:paramtype backup_start_timestamp: ~datetime.datetime
:keyword backup_stop_timestamp: The time at which the backup process ends.
:paramtype backup_stop_timestamp: ~datetime.datetime
:keyword backup_expiry_timestamp: The time at which the backup will expire.
:paramtype backup_expiry_timestamp: ~datetime.datetime
"""
super().__init__(**kwargs)
self.backup_id = backup_id
self.backup_state = backup_state
self.backup_start_timestamp = backup_start_timestamp
self.backup_stop_timestamp = backup_stop_timestamp
self.backup_expiry_timestamp = backup_expiry_timestamp
|
class BackupResource(_serialization.Model):
'''A restorable backup of a Cassandra cluster.
:ivar backup_id: The unique identifier of backup.
:vartype backup_id: str
:ivar backup_state: The current state of the backup. Known values are: "Initiated",
"InProgress", "Succeeded", and "Failed".
:vartype backup_state: str or ~azure.mgmt.cosmosdb.models.BackupState
:ivar backup_start_timestamp: The time at which the backup process begins.
:vartype backup_start_timestamp: ~datetime.datetime
:ivar backup_stop_timestamp: The time at which the backup process ends.
:vartype backup_stop_timestamp: ~datetime.datetime
:ivar backup_expiry_timestamp: The time at which the backup will expire.
:vartype backup_expiry_timestamp: ~datetime.datetime
'''
def __init__(
self,
*,
backup_id: Optional[str] = None,
backup_state: Optional[Union[str, "_models.BackupState"]] = None,
backup_start_timestamp: Optional[datetime.datetime] = None,
backup_stop_timestamp: Optional[datetime.datetime] = None,
backup_expiry_timestamp: Optional[datetime.datetime] = None,
**kwargs: Any
) -> None:
'''
:keyword backup_id: The unique identifier of backup.
:paramtype backup_id: str
:keyword backup_state: The current state of the backup. Known values are: "Initiated",
"InProgress", "Succeeded", and "Failed".
:paramtype backup_state: str or ~azure.mgmt.cosmosdb.models.BackupState
:keyword backup_start_timestamp: The time at which the backup process begins.
:paramtype backup_start_timestamp: ~datetime.datetime
:keyword backup_stop_timestamp: The time at which the backup process ends.
:paramtype backup_stop_timestamp: ~datetime.datetime
:keyword backup_expiry_timestamp: The time at which the backup will expire.
:paramtype backup_expiry_timestamp: ~datetime.datetime
'''
pass
| 2 | 2 | 29 | 0 | 16 | 13 | 1 | 1.08 | 1 | 4 | 0 | 0 | 1 | 5 | 1 | 16 | 53 | 3 | 24 | 17 | 13 | 26 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
10,015 |
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.BackupSchedule
|
class BackupSchedule(_serialization.Model):
"""BackupSchedule.
:ivar schedule_name: The unique identifier of backup schedule.
:vartype schedule_name: str
:ivar cron_expression: The cron expression that defines when you want to back up your data.
:vartype cron_expression: str
:ivar retention_in_hours: The retention period (hours) of the backups. If you want to retain
data forever, set retention to 0.
:vartype retention_in_hours: int
"""
_attribute_map = {
"schedule_name": {"key": "scheduleName", "type": "str"},
"cron_expression": {"key": "cronExpression", "type": "str"},
"retention_in_hours": {"key": "retentionInHours", "type": "int"},
}
def __init__(
self,
*,
schedule_name: Optional[str] = None,
cron_expression: Optional[str] = None,
retention_in_hours: Optional[int] = None,
**kwargs: Any
) -> None:
"""
:keyword schedule_name: The unique identifier of backup schedule.
:paramtype schedule_name: str
:keyword cron_expression: The cron expression that defines when you want to back up your data.
:paramtype cron_expression: str
:keyword retention_in_hours: The retention period (hours) of the backups. If you want to retain
data forever, set retention to 0.
:paramtype retention_in_hours: int
"""
super().__init__(**kwargs)
self.schedule_name = schedule_name
self.cron_expression = cron_expression
self.retention_in_hours = retention_in_hours
|
class BackupSchedule(_serialization.Model):
'''BackupSchedule.
:ivar schedule_name: The unique identifier of backup schedule.
:vartype schedule_name: str
:ivar cron_expression: The cron expression that defines when you want to back up your data.
:vartype cron_expression: str
:ivar retention_in_hours: The retention period (hours) of the backups. If you want to retain
data forever, set retention to 0.
:vartype retention_in_hours: int
'''
def __init__(
self,
*,
schedule_name: Optional[str] = None,
cron_expression: Optional[str] = None,
retention_in_hours: Optional[int] = None,
**kwargs: Any
) -> None:
'''
:keyword schedule_name: The unique identifier of backup schedule.
:paramtype schedule_name: str
:keyword cron_expression: The cron expression that defines when you want to back up your data.
:paramtype cron_expression: str
:keyword retention_in_hours: The retention period (hours) of the backups. If you want to retain
data forever, set retention to 0.
:paramtype retention_in_hours: int
'''
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 |
10,016 |
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.BaseCosmosDataTransferDataSourceSink
|
class BaseCosmosDataTransferDataSourceSink(DataTransferDataSourceSink):
"""A base CosmosDB data source/sink.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
CosmosCassandraDataTransferDataSourceSink, CosmosMongoDataTransferDataSourceSink,
CosmosSqlDataTransferDataSourceSink
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
"""
_validation = {
"component": {"required": True},
}
_attribute_map = {
"component": {"key": "component", "type": "str"},
"remote_account_name": {"key": "remoteAccountName", "type": "str"},
}
_subtype_map = {
"component": {
"CosmosDBCassandra": "CosmosCassandraDataTransferDataSourceSink",
"CosmosDBMongo": "CosmosMongoDataTransferDataSourceSink",
"CosmosDBSql": "CosmosSqlDataTransferDataSourceSink",
}
}
def __init__(self, *, remote_account_name: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword remote_account_name:
:paramtype remote_account_name: str
"""
super().__init__(**kwargs)
self.component: str = "BaseCosmosDataTransferDataSourceSink"
self.remote_account_name = remote_account_name
|
class BaseCosmosDataTransferDataSourceSink(DataTransferDataSourceSink):
'''A base CosmosDB data source/sink.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
CosmosCassandraDataTransferDataSourceSink, CosmosMongoDataTransferDataSourceSink,
CosmosSqlDataTransferDataSourceSink
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
'''
def __init__(self, *, remote_account_name: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword remote_account_name:
:paramtype remote_account_name: str
'''
pass
| 2 | 2 | 8 | 0 | 4 | 4 | 1 | 0.79 | 1 | 3 | 0 | 3 | 1 | 2 | 1 | 17 | 41 | 7 | 19 | 7 | 17 | 15 | 8 | 7 | 6 | 1 | 3 | 0 | 1 |
10,017 |
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.Capability
|
class Capability(_serialization.Model):
"""Cosmos DB capability object.
:ivar name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current
values also include "EnableTable" and "EnableGremlin".
:vartype name: str
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
}
def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra".
Current values also include "EnableTable" and "EnableGremlin".
:paramtype name: str
"""
super().__init__(**kwargs)
self.name = name
|
class Capability(_serialization.Model):
'''Cosmos DB capability object.
:ivar name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current
values also include "EnableTable" and "EnableGremlin".
:vartype name: str
'''
def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra".
Current values also include "EnableTable" and "EnableGremlin".
:paramtype name: str
'''
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 |
10,018 |
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.Capacity
|
class Capacity(_serialization.Model):
"""The object that represents all properties related to capacity enforcement on an account.
:ivar total_throughput_limit: The total throughput limit imposed on the account. A
totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned
on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of
throughput.
:vartype total_throughput_limit: int
"""
_validation = {
"total_throughput_limit": {"minimum": -1},
}
_attribute_map = {
"total_throughput_limit": {"key": "totalThroughputLimit", "type": "int"},
}
def __init__(self, *, total_throughput_limit: Optional[int] = None, **kwargs: Any) -> None:
"""
:keyword total_throughput_limit: The total throughput limit imposed on the account. A
totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned
on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of
throughput.
:paramtype total_throughput_limit: int
"""
super().__init__(**kwargs)
self.total_throughput_limit = total_throughput_limit
|
class Capacity(_serialization.Model):
'''The object that represents all properties related to capacity enforcement on an account.
:ivar total_throughput_limit: The total throughput limit imposed on the account. A
totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned
on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of
throughput.
:vartype total_throughput_limit: int
'''
def __init__(self, *, total_throughput_limit: Optional[int] = None, **kwargs: Any) -> None:
'''
:keyword total_throughput_limit: The total throughput limit imposed on the account. A
totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned
on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of
throughput.
:paramtype total_throughput_limit: int
'''
pass
| 2 | 2 | 10 | 0 | 3 | 7 | 1 | 1.4 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 16 | 28 | 4 | 10 | 5 | 8 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,019 |
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.CapacityModeChangeTransitionState
|
class CapacityModeChangeTransitionState(_serialization.Model):
"""The transition state information related capacity mode change with update request.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar capacity_mode_transition_status: The transition status of capacity mode. Known values
are: "Invalid", "Initialized", "InProgress", "Completed", and "Failed".
:vartype capacity_mode_transition_status: str or
~azure.mgmt.cosmosdb.models.CapacityModeTransitionStatus
:ivar current_capacity_mode: Indicates the current capacity mode of the account. Known values
are: "None", "Provisioned", and "Serverless".
:vartype current_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
:ivar previous_capacity_mode: Indicates the previous capacity mode of the account before
successful transition. Known values are: "None", "Provisioned", and "Serverless".
:vartype previous_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
:ivar capacity_mode_transition_begin_timestamp: Begin time in UTC of the capacity mode change.
:vartype capacity_mode_transition_begin_timestamp: ~datetime.datetime
:ivar capacity_mode_transition_end_timestamp: End time in UTC of the capacity mode change.
:vartype capacity_mode_transition_end_timestamp: ~datetime.datetime
:ivar capacity_mode_last_successful_transition_end_timestamp: End time in UTC of the last
successful capacity mode change.
:vartype capacity_mode_last_successful_transition_end_timestamp: ~datetime.datetime
"""
_validation = {
"capacity_mode_transition_begin_timestamp": {"readonly": True},
"capacity_mode_transition_end_timestamp": {"readonly": True},
"capacity_mode_last_successful_transition_end_timestamp": {"readonly": True},
}
_attribute_map = {
"capacity_mode_transition_status": {"key": "capacityModeTransitionStatus", "type": "str"},
"current_capacity_mode": {"key": "currentCapacityMode", "type": "str"},
"previous_capacity_mode": {"key": "previousCapacityMode", "type": "str"},
"capacity_mode_transition_begin_timestamp": {"key": "capacityModeTransitionBeginTimestamp", "type": "iso-8601"},
"capacity_mode_transition_end_timestamp": {"key": "capacityModeTransitionEndTimestamp", "type": "iso-8601"},
"capacity_mode_last_successful_transition_end_timestamp": {
"key": "capacityModeLastSuccessfulTransitionEndTimestamp",
"type": "iso-8601",
},
}
def __init__(
self,
*,
capacity_mode_transition_status: Optional[Union[str, "_models.CapacityModeTransitionStatus"]] = None,
current_capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None,
previous_capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None,
**kwargs: Any
) -> None:
"""
:keyword capacity_mode_transition_status: The transition status of capacity mode. Known values
are: "Invalid", "Initialized", "InProgress", "Completed", and "Failed".
:paramtype capacity_mode_transition_status: str or
~azure.mgmt.cosmosdb.models.CapacityModeTransitionStatus
:keyword current_capacity_mode: Indicates the current capacity mode of the account. Known
values are: "None", "Provisioned", and "Serverless".
:paramtype current_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
:keyword previous_capacity_mode: Indicates the previous capacity mode of the account before
successful transition. Known values are: "None", "Provisioned", and "Serverless".
:paramtype previous_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
"""
super().__init__(**kwargs)
self.capacity_mode_transition_status = capacity_mode_transition_status
self.current_capacity_mode = current_capacity_mode
self.previous_capacity_mode = previous_capacity_mode
self.capacity_mode_transition_begin_timestamp = None
self.capacity_mode_transition_end_timestamp = None
self.capacity_mode_last_successful_transition_end_timestamp = None
|
class CapacityModeChangeTransitionState(_serialization.Model):
'''The transition state information related capacity mode change with update request.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar capacity_mode_transition_status: The transition status of capacity mode. Known values
are: "Invalid", "Initialized", "InProgress", "Completed", and "Failed".
:vartype capacity_mode_transition_status: str or
~azure.mgmt.cosmosdb.models.CapacityModeTransitionStatus
:ivar current_capacity_mode: Indicates the current capacity mode of the account. Known values
are: "None", "Provisioned", and "Serverless".
:vartype current_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
:ivar previous_capacity_mode: Indicates the previous capacity mode of the account before
successful transition. Known values are: "None", "Provisioned", and "Serverless".
:vartype previous_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
:ivar capacity_mode_transition_begin_timestamp: Begin time in UTC of the capacity mode change.
:vartype capacity_mode_transition_begin_timestamp: ~datetime.datetime
:ivar capacity_mode_transition_end_timestamp: End time in UTC of the capacity mode change.
:vartype capacity_mode_transition_end_timestamp: ~datetime.datetime
:ivar capacity_mode_last_successful_transition_end_timestamp: End time in UTC of the last
successful capacity mode change.
:vartype capacity_mode_last_successful_transition_end_timestamp: ~datetime.datetime
'''
def __init__(
self,
*,
capacity_mode_transition_status: Optional[Union[str, "_models.CapacityModeTransitionStatus"]] = None,
current_capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None,
previous_capacity_mode: Optional[Union[str, "_models.CapacityMode"]] = None,
**kwargs: Any
) -> None:
'''
:keyword capacity_mode_transition_status: The transition status of capacity mode. Known values
are: "Invalid", "Initialized", "InProgress", "Completed", and "Failed".
:paramtype capacity_mode_transition_status: str or
~azure.mgmt.cosmosdb.models.CapacityModeTransitionStatus
:keyword current_capacity_mode: Indicates the current capacity mode of the account. Known
values are: "None", "Provisioned", and "Serverless".
:paramtype current_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
:keyword previous_capacity_mode: Indicates the previous capacity mode of the account before
successful transition. Known values are: "None", "Provisioned", and "Serverless".
:paramtype previous_capacity_mode: str or ~azure.mgmt.cosmosdb.models.CapacityMode
'''
pass
| 2 | 2 | 27 | 0 | 15 | 12 | 1 | 1 | 1 | 3 | 0 | 0 | 1 | 6 | 1 | 16 | 69 | 5 | 32 | 17 | 23 | 32 | 11 | 10 | 9 | 1 | 2 | 0 | 1 |
10,020 |
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.CassandraClusterDataCenterNodeItem
|
class CassandraClusterDataCenterNodeItem(_serialization.Model):
"""CassandraClusterDataCenterNodeItem.
:ivar address: The node's IP address.
:vartype address: str
:ivar state: The state of the node in Cassandra ring. Known values are: "Normal", "Leaving",
"Joining", "Moving", and "Stopped".
:vartype state: str or ~azure.mgmt.cosmosdb.models.NodeState
:ivar status:
:vartype status: str
:ivar cassandra_process_status: Cassandra service status on this node.
:vartype cassandra_process_status: str
:ivar load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding
all content in the snapshots subdirectories. Because all SSTable data files are included, any
data that is not cleaned up (such as TTL-expired cells or tombstones) is counted.
:vartype load: str
:ivar tokens: List of tokens this node covers.
:vartype tokens: list[str]
:ivar size:
:vartype size: int
:ivar host_id: The network ID of the node.
:vartype host_id: str
:ivar rack: The rack this node is part of.
:vartype rack: str
:ivar timestamp: The timestamp when these statistics were captured.
:vartype timestamp: str
:ivar disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra.
:vartype disk_used_kb: int
:ivar disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra.
:vartype disk_free_kb: int
:ivar memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB.
:vartype memory_used_kb: int
:ivar memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo)
and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB.
:vartype memory_buffers_and_cached_kb: int
:ivar memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB.
:vartype memory_free_kb: int
:ivar memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB.
:vartype memory_total_kb: int
:ivar cpu_usage: A float representing the current system-wide CPU utilization as a percentage.
:vartype cpu_usage: float
:ivar is_latest_model: If node has been updated to latest model.
:vartype is_latest_model: bool
"""
_attribute_map = {
"address": {"key": "address", "type": "str"},
"state": {"key": "state", "type": "str"},
"status": {"key": "status", "type": "str"},
"cassandra_process_status": {"key": "cassandraProcessStatus", "type": "str"},
"load": {"key": "load", "type": "str"},
"tokens": {"key": "tokens", "type": "[str]"},
"size": {"key": "size", "type": "int"},
"host_id": {"key": "hostID", "type": "str"},
"rack": {"key": "rack", "type": "str"},
"timestamp": {"key": "timestamp", "type": "str"},
"disk_used_kb": {"key": "diskUsedKB", "type": "int"},
"disk_free_kb": {"key": "diskFreeKB", "type": "int"},
"memory_used_kb": {"key": "memoryUsedKB", "type": "int"},
"memory_buffers_and_cached_kb": {"key": "memoryBuffersAndCachedKB", "type": "int"},
"memory_free_kb": {"key": "memoryFreeKB", "type": "int"},
"memory_total_kb": {"key": "memoryTotalKB", "type": "int"},
"cpu_usage": {"key": "cpuUsage", "type": "float"},
"is_latest_model": {"key": "isLatestModel", "type": "bool"},
}
def __init__(
self,
*,
address: Optional[str] = None,
state: Optional[Union[str, "_models.NodeState"]] = None,
status: Optional[str] = None,
cassandra_process_status: Optional[str] = None,
load: Optional[str] = None,
tokens: Optional[List[str]] = None,
size: Optional[int] = None,
host_id: Optional[str] = None,
rack: Optional[str] = None,
timestamp: Optional[str] = None,
disk_used_kb: Optional[int] = None,
disk_free_kb: Optional[int] = None,
memory_used_kb: Optional[int] = None,
memory_buffers_and_cached_kb: Optional[int] = None,
memory_free_kb: Optional[int] = None,
memory_total_kb: Optional[int] = None,
cpu_usage: Optional[float] = None,
is_latest_model: Optional[bool] = None,
**kwargs: Any
) -> None:
"""
:keyword address: The node's IP address.
:paramtype address: str
:keyword state: The state of the node in Cassandra ring. Known values are: "Normal", "Leaving",
"Joining", "Moving", and "Stopped".
:paramtype state: str or ~azure.mgmt.cosmosdb.models.NodeState
:keyword status:
:paramtype status: str
:keyword cassandra_process_status: Cassandra service status on this node.
:paramtype cassandra_process_status: str
:keyword load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding
all content in the snapshots subdirectories. Because all SSTable data files are included, any
data that is not cleaned up (such as TTL-expired cells or tombstones) is counted.
:paramtype load: str
:keyword tokens: List of tokens this node covers.
:paramtype tokens: list[str]
:keyword size:
:paramtype size: int
:keyword host_id: The network ID of the node.
:paramtype host_id: str
:keyword rack: The rack this node is part of.
:paramtype rack: str
:keyword timestamp: The timestamp when these statistics were captured.
:paramtype timestamp: str
:keyword disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra.
:paramtype disk_used_kb: int
:keyword disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra.
:paramtype disk_free_kb: int
:keyword memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB.
:paramtype memory_used_kb: int
:keyword memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo)
and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB.
:paramtype memory_buffers_and_cached_kb: int
:keyword memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB.
:paramtype memory_free_kb: int
:keyword memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in
kB.
:paramtype memory_total_kb: int
:keyword cpu_usage: A float representing the current system-wide CPU utilization as a
percentage.
:paramtype cpu_usage: float
:keyword is_latest_model: If node has been updated to latest model.
:paramtype is_latest_model: bool
"""
super().__init__(**kwargs)
self.address = address
self.state = state
self.status = status
self.cassandra_process_status = cassandra_process_status
self.load = load
self.tokens = tokens
self.size = size
self.host_id = host_id
self.rack = rack
self.timestamp = timestamp
self.disk_used_kb = disk_used_kb
self.disk_free_kb = disk_free_kb
self.memory_used_kb = memory_used_kb
self.memory_buffers_and_cached_kb = memory_buffers_and_cached_kb
self.memory_free_kb = memory_free_kb
self.memory_total_kb = memory_total_kb
self.cpu_usage = cpu_usage
self.is_latest_model = is_latest_model
|
class CassandraClusterDataCenterNodeItem(_serialization.Model):
'''CassandraClusterDataCenterNodeItem.
:ivar address: The node's IP address.
:vartype address: str
:ivar state: The state of the node in Cassandra ring. Known values are: "Normal", "Leaving",
"Joining", "Moving", and "Stopped".
:vartype state: str or ~azure.mgmt.cosmosdb.models.NodeState
:ivar status:
:vartype status: str
:ivar cassandra_process_status: Cassandra service status on this node.
:vartype cassandra_process_status: str
:ivar load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding
all content in the snapshots subdirectories. Because all SSTable data files are included, any
data that is not cleaned up (such as TTL-expired cells or tombstones) is counted.
:vartype load: str
:ivar tokens: List of tokens this node covers.
:vartype tokens: list[str]
:ivar size:
:vartype size: int
:ivar host_id: The network ID of the node.
:vartype host_id: str
:ivar rack: The rack this node is part of.
:vartype rack: str
:ivar timestamp: The timestamp when these statistics were captured.
:vartype timestamp: str
:ivar disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra.
:vartype disk_used_kb: int
:ivar disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra.
:vartype disk_free_kb: int
:ivar memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB.
:vartype memory_used_kb: int
:ivar memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo)
and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB.
:vartype memory_buffers_and_cached_kb: int
:ivar memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB.
:vartype memory_free_kb: int
:ivar memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB.
:vartype memory_total_kb: int
:ivar cpu_usage: A float representing the current system-wide CPU utilization as a percentage.
:vartype cpu_usage: float
:ivar is_latest_model: If node has been updated to latest model.
:vartype is_latest_model: bool
'''
def __init__(
self,
*,
address: Optional[str] = None,
state: Optional[Union[str, "_models.NodeState"]] = None,
status: Optional[str] = None,
cassandra_process_status: Optional[str] = None,
load: Optional[str] = None,
tokens: Optional[List[str]] = None,
size: Optional[int] = None,
host_id: Optional[str] = None,
rack: Optional[str] = None,
timestamp: Optional[str] = None,
disk_used_kb: Optional[int] = None,
disk_free_kb: Optional[int] = None,
memory_used_kb: Optional[int] = None,
memory_buffers_and_cached_kb: Optional[int] = None,
memory_free_kb: Optional[int] = None,
memory_total_kb: Optional[int] = None,
cpu_usage: Optional[float] = None,
is_latest_model: Optional[bool] = None,
**kwargs: Any
) -> None:
'''
:keyword address: The node's IP address.
:paramtype address: str
:keyword state: The state of the node in Cassandra ring. Known values are: "Normal", "Leaving",
"Joining", "Moving", and "Stopped".
:paramtype state: str or ~azure.mgmt.cosmosdb.models.NodeState
:keyword status:
:paramtype status: str
:keyword cassandra_process_status: Cassandra service status on this node.
:paramtype cassandra_process_status: str
:keyword load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding
all content in the snapshots subdirectories. Because all SSTable data files are included, any
data that is not cleaned up (such as TTL-expired cells or tombstones) is counted.
:paramtype load: str
:keyword tokens: List of tokens this node covers.
:paramtype tokens: list[str]
:keyword size:
:paramtype size: int
:keyword host_id: The network ID of the node.
:paramtype host_id: str
:keyword rack: The rack this node is part of.
:paramtype rack: str
:keyword timestamp: The timestamp when these statistics were captured.
:paramtype timestamp: str
:keyword disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra.
:paramtype disk_used_kb: int
:keyword disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra.
:paramtype disk_free_kb: int
:keyword memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB.
:paramtype memory_used_kb: int
:keyword memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo)
and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB.
:paramtype memory_buffers_and_cached_kb: int
:keyword memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB.
:paramtype memory_free_kb: int
:keyword memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in
kB.
:paramtype memory_total_kb: int
:keyword cpu_usage: A float representing the current system-wide CPU utilization as a
percentage.
:paramtype cpu_usage: float
:keyword is_latest_model: If node has been updated to latest model.
:paramtype is_latest_model: bool
'''
pass
| 2 | 2 | 86 | 0 | 42 | 44 | 1 | 1.37 | 1 | 6 | 0 | 0 | 1 | 18 | 1 | 16 | 152 | 3 | 63 | 43 | 39 | 86 | 22 | 21 | 20 | 1 | 2 | 0 | 1 |
10,021 |
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.CassandraClusterPublicStatus
|
class CassandraClusterPublicStatus(_serialization.Model):
"""Properties of a managed Cassandra cluster public status.
:ivar e_tag:
:vartype e_tag: str
:ivar reaper_status:
:vartype reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus
:ivar connection_errors: List relevant information about any connection errors to the
Datacenters.
:vartype connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError]
:ivar errors: List relevant information about any errors about cluster, data center and
connection error.
:vartype errors: list[~azure.mgmt.cosmosdb.models.CassandraError]
:ivar data_centers: List of the status of each datacenter in this cluster.
:vartype data_centers:
list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem]
"""
_attribute_map = {
"e_tag": {"key": "eTag", "type": "str"},
"reaper_status": {"key": "reaperStatus", "type": "ManagedCassandraReaperStatus"},
"connection_errors": {"key": "connectionErrors", "type": "[ConnectionError]"},
"errors": {"key": "errors", "type": "[CassandraError]"},
"data_centers": {"key": "dataCenters", "type": "[CassandraClusterPublicStatusDataCentersItem]"},
}
def __init__(
self,
*,
e_tag: Optional[str] = None,
reaper_status: Optional["_models.ManagedCassandraReaperStatus"] = None,
connection_errors: Optional[List["_models.ConnectionError"]] = None,
errors: Optional[List["_models.CassandraError"]] = None,
data_centers: Optional[List["_models.CassandraClusterPublicStatusDataCentersItem"]] = None,
**kwargs: Any
) -> None:
"""
:keyword e_tag:
:paramtype e_tag: str
:keyword reaper_status:
:paramtype reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus
:keyword connection_errors: List relevant information about any connection errors to the
Datacenters.
:paramtype connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError]
:keyword errors: List relevant information about any errors about cluster, data center and
connection error.
:paramtype errors: list[~azure.mgmt.cosmosdb.models.CassandraError]
:keyword data_centers: List of the status of each datacenter in this cluster.
:paramtype data_centers:
list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem]
"""
super().__init__(**kwargs)
self.e_tag = e_tag
self.reaper_status = reaper_status
self.connection_errors = connection_errors
self.errors = errors
self.data_centers = data_centers
|
class CassandraClusterPublicStatus(_serialization.Model):
'''Properties of a managed Cassandra cluster public status.
:ivar e_tag:
:vartype e_tag: str
:ivar reaper_status:
:vartype reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus
:ivar connection_errors: List relevant information about any connection errors to the
Datacenters.
:vartype connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError]
:ivar errors: List relevant information about any errors about cluster, data center and
connection error.
:vartype errors: list[~azure.mgmt.cosmosdb.models.CassandraError]
:ivar data_centers: List of the status of each datacenter in this cluster.
:vartype data_centers:
list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem]
'''
def __init__(
self,
*,
e_tag: Optional[str] = None,
reaper_status: Optional["_models.ManagedCassandraReaperStatus"] = None,
connection_errors: Optional[List["_models.ConnectionError"]] = None,
errors: Optional[List["_models.CassandraError"]] = None,
data_centers: Optional[List["_models.CassandraClusterPublicStatusDataCentersItem"]] = None,
**kwargs: Any
) -> None:
'''
:keyword e_tag:
:paramtype e_tag: str
:keyword reaper_status:
:paramtype reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus
:keyword connection_errors: List relevant information about any connection errors to the
Datacenters.
:paramtype connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError]
:keyword errors: List relevant information about any errors about cluster, data center and
connection error.
:paramtype errors: list[~azure.mgmt.cosmosdb.models.CassandraError]
:keyword data_centers: List of the status of each datacenter in this cluster.
:paramtype data_centers:
list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem]
'''
pass
| 2 | 2 | 31 | 0 | 16 | 15 | 1 | 1.25 | 1 | 3 | 0 | 0 | 1 | 5 | 1 | 16 | 57 | 3 | 24 | 17 | 13 | 30 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
10,022 |
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.CassandraClusterPublicStatusDataCentersItem
|
class CassandraClusterPublicStatusDataCentersItem(_serialization.Model): # pylint: disable=name-too-long
"""CassandraClusterPublicStatusDataCentersItem.
:ivar name: The name of this Datacenter.
:vartype name: str
:ivar seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged.
:vartype seed_nodes: list[str]
:ivar nodes:
:vartype nodes: list[~azure.mgmt.cosmosdb.models.CassandraClusterDataCenterNodeItem]
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
"seed_nodes": {"key": "seedNodes", "type": "[str]"},
"nodes": {"key": "nodes", "type": "[CassandraClusterDataCenterNodeItem]"},
}
def __init__(
self,
*,
name: Optional[str] = None,
seed_nodes: Optional[List[str]] = None,
nodes: Optional[List["_models.CassandraClusterDataCenterNodeItem"]] = None,
**kwargs: Any
) -> None:
"""
:keyword name: The name of this Datacenter.
:paramtype name: str
:keyword seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged.
:paramtype seed_nodes: list[str]
:keyword nodes:
:paramtype nodes: list[~azure.mgmt.cosmosdb.models.CassandraClusterDataCenterNodeItem]
"""
super().__init__(**kwargs)
self.name = name
self.seed_nodes = seed_nodes
self.nodes = nodes
|
class CassandraClusterPublicStatusDataCentersItem(_serialization.Model):
'''CassandraClusterPublicStatusDataCentersItem.
:ivar name: The name of this Datacenter.
:vartype name: str
:ivar seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged.
:vartype seed_nodes: list[str]
:ivar nodes:
:vartype nodes: list[~azure.mgmt.cosmosdb.models.CassandraClusterDataCenterNodeItem]
'''
def __init__(
self,
*,
name: Optional[str] = None,
seed_nodes: Optional[List[str]] = None,
nodes: Optional[List["_models.CassandraClusterDataCenterNodeItem"]] = None,
**kwargs: Any
) -> None:
'''
:keyword name: The name of this Datacenter.
:paramtype name: str
:keyword seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged.
:paramtype seed_nodes: list[str]
:keyword nodes:
:paramtype nodes: list[~azure.mgmt.cosmosdb.models.CassandraClusterDataCenterNodeItem]
'''
pass
| 2 | 2 | 20 | 0 | 12 | 8 | 1 | 0.94 | 1 | 3 | 0 | 0 | 1 | 3 | 1 | 16 | 37 | 3 | 18 | 13 | 9 | 17 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
10,023 |
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.CassandraError
|
class CassandraError(_serialization.Model):
"""CassandraError.
:ivar code: The code of error that occurred.
:vartype code: str
:ivar message: The message of the error.
:vartype message: str
:ivar target: The target resource of the error.
:vartype target: str
:ivar additional_error_info: Additional information about the error.
:vartype additional_error_info: str
"""
_attribute_map = {
"code": {"key": "code", "type": "str"},
"message": {"key": "message", "type": "str"},
"target": {"key": "target", "type": "str"},
"additional_error_info": {"key": "additionalErrorInfo", "type": "str"},
}
def __init__(
self,
*,
code: Optional[str] = None,
message: Optional[str] = None,
target: Optional[str] = None,
additional_error_info: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword code: The code of error that occurred.
:paramtype code: str
:keyword message: The message of the error.
:paramtype message: str
:keyword target: The target resource of the error.
:paramtype target: str
:keyword additional_error_info: Additional information about the error.
:paramtype additional_error_info: str
"""
super().__init__(**kwargs)
self.code = code
self.message = message
self.target = target
self.additional_error_info = additional_error_info
|
class CassandraError(_serialization.Model):
'''CassandraError.
:ivar code: The code of error that occurred.
:vartype code: str
:ivar message: The message of the error.
:vartype message: str
:ivar target: The target resource of the error.
:vartype target: str
:ivar additional_error_info: Additional information about the error.
:vartype additional_error_info: str
'''
def __init__(
self,
*,
code: Optional[str] = None,
message: Optional[str] = None,
target: Optional[str] = None,
additional_error_info: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword code: The code of error that occurred.
:paramtype code: str
:keyword message: The message of the error.
:paramtype message: str
:keyword target: The target resource of the error.
:paramtype target: str
:keyword additional_error_info: Additional information about the error.
:paramtype additional_error_info: str
'''
pass
| 2 | 2 | 24 | 0 | 14 | 10 | 1 | 0.95 | 1 | 3 | 0 | 0 | 1 | 4 | 1 | 16 | 44 | 3 | 21 | 15 | 11 | 20 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
10,024 |
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.CassandraKeyspaceCreateUpdateParameters
|
class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties):
"""Parameters to create and update Cosmos DB Cassandra keyspace.
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 Cassandra keyspace. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource
: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": "CassandraKeyspaceResource"},
"options": {"key": "properties.options", "type": "CreateUpdateOptions"},
}
def __init__(
self,
*,
resource: "_models.CassandraKeyspaceResource",
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 Cassandra keyspace. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource
: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 CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties):
'''Parameters to create and update Cosmos DB Cassandra keyspace.
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 Cassandra keyspace. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource
: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.CassandraKeyspaceResource",
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 Cassandra keyspace. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource
: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 |
10,025 |
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/incident/comment/_delete.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._delete.Delete.IncidentCommentsDelete
|
class IncidentCommentsDelete(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/incidents/{incidentId}/comments/{incidentCommentId}",
**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(
"incidentCommentId", self.ctx.args.incident_comment_id,
required=True,
),
**self.serialize_url_param(
"incidentId", self.ctx.args.incident_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 IncidentCommentsDelete(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 |
10,026 |
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.CassandraViewGetPropertiesOptions
|
class CassandraViewGetPropertiesOptions(OptionsResource):
"""CassandraViewGetPropertiesOptions.
: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 CassandraViewGetPropertiesOptions(OptionsResource):
'''CassandraViewGetPropertiesOptions.
: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 |
10,027 |
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.CassandraViewGetPropertiesResource
|
class CassandraViewGetPropertiesResource(CassandraViewResource, ExtendedResourceProperties):
"""CassandraViewGetPropertiesResource.
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 Cassandra view. Required.
:vartype id: str
:ivar view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:vartype view_definition: str
"""
_validation = {
"rid": {"readonly": True},
"ts": {"readonly": True},
"etag": {"readonly": True},
"id": {"required": True},
"view_definition": {"required": True},
}
_attribute_map = {
"rid": {"key": "_rid", "type": "str"},
"ts": {"key": "_ts", "type": "float"},
"etag": {"key": "_etag", "type": "str"},
"id": {"key": "id", "type": "str"},
"view_definition": {"key": "viewDefinition", "type": "str"},
}
def __init__(self, *, id: str, view_definition: str, **kwargs: Any) -> None: # pylint: disable=redefined-builtin
"""
:keyword id: Name of the Cosmos DB Cassandra view. Required.
:paramtype id: str
:keyword view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:paramtype view_definition: str
"""
super().__init__(id=id, view_definition=view_definition, **kwargs)
self.rid = None
self.ts = None
self.etag = None
self.id = id
self.view_definition = view_definition
|
class CassandraViewGetPropertiesResource(CassandraViewResource, ExtendedResourceProperties):
'''CassandraViewGetPropertiesResource.
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 Cassandra view. Required.
:vartype id: str
:ivar view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:vartype view_definition: str
'''
def __init__(self, *, id: str, view_definition: str, **kwargs: Any) -> None:
'''
:keyword id: Name of the Cosmos DB Cassandra view. Required.
:paramtype id: str
:keyword view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:paramtype view_definition: str
'''
pass
| 2 | 2 | 13 | 0 | 7 | 7 | 1 | 1 | 2 | 3 | 0 | 0 | 1 | 5 | 1 | 18 | 49 | 6 | 22 | 9 | 20 | 22 | 10 | 9 | 8 | 1 | 3 | 0 | 1 |
10,028 |
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.CassandraViewGetResults
|
class CassandraViewGetResults(ARMResourceProperties):
"""An Azure Cosmos DB Cassandra view.
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.CassandraViewGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions
"""
_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": "CassandraViewGetPropertiesResource"},
"options": {"key": "properties.options", "type": "CassandraViewGetPropertiesOptions"},
}
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.CassandraViewGetPropertiesResource"] = None,
options: Optional["_models.CassandraViewGetPropertiesOptions"] = 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.CassandraViewGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class CassandraViewGetResults(ARMResourceProperties):
'''An Azure Cosmos DB Cassandra view.
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.CassandraViewGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions
'''
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.CassandraViewGetPropertiesResource"] = None,
options: Optional["_models.CassandraViewGetPropertiesOptions"] = 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.CassandraViewGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions
'''
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 |
10,029 |
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/incident/_create.py
|
azext_sentinel.aaz.latest.sentinel.incident._create.Create.IncidentsCreateOrUpdate
|
class IncidentsCreateOrUpdate(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/incidents/{incidentId}",
**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(
"incidentId", self.ctx.args.incident_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(
"classification", AAZStrType, ".classification")
properties.set_prop("classificationComment",
AAZStrType, ".classification_comment")
properties.set_prop("classificationReason",
AAZStrType, ".classification_reason")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("firstActivityTimeUtc",
AAZStrType, ".first_activity_time_utc")
properties.set_prop("labels", AAZListType, ".labels")
properties.set_prop("lastActivityTimeUtc",
AAZStrType, ".last_activity_time_utc")
properties.set_prop("owner", AAZObjectType, ".owner")
properties.set_prop("providerIncidentId",
AAZStrType, ".provider_incident_id")
properties.set_prop(
"providerName", AAZStrType, ".provider_name")
properties.set_prop("severity", AAZStrType, ".severity", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("status", AAZStrType, ".status", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("title", AAZStrType, ".title", typ_kwargs={
"flags": {"required": True}})
labels = _builder.get(".properties.labels")
if labels is not None:
labels.set_elements(AAZObjectType)
_elements = _builder.get(".properties.labels[]")
if _elements is not None:
_elements.set_prop("labelName", AAZStrType, ".label_name", typ_kwargs={
"flags": {"required": True}})
owner = _builder.get(".properties.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")
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.additional_data = AAZObjectType(
serialized_name="additionalData",
flags={"read_only": True},
)
properties.classification = AAZStrType()
properties.classification_comment = AAZStrType(
serialized_name="classificationComment",
)
properties.classification_reason = AAZStrType(
serialized_name="classificationReason",
)
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.first_activity_time_utc = AAZStrType(
serialized_name="firstActivityTimeUtc",
)
properties.incident_number = AAZIntType(
serialized_name="incidentNumber",
flags={"read_only": True},
)
properties.incident_url = AAZStrType(
serialized_name="incidentUrl",
flags={"read_only": True},
)
properties.labels = AAZListType()
properties.last_activity_time_utc = AAZStrType(
serialized_name="lastActivityTimeUtc",
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.owner = AAZObjectType()
properties.provider_incident_id = AAZStrType(
serialized_name="providerIncidentId",
)
properties.provider_name = AAZStrType(
serialized_name="providerName",
)
properties.related_analytic_rule_ids = AAZListType(
serialized_name="relatedAnalyticRuleIds",
flags={"read_only": True},
)
properties.severity = AAZStrType(
flags={"required": True},
)
properties.status = AAZStrType(
flags={"required": True},
)
properties.team_information = AAZObjectType(
serialized_name="teamInformation",
)
properties.title = AAZStrType(
flags={"required": True},
)
additional_data = cls._schema_on_200_201.properties.additional_data
additional_data.alert_product_names = AAZListType(
serialized_name="alertProductNames",
flags={"read_only": True},
)
additional_data.alerts_count = AAZIntType(
serialized_name="alertsCount",
flags={"read_only": True},
)
additional_data.bookmarks_count = AAZIntType(
serialized_name="bookmarksCount",
flags={"read_only": True},
)
additional_data.comments_count = AAZIntType(
serialized_name="commentsCount",
flags={"read_only": True},
)
additional_data.provider_incident_url = AAZStrType(
serialized_name="providerIncidentUrl",
flags={"read_only": True},
)
additional_data.tactics = AAZListType(
flags={"read_only": True},
)
additional_data.techniques = AAZListType(
flags={"read_only": True},
)
alert_product_names = cls._schema_on_200_201.properties.additional_data.alert_product_names
alert_product_names.Element = AAZStrType(
flags={"read_only": True},
)
tactics = cls._schema_on_200_201.properties.additional_data.tactics
tactics.Element = AAZStrType(
flags={"read_only": True},
)
techniques = cls._schema_on_200_201.properties.additional_data.techniques
techniques.Element = AAZStrType(
flags={"read_only": True},
)
labels = cls._schema_on_200_201.properties.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.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.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",
)
related_analytic_rule_ids = cls._schema_on_200_201.properties.related_analytic_rule_ids
related_analytic_rule_ids.Element = AAZStrType(
flags={"read_only": True},
)
team_information = cls._schema_on_200_201.properties.team_information
team_information.description = AAZStrType(
flags={"read_only": True},
)
team_information.name = AAZStrType(
flags={"read_only": True},
)
team_information.primary_channel_url = AAZStrType(
serialized_name="primaryChannelUrl",
flags={"read_only": True},
)
team_information.team_creation_time_utc = AAZStrType(
serialized_name="teamCreationTimeUtc",
flags={"read_only": True},
)
team_information.team_id = AAZStrType(
serialized_name="teamId",
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},
)
return cls._schema_on_200_201
|
class IncidentsCreateOrUpdate(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 | 31 | 2 | 29 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 333 | 31 | 302 | 44 | 283 | 0 | 133 | 36 | 122 | 5 | 1 | 1 | 16 |
10,030 |
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/entity_query/template/_show.py
|
azext_sentinel.aaz.latest.sentinel.entity_query.template._show.Show.EntityQueryTemplatesGet
|
class EntityQueryTemplatesGet(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/entityQueryTemplates/{entityQueryTemplateId}",
**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(
"entityQueryTemplateId", self.ctx.args.entity_query_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_activity = cls._schema_on_200.discriminate_by(
"kind", "Activity")
disc_activity.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties
properties.content = AAZStrType()
properties.data_types = AAZListType(
serialized_name="dataTypes",
)
properties.description = AAZStrType()
properties.entities_filter = AAZDictType(
serialized_name="entitiesFilter",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.query_definitions = AAZObjectType(
serialized_name="queryDefinitions",
)
properties.required_input_fields_sets = AAZListType(
serialized_name="requiredInputFieldsSets",
)
properties.title = AAZStrType()
data_types = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.data_types
data_types.Element = AAZObjectType()
_element = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.data_types.Element
_element.data_type = AAZStrType(
serialized_name="dataType",
)
entities_filter = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.entities_filter
entities_filter.Element = AAZListType()
_element = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.entities_filter.Element
_element.Element = AAZStrType()
query_definitions = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.query_definitions
query_definitions.query = AAZStrType()
query_definitions.summarize_by = AAZStrType(
serialized_name="summarizeBy",
)
required_input_fields_sets = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets
required_input_fields_sets.Element = AAZListType()
_element = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets.Element
_element.Element = AAZStrType()
return cls._schema_on_200
|
class EntityQueryTemplatesGet(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 | 18 | 2 | 16 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 180 | 24 | 156 | 34 | 139 | 0 | 71 | 27 | 61 | 2 | 1 | 1 | 11 |
10,031 |
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/entity_query/template/_list.py
|
azext_sentinel.aaz.latest.sentinel.entity_query.template._list.List.EntityQueryTemplatesList
|
class EntityQueryTemplatesList(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/entityQueryTemplates",
**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(
"kind", self.ctx.args.kind,
),
**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_activity = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity")
disc_activity.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties
properties.content = AAZStrType()
properties.data_types = AAZListType(
serialized_name="dataTypes",
)
properties.description = AAZStrType()
properties.entities_filter = AAZDictType(
serialized_name="entitiesFilter",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.query_definitions = AAZObjectType(
serialized_name="queryDefinitions",
)
properties.required_input_fields_sets = AAZListType(
serialized_name="requiredInputFieldsSets",
)
properties.title = AAZStrType()
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.data_types
data_types.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.data_types.Element
_element.data_type = AAZStrType(
serialized_name="dataType",
)
entities_filter = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.entities_filter
entities_filter.Element = AAZListType()
_element = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.entities_filter.Element
_element.Element = AAZStrType()
query_definitions = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.query_definitions
query_definitions.query = AAZStrType()
query_definitions.summarize_by = AAZStrType(
serialized_name="summarizeBy",
)
required_input_fields_sets = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets
required_input_fields_sets.Element = AAZListType()
_element = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets.Element
_element.Element = AAZStrType()
return cls._schema_on_200
|
class EntityQueryTemplatesList(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 | 2 | 17 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 191 | 26 | 165 | 35 | 148 | 0 | 76 | 28 | 66 | 2 | 1 | 1 | 11 |
10,032 |
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/entity_query/_update.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._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", "Activity", AAZStrType, ".activity", typ_kwargs={
"flags": {"required": True}})
_builder.discriminate_by("kind", "Activity")
disc_activity = _builder.get("{kind:Activity}")
if disc_activity is not None:
disc_activity.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Activity}.properties")
if properties is not None:
properties.set_prop("content", AAZStrType, ".activity.content")
properties.set_prop("description", AAZStrType,
".activity.description")
properties.set_prop("enabled", AAZBoolType,
".activity.enabled")
properties.set_prop(
"entitiesFilter", AAZDictType, ".activity.entities_filter")
properties.set_prop("inputEntityType",
AAZStrType, ".activity.input_entity_type")
properties.set_prop(
"queryDefinitions", AAZObjectType, ".activity.query_definitions")
properties.set_prop(
"requiredInputFieldsSets", AAZListType, ".activity.required_input_fields_sets")
properties.set_prop("templateName", AAZStrType,
".activity.template_name")
properties.set_prop("title", AAZStrType, ".activity.title")
entities_filter = _builder.get(
"{kind:Activity}.properties.entitiesFilter")
if entities_filter is not None:
entities_filter.set_elements(AAZListType)
_elements = _builder.get(
"{kind:Activity}.properties.entitiesFilter{}")
if _elements is not None:
_elements.set_elements(AAZStrType, ".")
query_definitions = _builder.get(
"{kind:Activity}.properties.queryDefinitions")
if query_definitions is not None:
query_definitions.set_prop("query", AAZStrType, ".query")
required_input_fields_sets = _builder.get(
"{kind:Activity}.properties.requiredInputFieldsSets")
if required_input_fields_sets is not None:
required_input_fields_sets.set_elements(AAZListType)
_elements = _builder.get(
"{kind:Activity}.properties.requiredInputFieldsSets[]")
if _elements is not None:
_elements.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 25 | 4 | 21 | 0 | 5 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 52 | 10 | 42 | 10 | 39 | 0 | 38 | 10 | 35 | 8 | 1 | 1 | 9 |
10,033 |
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/entity_query/_update.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._update.Update.EntityQueriesGet
|
class EntityQueriesGet(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/entityQueries/{entityQueryId}",
**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(
"entityQueryId", self.ctx.args.entity_query_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_entity_query_read(cls._schema_on_200)
return cls._schema_on_200
|
class EntityQueriesGet(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 |
10,034 |
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/entity_query/_update.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._update.Update.EntityQueriesCreateOrUpdate
|
class EntityQueriesCreateOrUpdate(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/entityQueries/{entityQueryId}",
**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(
"entityQueryId", self.ctx.args.entity_query_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,
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_entity_query_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class EntityQueriesCreateOrUpdate(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 |
10,035 |
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/entity_query/_show.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._show.Show.EntityQueriesGet
|
class EntityQueriesGet(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/entityQueries/{entityQueryId}",
**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(
"entityQueryId", self.ctx.args.entity_query_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.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_activity = cls._schema_on_200.discriminate_by(
"kind", "Activity")
disc_activity.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties
properties.content = AAZStrType()
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.enabled = AAZBoolType()
properties.entities_filter = AAZDictType(
serialized_name="entitiesFilter",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.query_definitions = AAZObjectType(
serialized_name="queryDefinitions",
)
properties.required_input_fields_sets = AAZListType(
serialized_name="requiredInputFieldsSets",
)
properties.template_name = AAZStrType(
serialized_name="templateName",
)
properties.title = AAZStrType()
entities_filter = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.entities_filter
entities_filter.Element = AAZListType()
_element = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.entities_filter.Element
_element.Element = AAZStrType()
query_definitions = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.query_definitions
query_definitions.query = AAZStrType()
required_input_fields_sets = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets
required_input_fields_sets.Element = AAZListType()
_element = cls._schema_on_200.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets.Element
_element.Element = AAZStrType()
disc_expansion = cls._schema_on_200.discriminate_by(
"kind", "Expansion")
disc_expansion.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "Expansion").properties
properties.data_sources = AAZListType(
serialized_name="dataSources",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.input_fields = AAZListType(
serialized_name="inputFields",
)
properties.output_entity_types = AAZListType(
serialized_name="outputEntityTypes",
)
properties.query_template = AAZStrType(
serialized_name="queryTemplate",
)
data_sources = cls._schema_on_200.discriminate_by(
"kind", "Expansion").properties.data_sources
data_sources.Element = AAZStrType()
input_fields = cls._schema_on_200.discriminate_by(
"kind", "Expansion").properties.input_fields
input_fields.Element = AAZStrType()
output_entity_types = cls._schema_on_200.discriminate_by(
"kind", "Expansion").properties.output_entity_types
output_entity_types.Element = AAZStrType()
return cls._schema_on_200
|
class EntityQueriesGet(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 | 21 | 2 | 20 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 213 | 27 | 186 | 37 | 169 | 0 | 85 | 30 | 75 | 2 | 1 | 1 | 11 |
10,036 |
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/entity_query/_list.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._list.List.EntityQueriesList
|
class EntityQueriesList(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/entityQueries",
**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(
"kind", self.ctx.args.kind,
),
**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_activity = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity")
disc_activity.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties
properties.content = AAZStrType()
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.enabled = AAZBoolType()
properties.entities_filter = AAZDictType(
serialized_name="entitiesFilter",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.query_definitions = AAZObjectType(
serialized_name="queryDefinitions",
)
properties.required_input_fields_sets = AAZListType(
serialized_name="requiredInputFieldsSets",
)
properties.template_name = AAZStrType(
serialized_name="templateName",
)
properties.title = AAZStrType()
entities_filter = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.entities_filter
entities_filter.Element = AAZListType()
_element = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.entities_filter.Element
_element.Element = AAZStrType()
query_definitions = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.query_definitions
query_definitions.query = AAZStrType()
required_input_fields_sets = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets
required_input_fields_sets.Element = AAZListType()
_element = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets.Element
_element.Element = AAZStrType()
disc_expansion = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Expansion")
disc_expansion.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Expansion").properties
properties.data_sources = AAZListType(
serialized_name="dataSources",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.input_fields = AAZListType(
serialized_name="inputFields",
)
properties.output_entity_types = AAZListType(
serialized_name="outputEntityTypes",
)
properties.query_template = AAZStrType(
serialized_name="queryTemplate",
)
data_sources = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Expansion").properties.data_sources
data_sources.Element = AAZStrType()
input_fields = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Expansion").properties.input_fields
input_fields.Element = AAZStrType()
output_entity_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Expansion").properties.output_entity_types
output_entity_types.Element = AAZStrType()
return cls._schema_on_200
|
class EntityQueriesList(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 | 23 | 2 | 21 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 224 | 29 | 195 | 38 | 178 | 0 | 90 | 31 | 80 | 2 | 1 | 1 | 11 |
10,037 |
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/entity_query/_delete.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._delete.Delete.EntityQueriesDelete
|
class EntityQueriesDelete(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/entityQueries/{entityQueryId}",
**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(
"entityQueryId", self.ctx.args.entity_query_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 EntityQueriesDelete(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 |
10,038 |
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/entity_query/_create.py
|
azext_sentinel.aaz.latest.sentinel.entity_query._create.Create.EntityQueriesCreateOrUpdate
|
class EntityQueriesCreateOrUpdate(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/entityQueries/{entityQueryId}",
**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(
"entityQueryId", self.ctx.args.entity_query_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_const("kind", "Activity", AAZStrType, ".activity", typ_kwargs={
"flags": {"required": True}})
_builder.discriminate_by("kind", "Activity")
disc_activity = _builder.get("{kind:Activity}")
if disc_activity is not None:
disc_activity.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Activity}.properties")
if properties is not None:
properties.set_prop("content", AAZStrType, ".activity.content")
properties.set_prop("description", AAZStrType,
".activity.description")
properties.set_prop("enabled", AAZBoolType,
".activity.enabled")
properties.set_prop(
"entitiesFilter", AAZDictType, ".activity.entities_filter")
properties.set_prop("inputEntityType",
AAZStrType, ".activity.input_entity_type")
properties.set_prop(
"queryDefinitions", AAZObjectType, ".activity.query_definitions")
properties.set_prop(
"requiredInputFieldsSets", AAZListType, ".activity.required_input_fields_sets")
properties.set_prop("templateName", AAZStrType,
".activity.template_name")
properties.set_prop("title", AAZStrType, ".activity.title")
entities_filter = _builder.get(
"{kind:Activity}.properties.entitiesFilter")
if entities_filter is not None:
entities_filter.set_elements(AAZListType)
_elements = _builder.get(
"{kind:Activity}.properties.entitiesFilter{}")
if _elements is not None:
_elements.set_elements(AAZStrType, ".")
query_definitions = _builder.get(
"{kind:Activity}.properties.queryDefinitions")
if query_definitions is not None:
query_definitions.set_prop("query", AAZStrType, ".query")
required_input_fields_sets = _builder.get(
"{kind:Activity}.properties.requiredInputFieldsSets")
if required_input_fields_sets is not None:
required_input_fields_sets.set_elements(AAZListType)
_elements = _builder.get(
"{kind:Activity}.properties.requiredInputFieldsSets[]")
if _elements is not None:
_elements.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_activity = cls._schema_on_200_201.discriminate_by(
"kind", "Activity")
disc_activity.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "Activity").properties
properties.content = AAZStrType()
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.enabled = AAZBoolType()
properties.entities_filter = AAZDictType(
serialized_name="entitiesFilter",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.query_definitions = AAZObjectType(
serialized_name="queryDefinitions",
)
properties.required_input_fields_sets = AAZListType(
serialized_name="requiredInputFieldsSets",
)
properties.template_name = AAZStrType(
serialized_name="templateName",
)
properties.title = AAZStrType()
entities_filter = cls._schema_on_200_201.discriminate_by(
"kind", "Activity").properties.entities_filter
entities_filter.Element = AAZListType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "Activity").properties.entities_filter.Element
_element.Element = AAZStrType()
query_definitions = cls._schema_on_200_201.discriminate_by(
"kind", "Activity").properties.query_definitions
query_definitions.query = AAZStrType()
required_input_fields_sets = cls._schema_on_200_201.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets
required_input_fields_sets.Element = AAZListType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "Activity").properties.required_input_fields_sets.Element
_element.Element = AAZStrType()
disc_expansion = cls._schema_on_200_201.discriminate_by(
"kind", "Expansion")
disc_expansion.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "Expansion").properties
properties.data_sources = AAZListType(
serialized_name="dataSources",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.input_entity_type = AAZStrType(
serialized_name="inputEntityType",
)
properties.input_fields = AAZListType(
serialized_name="inputFields",
)
properties.output_entity_types = AAZListType(
serialized_name="outputEntityTypes",
)
properties.query_template = AAZStrType(
serialized_name="queryTemplate",
)
data_sources = cls._schema_on_200_201.discriminate_by(
"kind", "Expansion").properties.data_sources
data_sources.Element = AAZStrType()
input_fields = cls._schema_on_200_201.discriminate_by(
"kind", "Expansion").properties.input_fields
input_fields.Element = AAZStrType()
output_entity_types = cls._schema_on_200_201.discriminate_by(
"kind", "Expansion").properties.output_entity_types
output_entity_types.Element = AAZStrType()
return cls._schema_on_200_201
|
class EntityQueriesCreateOrUpdate(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 | 24 | 3 | 22 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 265 | 36 | 229 | 46 | 210 | 0 | 120 | 38 | 109 | 8 | 1 | 1 | 19 |
10,039 |
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.CommandOutput
|
class CommandOutput(_serialization.Model):
"""Response of /command api.
:ivar command_output: Output of the command.
:vartype command_output: str
"""
_attribute_map = {
"command_output": {"key": "commandOutput", "type": "str"},
}
def __init__(self, *, command_output: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword command_output: Output of the command.
:paramtype command_output: str
"""
super().__init__(**kwargs)
self.command_output = command_output
|
class CommandOutput(_serialization.Model):
'''Response of /command api.
:ivar command_output: Output of the command.
:vartype command_output: str
'''
def __init__(self, *, command_output: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword command_output: Output of the command.
:paramtype command_output: 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 |
10,040 |
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.CommandPostBody
|
class CommandPostBody(_serialization.Model):
"""Specification of which command to run where.
All required parameters must be populated in order to send to server.
:ivar command: The command which should be run. Required.
:vartype command: str
:ivar arguments: The arguments for the command to be run.
:vartype arguments: dict[str, str]
:ivar host: IP address of the cassandra host to run the command on. Required.
:vartype host: str
:ivar cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:vartype cassandra_stop_start: bool
:ivar readwrite: If true, allows the command to *write* to the cassandra directory, otherwise
read-only.
:vartype readwrite: bool
"""
_validation = {
"command": {"required": True},
"host": {"required": True},
}
_attribute_map = {
"command": {"key": "command", "type": "str"},
"arguments": {"key": "arguments", "type": "{str}"},
"host": {"key": "host", "type": "str"},
"cassandra_stop_start": {"key": "cassandra-stop-start", "type": "bool"},
"readwrite": {"key": "readwrite", "type": "bool"},
}
def __init__(
self,
*,
command: str,
host: str,
arguments: Optional[Dict[str, str]] = None,
cassandra_stop_start: Optional[bool] = None,
readwrite: Optional[bool] = None,
**kwargs: Any
) -> None:
"""
:keyword command: The command which should be run. Required.
:paramtype command: str
:keyword arguments: The arguments for the command to be run.
:paramtype arguments: dict[str, str]
:keyword host: IP address of the cassandra host to run the command on. Required.
:paramtype host: str
:keyword cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:paramtype cassandra_stop_start: bool
:keyword readwrite: If true, allows the command to *write* to the cassandra directory,
otherwise read-only.
:paramtype readwrite: bool
"""
super().__init__(**kwargs)
self.command = command
self.arguments = arguments
self.host = host
self.cassandra_stop_start = cassandra_stop_start
self.readwrite = readwrite
|
class CommandPostBody(_serialization.Model):
'''Specification of which command to run where.
All required parameters must be populated in order to send to server.
:ivar command: The command which should be run. Required.
:vartype command: str
:ivar arguments: The arguments for the command to be run.
:vartype arguments: dict[str, str]
:ivar host: IP address of the cassandra host to run the command on. Required.
:vartype host: str
:ivar cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:vartype cassandra_stop_start: bool
:ivar readwrite: If true, allows the command to *write* to the cassandra directory, otherwise
read-only.
:vartype readwrite: bool
'''
def __init__(
self,
*,
command: str,
host: str,
arguments: Optional[Dict[str, str]] = None,
cassandra_stop_start: Optional[bool] = None,
readwrite: Optional[bool] = None,
**kwargs: Any
) -> None:
'''
:keyword command: The command which should be run. Required.
:paramtype command: str
:keyword arguments: The arguments for the command to be run.
:paramtype arguments: dict[str, str]
:keyword host: IP address of the cassandra host to run the command on. Required.
:paramtype host: str
:keyword cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:paramtype cassandra_stop_start: bool
:keyword readwrite: If true, allows the command to *write* to the cassandra directory,
otherwise read-only.
:paramtype readwrite: bool
'''
pass
| 2 | 2 | 30 | 0 | 16 | 14 | 1 | 1.04 | 1 | 4 | 0 | 0 | 1 | 5 | 1 | 16 | 62 | 5 | 28 | 18 | 17 | 29 | 10 | 9 | 8 | 1 | 2 | 0 | 1 |
10,041 |
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.CommandPublicResource
|
class CommandPublicResource(_serialization.Model):
"""resource representing a command.
:ivar command: The command which should be run.
:vartype command: str
:ivar command_id: The unique id of command.
:vartype command_id: str
:ivar arguments: The arguments for the command to be run.
:vartype arguments: JSON
:ivar host: IP address of the cassandra host to run the command on.
:vartype host: str
:ivar is_admin: Whether command has admin privileges.
:vartype is_admin: bool
:ivar cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:vartype cassandra_stop_start: bool
:ivar read_write: If true, allows the command to *write* to the cassandra directory, otherwise
read-only.
:vartype read_write: bool
:ivar result: Result output of the command.
:vartype result: str
:ivar status: Status of the command. Known values are: "Done", "Running", "Enqueue",
"Processing", "Finished", and "Failed".
:vartype status: str or ~azure.mgmt.cosmosdb.models.CommandStatus
:ivar output_file: The name of the file where the result is written.
:vartype output_file: str
"""
_attribute_map = {
"command": {"key": "command", "type": "str"},
"command_id": {"key": "commandId", "type": "str"},
"arguments": {"key": "arguments", "type": "object"},
"host": {"key": "host", "type": "str"},
"is_admin": {"key": "isAdmin", "type": "bool"},
"cassandra_stop_start": {"key": "cassandraStopStart", "type": "bool"},
"read_write": {"key": "readWrite", "type": "bool"},
"result": {"key": "result", "type": "str"},
"status": {"key": "status", "type": "str"},
"output_file": {"key": "outputFile", "type": "str"},
}
def __init__(
self,
*,
command: Optional[str] = None,
command_id: Optional[str] = None,
arguments: Optional[JSON] = None,
host: Optional[str] = None,
is_admin: Optional[bool] = None,
cassandra_stop_start: Optional[bool] = None,
read_write: Optional[bool] = None,
result: Optional[str] = None,
status: Optional[Union[str, "_models.CommandStatus"]] = None,
output_file: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword command: The command which should be run.
:paramtype command: str
:keyword command_id: The unique id of command.
:paramtype command_id: str
:keyword arguments: The arguments for the command to be run.
:paramtype arguments: JSON
:keyword host: IP address of the cassandra host to run the command on.
:paramtype host: str
:keyword is_admin: Whether command has admin privileges.
:paramtype is_admin: bool
:keyword cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:paramtype cassandra_stop_start: bool
:keyword read_write: If true, allows the command to *write* to the cassandra directory,
otherwise read-only.
:paramtype read_write: bool
:keyword result: Result output of the command.
:paramtype result: str
:keyword status: Status of the command. Known values are: "Done", "Running", "Enqueue",
"Processing", "Finished", and "Failed".
:paramtype status: str or ~azure.mgmt.cosmosdb.models.CommandStatus
:keyword output_file: The name of the file where the result is written.
:paramtype output_file: str
"""
super().__init__(**kwargs)
self.command = command
self.command_id = command_id
self.arguments = arguments
self.host = host
self.is_admin = is_admin
self.cassandra_stop_start = cassandra_stop_start
self.read_write = read_write
self.result = result
self.status = status
self.output_file = output_file
|
class CommandPublicResource(_serialization.Model):
'''resource representing a command.
:ivar command: The command which should be run.
:vartype command: str
:ivar command_id: The unique id of command.
:vartype command_id: str
:ivar arguments: The arguments for the command to be run.
:vartype arguments: JSON
:ivar host: IP address of the cassandra host to run the command on.
:vartype host: str
:ivar is_admin: Whether command has admin privileges.
:vartype is_admin: bool
:ivar cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:vartype cassandra_stop_start: bool
:ivar read_write: If true, allows the command to *write* to the cassandra directory, otherwise
read-only.
:vartype read_write: bool
:ivar result: Result output of the command.
:vartype result: str
:ivar status: Status of the command. Known values are: "Done", "Running", "Enqueue",
"Processing", "Finished", and "Failed".
:vartype status: str or ~azure.mgmt.cosmosdb.models.CommandStatus
:ivar output_file: The name of the file where the result is written.
:vartype output_file: str
'''
def __init__(
self,
*,
command: Optional[str] = None,
command_id: Optional[str] = None,
arguments: Optional[JSON] = None,
host: Optional[str] = None,
is_admin: Optional[bool] = None,
cassandra_stop_start: Optional[bool] = None,
read_write: Optional[bool] = None,
result: Optional[str] = None,
status: Optional[Union[str, "_models.CommandStatus"]] = None,
output_file: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword command: The command which should be run.
:paramtype command: str
:keyword command_id: The unique id of command.
:paramtype command_id: str
:keyword arguments: The arguments for the command to be run.
:paramtype arguments: JSON
:keyword host: IP address of the cassandra host to run the command on.
:paramtype host: str
:keyword is_admin: Whether command has admin privileges.
:paramtype is_admin: bool
:keyword cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:paramtype cassandra_stop_start: bool
:keyword read_write: If true, allows the command to *write* to the cassandra directory,
otherwise read-only.
:paramtype read_write: bool
:keyword result: Result output of the command.
:paramtype result: str
:keyword status: Status of the command. Known values are: "Done", "Running", "Enqueue",
"Processing", "Finished", and "Failed".
:paramtype status: str or ~azure.mgmt.cosmosdb.models.CommandStatus
:keyword output_file: The name of the file where the result is written.
:paramtype output_file: str
'''
pass
| 2 | 2 | 51 | 0 | 26 | 25 | 1 | 1.28 | 1 | 4 | 0 | 0 | 1 | 10 | 1 | 16 | 92 | 3 | 39 | 27 | 23 | 50 | 14 | 13 | 12 | 1 | 2 | 0 | 1 |
10,042 |
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.CompositePath
|
class CompositePath(_serialization.Model):
"""CompositePath.
: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 order: Sort order for composite paths. Known values are: "ascending" and "descending".
:vartype order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder
"""
_attribute_map = {
"path": {"key": "path", "type": "str"},
"order": {"key": "order", "type": "str"},
}
def __init__(
self,
*,
path: Optional[str] = None,
order: Optional[Union[str, "_models.CompositePathSortOrder"]] = 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 order: Sort order for composite paths. Known values are: "ascending" and "descending".
:paramtype order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder
"""
super().__init__(**kwargs)
self.path = path
self.order = order
|
class CompositePath(_serialization.Model):
'''CompositePath.
: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 order: Sort order for composite paths. Known values are: "ascending" and "descending".
:vartype order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder
'''
def __init__(
self,
*,
path: Optional[str] = None,
order: Optional[Union[str, "_models.CompositePathSortOrder"]] = 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 order: Sort order for composite paths. Known values are: "ascending" and "descending".
:paramtype order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder
'''
pass
| 2 | 2 | 17 | 0 | 10 | 7 | 1 | 0.93 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 32 | 3 | 15 | 11 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,043 |
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.ComputedProperty
|
class ComputedProperty(_serialization.Model):
"""The definition of a computed property.
:ivar name: The name of a computed property, for example - "cp_lowerName".
:vartype name: str
:ivar query: The query that evaluates the value for computed property, for example - "SELECT
VALUE LOWER(c.name) FROM c".
:vartype query: str
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
"query": {"key": "query", "type": "str"},
}
def __init__(self, *, name: Optional[str] = None, query: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword name: The name of a computed property, for example - "cp_lowerName".
:paramtype name: str
:keyword query: The query that evaluates the value for computed property, for example - "SELECT
VALUE LOWER(c.name) FROM c".
:paramtype query: str
"""
super().__init__(**kwargs)
self.name = name
self.query = query
|
class ComputedProperty(_serialization.Model):
'''The definition of a computed property.
:ivar name: The name of a computed property, for example - "cp_lowerName".
:vartype name: str
:ivar query: The query that evaluates the value for computed property, for example - "SELECT
VALUE LOWER(c.name) FROM c".
:vartype query: str
'''
def __init__(self, *, name: Optional[str] = None, query: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword name: The name of a computed property, for example - "cp_lowerName".
:paramtype name: str
:keyword query: The query that evaluates the value for computed property, for example - "SELECT
VALUE LOWER(c.name) FROM c".
:paramtype query: str
'''
pass
| 2 | 2 | 11 | 0 | 4 | 7 | 1 | 1.56 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 26 | 3 | 9 | 5 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,044 |
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.ConflictResolutionPolicy
|
class ConflictResolutionPolicy(_serialization.Model):
"""The conflict resolution policy for the container.
:ivar mode: Indicates the conflict resolution mode. Known values are: "LastWriterWins" and
"Custom".
:vartype mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode
:ivar conflict_resolution_path: The conflict resolution path in the case of LastWriterWins
mode.
:vartype conflict_resolution_path: str
:ivar conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom
mode.
:vartype conflict_resolution_procedure: str
"""
_attribute_map = {
"mode": {"key": "mode", "type": "str"},
"conflict_resolution_path": {"key": "conflictResolutionPath", "type": "str"},
"conflict_resolution_procedure": {"key": "conflictResolutionProcedure", "type": "str"},
}
def __init__(
self,
*,
mode: Union[str, "_models.ConflictResolutionMode"] = "LastWriterWins",
conflict_resolution_path: Optional[str] = None,
conflict_resolution_procedure: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword mode: Indicates the conflict resolution mode. Known values are: "LastWriterWins" and
"Custom".
:paramtype mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode
:keyword conflict_resolution_path: The conflict resolution path in the case of LastWriterWins
mode.
:paramtype conflict_resolution_path: str
:keyword conflict_resolution_procedure: The procedure to resolve conflicts in the case of
custom mode.
:paramtype conflict_resolution_procedure: str
"""
super().__init__(**kwargs)
self.mode = mode
self.conflict_resolution_path = conflict_resolution_path
self.conflict_resolution_procedure = conflict_resolution_procedure
|
class ConflictResolutionPolicy(_serialization.Model):
'''The conflict resolution policy for the container.
:ivar mode: Indicates the conflict resolution mode. Known values are: "LastWriterWins" and
"Custom".
:vartype mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode
:ivar conflict_resolution_path: The conflict resolution path in the case of LastWriterWins
mode.
:vartype conflict_resolution_path: str
:ivar conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom
mode.
:vartype conflict_resolution_procedure: str
'''
def __init__(
self,
*,
mode: Union[str, "_models.ConflictResolutionMode"] = "LastWriterWins",
conflict_resolution_path: Optional[str] = None,
conflict_resolution_procedure: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword mode: Indicates the conflict resolution mode. Known values are: "LastWriterWins" and
"Custom".
:paramtype mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode
:keyword conflict_resolution_path: The conflict resolution path in the case of LastWriterWins
mode.
:paramtype conflict_resolution_path: str
:keyword conflict_resolution_procedure: The procedure to resolve conflicts in the case of
custom mode.
:paramtype conflict_resolution_procedure: str
'''
pass
| 2 | 2 | 23 | 0 | 12 | 11 | 1 | 1.22 | 1 | 3 | 0 | 0 | 1 | 3 | 1 | 16 | 43 | 3 | 18 | 13 | 9 | 22 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
10,045 |
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.ConnectionError
|
class ConnectionError(_serialization.Model):
"""ConnectionError.
:ivar connection_state: The kind of connection error that occurred. Known values are:
"Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError",
"InternalOperatorToDataCenterCertificateError", and "InternalError".
:vartype connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState
:ivar i_p_from: The IP of host that originated the failed connection.
:vartype i_p_from: str
:ivar i_p_to: The IP that the connection attempted to reach.
:vartype i_p_to: str
:ivar port: The TCP port the connection was attempted on.
:vartype port: int
:ivar exception: Detailed error message about the failed connection.
:vartype exception: str
"""
_attribute_map = {
"connection_state": {"key": "connectionState", "type": "str"},
"i_p_from": {"key": "iPFrom", "type": "str"},
"i_p_to": {"key": "iPTo", "type": "str"},
"port": {"key": "port", "type": "int"},
"exception": {"key": "exception", "type": "str"},
}
def __init__(
self,
*,
connection_state: Optional[Union[str, "_models.ConnectionState"]] = None,
i_p_from: Optional[str] = None,
i_p_to: Optional[str] = None,
port: Optional[int] = None,
exception: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword connection_state: The kind of connection error that occurred. Known values are:
"Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError",
"InternalOperatorToDataCenterCertificateError", and "InternalError".
:paramtype connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState
:keyword i_p_from: The IP of host that originated the failed connection.
:paramtype i_p_from: str
:keyword i_p_to: The IP that the connection attempted to reach.
:paramtype i_p_to: str
:keyword port: The TCP port the connection was attempted on.
:paramtype port: int
:keyword exception: Detailed error message about the failed connection.
:paramtype exception: str
"""
super().__init__(**kwargs)
self.connection_state = connection_state
self.i_p_from = i_p_from
self.i_p_to = i_p_to
self.port = port
self.exception = exception
|
class ConnectionError(_serialization.Model):
'''ConnectionError.
:ivar connection_state: The kind of connection error that occurred. Known values are:
"Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError",
"InternalOperatorToDataCenterCertificateError", and "InternalError".
:vartype connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState
:ivar i_p_from: The IP of host that originated the failed connection.
:vartype i_p_from: str
:ivar i_p_to: The IP that the connection attempted to reach.
:vartype i_p_to: str
:ivar port: The TCP port the connection was attempted on.
:vartype port: int
:ivar exception: Detailed error message about the failed connection.
:vartype exception: str
'''
def __init__(
self,
*,
connection_state: Optional[Union[str, "_models.ConnectionState"]] = None,
i_p_from: Optional[str] = None,
i_p_to: Optional[str] = None,
port: Optional[int] = None,
exception: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword connection_state: The kind of connection error that occurred. Known values are:
"Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError",
"InternalOperatorToDataCenterCertificateError", and "InternalError".
:paramtype connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState
:keyword i_p_from: The IP of host that originated the failed connection.
:paramtype i_p_from: str
:keyword i_p_to: The IP that the connection attempted to reach.
:paramtype i_p_to: str
:keyword port: The TCP port the connection was attempted on.
:paramtype port: int
:keyword exception: Detailed error message about the failed connection.
:paramtype exception: str
'''
pass
| 2 | 2 | 30 | 0 | 16 | 14 | 1 | 1.17 | 1 | 4 | 0 | 0 | 1 | 5 | 1 | 16 | 55 | 3 | 24 | 17 | 13 | 28 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
10,046 |
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/incident/_create_team.py
|
azext_sentinel.aaz.latest.sentinel.incident._create_team.CreateTeam.IncidentsCreateTeam
|
class IncidentsCreateTeam(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/incidents/{incidentId}/createTeam",
**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(
"incidentId", self.ctx.args.incident_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("groupIds", AAZListType, ".group_ids")
_builder.set_prop("memberIds", AAZListType, ".member_ids")
_builder.set_prop("teamDescription", AAZStrType,
".team_description")
_builder.set_prop("teamName", AAZStrType, ".team_name", typ_kwargs={
"flags": {"required": True}})
group_ids = _builder.get(".groupIds")
if group_ids is not None:
group_ids.set_elements(AAZStrType, ".")
member_ids = _builder.get(".memberIds")
if member_ids is not None:
member_ids.set_elements(AAZStrType, ".")
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.description = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.primary_channel_url = AAZStrType(
serialized_name="primaryChannelUrl",
flags={"read_only": True},
)
_schema_on_200.team_creation_time_utc = AAZStrType(
serialized_name="teamCreationTimeUtc",
flags={"read_only": True},
)
_schema_on_200.team_id = AAZStrType(
serialized_name="teamId",
flags={"read_only": True},
)
return cls._schema_on_200
|
class IncidentsCreateTeam(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 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 130 | 18 | 112 | 31 | 93 | 0 | 51 | 23 | 40 | 3 | 1 | 1 | 14 |
10,047 |
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/incident/_delete.py
|
azext_sentinel.aaz.latest.sentinel.incident._delete.Delete.IncidentsDelete
|
class IncidentsDelete(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/incidents/{incidentId}",
**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(
"incidentId", self.ctx.args.incident_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 IncidentsDelete(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 |
10,048 |
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/incident/_list.py
|
azext_sentinel.aaz.latest.sentinel.incident._list.List.IncidentsList
|
class IncidentsList(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/incidents",
**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(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"$orderby", self.ctx.args.orderby,
),
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**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.additional_data = AAZObjectType(
serialized_name="additionalData",
flags={"read_only": True},
)
properties.classification = AAZStrType()
properties.classification_comment = AAZStrType(
serialized_name="classificationComment",
)
properties.classification_reason = AAZStrType(
serialized_name="classificationReason",
)
properties.created_time_utc = AAZStrType(
serialized_name="createdTimeUtc",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.first_activity_time_utc = AAZStrType(
serialized_name="firstActivityTimeUtc",
)
properties.incident_number = AAZIntType(
serialized_name="incidentNumber",
flags={"read_only": True},
)
properties.incident_url = AAZStrType(
serialized_name="incidentUrl",
flags={"read_only": True},
)
properties.labels = AAZListType()
properties.last_activity_time_utc = AAZStrType(
serialized_name="lastActivityTimeUtc",
)
properties.last_modified_time_utc = AAZStrType(
serialized_name="lastModifiedTimeUtc",
flags={"read_only": True},
)
properties.owner = AAZObjectType()
properties.provider_incident_id = AAZStrType(
serialized_name="providerIncidentId",
)
properties.provider_name = AAZStrType(
serialized_name="providerName",
)
properties.related_analytic_rule_ids = AAZListType(
serialized_name="relatedAnalyticRuleIds",
flags={"read_only": True},
)
properties.severity = AAZStrType(
flags={"required": True},
)
properties.status = AAZStrType(
flags={"required": True},
)
properties.team_information = AAZObjectType(
serialized_name="teamInformation",
)
properties.title = AAZStrType(
flags={"required": True},
)
additional_data = cls._schema_on_200.value.Element.properties.additional_data
additional_data.alert_product_names = AAZListType(
serialized_name="alertProductNames",
flags={"read_only": True},
)
additional_data.alerts_count = AAZIntType(
serialized_name="alertsCount",
flags={"read_only": True},
)
additional_data.bookmarks_count = AAZIntType(
serialized_name="bookmarksCount",
flags={"read_only": True},
)
additional_data.comments_count = AAZIntType(
serialized_name="commentsCount",
flags={"read_only": True},
)
additional_data.provider_incident_url = AAZStrType(
serialized_name="providerIncidentUrl",
flags={"read_only": True},
)
additional_data.tactics = AAZListType(
flags={"read_only": True},
)
additional_data.techniques = AAZListType(
flags={"read_only": True},
)
alert_product_names = cls._schema_on_200.value.Element.properties.additional_data.alert_product_names
alert_product_names.Element = AAZStrType(
flags={"read_only": True},
)
tactics = cls._schema_on_200.value.Element.properties.additional_data.tactics
tactics.Element = AAZStrType(
flags={"read_only": True},
)
techniques = cls._schema_on_200.value.Element.properties.additional_data.techniques
techniques.Element = AAZStrType(
flags={"read_only": True},
)
labels = cls._schema_on_200.value.Element.properties.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.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.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",
)
related_analytic_rule_ids = cls._schema_on_200.value.Element.properties.related_analytic_rule_ids
related_analytic_rule_ids.Element = AAZStrType(
flags={"read_only": True},
)
team_information = cls._schema_on_200.value.Element.properties.team_information
team_information.description = AAZStrType(
flags={"read_only": True},
)
team_information.name = AAZStrType(
flags={"read_only": True},
)
team_information.primary_channel_url = AAZStrType(
serialized_name="primaryChannelUrl",
flags={"read_only": True},
)
team_information.team_creation_time_utc = AAZStrType(
serialized_name="teamCreationTimeUtc",
flags={"read_only": True},
)
team_information.team_id = AAZStrType(
serialized_name="teamId",
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},
)
return cls._schema_on_200
|
class IncidentsList(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 | 2 | 30 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 306 | 27 | 279 | 38 | 262 | 0 | 105 | 31 | 95 | 2 | 1 | 1 | 11 |
10,049 |
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/incident/_list_alert.py
|
azext_sentinel.aaz.latest.sentinel.incident._list_alert.ListAlert.IncidentsListAlerts
|
class IncidentsListAlerts(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/incidents/{incidentId}/alerts",
**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(
"incidentId", self.ctx.args.incident_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.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.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.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.Element.properties.confidence_reasons
confidence_reasons.Element = AAZObjectType(
flags={"read_only": True},
)
_element = cls._schema_on_200.value.Element.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.Element.properties.remediation_steps
remediation_steps.Element = AAZStrType(
flags={"read_only": True},
)
tactics = cls._schema_on_200.value.Element.properties.tactics
tactics.Element = 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},
)
return cls._schema_on_200
|
class IncidentsListAlerts(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 | 27 | 1 | 26 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 263 | 22 | 241 | 33 | 224 | 0 | 86 | 26 | 76 | 2 | 1 | 1 | 11 |
10,050 |
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.CassandraViewListResult
|
class CassandraViewListResult(_serialization.Model):
"""The List operation response, that contains the Cassandra views and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Cassandra views and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults]
"""
_validation = {
"value": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[CassandraViewGetResults]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
|
class CassandraViewListResult(_serialization.Model):
'''The List operation response, that contains the Cassandra views and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Cassandra views and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults]
'''
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 |
10,051 |
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.CassandraViewResource
|
class CassandraViewResource(_serialization.Model):
"""Cosmos DB Cassandra view resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Cassandra view. Required.
:vartype id: str
:ivar view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:vartype view_definition: str
"""
_validation = {
"id": {"required": True},
"view_definition": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"view_definition": {"key": "viewDefinition", "type": "str"},
}
def __init__(self, *, id: str, view_definition: str, **kwargs: Any) -> None: # pylint: disable=redefined-builtin
"""
:keyword id: Name of the Cosmos DB Cassandra view. Required.
:paramtype id: str
:keyword view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:paramtype view_definition: str
"""
super().__init__(**kwargs)
self.id = id
self.view_definition = view_definition
|
class CassandraViewResource(_serialization.Model):
'''Cosmos DB Cassandra view resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Cassandra view. Required.
:vartype id: str
:ivar view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:vartype view_definition: str
'''
def __init__(self, *, id: str, view_definition: str, **kwargs: Any) -> None:
'''
:keyword id: Name of the Cosmos DB Cassandra view. Required.
:paramtype id: str
:keyword view_definition: View Definition of the Cosmos DB Cassandra view. Required.
:paramtype view_definition: str
'''
pass
| 2 | 2 | 10 | 0 | 4 | 7 | 1 | 1.08 | 1 | 3 | 0 | 1 | 1 | 2 | 1 | 16 | 31 | 5 | 13 | 6 | 11 | 14 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
10,052 |
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.Certificate
|
class Certificate(_serialization.Model):
"""Certificate.
:ivar pem: PEM formatted public key.
:vartype pem: str
"""
_attribute_map = {
"pem": {"key": "pem", "type": "str"},
}
def __init__(self, *, pem: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword pem: PEM formatted public key.
:paramtype pem: str
"""
super().__init__(**kwargs)
self.pem = pem
|
class Certificate(_serialization.Model):
'''Certificate.
:ivar pem: PEM formatted public key.
:vartype pem: str
'''
def __init__(self, *, pem: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword pem: PEM formatted public key.
:paramtype pem: 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 |
10,053 |
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.ChaosFaultListResponse
|
class ChaosFaultListResponse(_serialization.Model):
"""Chaos Fault List Response.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Chaos Faults.
:vartype value: list[~azure.mgmt.cosmosdb.models.ChaosFaultResource]
:ivar next_link: The link used to get the next page of results.
:vartype next_link: str
"""
_validation = {
"value": {"readonly": True},
"next_link": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[ChaosFaultResource]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
self.next_link = None
|
class ChaosFaultListResponse(_serialization.Model):
'''Chaos Fault List Response.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Chaos Faults.
:vartype value: list[~azure.mgmt.cosmosdb.models.ChaosFaultResource]
:ivar next_link: The link used to get the next page of results.
:vartype next_link: 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 |
10,054 |
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.ChaosFaultResource
|
class ChaosFaultResource(ProxyResource):
"""A request object to enable/disable the chaos fault.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource ID for the resource. E.g.
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
"Microsoft.Storage/storageAccounts".
:vartype type: str
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData
:ivar action: Indicates whether what action to take for the Chaos Fault. Known values are:
"Enable" and "Disable".
:vartype action: str or ~azure.mgmt.cosmosdb.models.SupportedActions
:ivar region: Region of the account where the Chaos Fault is to be enabled/disabled.
:vartype region: str
:ivar database_name: Database name.
:vartype database_name: str
:ivar container_name: Container name.
:vartype container_name: str
:ivar provisioning_state: A provisioning state of the Chaos Fault.
:vartype provisioning_state: str
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"system_data": {"key": "systemData", "type": "SystemData"},
"action": {"key": "properties.action", "type": "str"},
"region": {"key": "properties.region", "type": "str"},
"database_name": {"key": "properties.databaseName", "type": "str"},
"container_name": {"key": "properties.containerName", "type": "str"},
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
}
def __init__(
self,
*,
action: Optional[Union[str, "_models.SupportedActions"]] = None,
region: Optional[str] = None,
database_name: Optional[str] = None,
container_name: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword action: Indicates whether what action to take for the Chaos Fault. Known values are:
"Enable" and "Disable".
:paramtype action: str or ~azure.mgmt.cosmosdb.models.SupportedActions
:keyword region: Region of the account where the Chaos Fault is to be enabled/disabled.
:paramtype region: str
:keyword database_name: Database name.
:paramtype database_name: str
:keyword container_name: Container name.
:paramtype container_name: str
"""
super().__init__(**kwargs)
self.action = action
self.region = region
self.database_name = database_name
self.container_name = container_name
self.provisioning_state = None
|
class ChaosFaultResource(ProxyResource):
'''A request object to enable/disable the chaos fault.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Fully qualified resource ID for the resource. E.g.
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
"Microsoft.Storage/storageAccounts".
:vartype type: str
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData
:ivar action: Indicates whether what action to take for the Chaos Fault. Known values are:
"Enable" and "Disable".
:vartype action: str or ~azure.mgmt.cosmosdb.models.SupportedActions
:ivar region: Region of the account where the Chaos Fault is to be enabled/disabled.
:vartype region: str
:ivar database_name: Database name.
:vartype database_name: str
:ivar container_name: Container name.
:vartype container_name: str
:ivar provisioning_state: A provisioning state of the Chaos Fault.
:vartype provisioning_state: str
'''
def __init__(
self,
*,
action: Optional[Union[str, "_models.SupportedActions"]] = None,
region: Optional[str] = None,
database_name: Optional[str] = None,
container_name: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword action: Indicates whether what action to take for the Chaos Fault. Known values are:
"Enable" and "Disable".
:paramtype action: str or ~azure.mgmt.cosmosdb.models.SupportedActions
:keyword region: Region of the account where the Chaos Fault is to be enabled/disabled.
:paramtype region: str
:keyword database_name: Database name.
:paramtype database_name: str
:keyword container_name: Container name.
:paramtype container_name: str
'''
pass
| 2 | 2 | 26 | 0 | 15 | 11 | 1 | 1.06 | 1 | 3 | 0 | 0 | 1 | 5 | 1 | 17 | 75 | 5 | 34 | 17 | 24 | 36 | 10 | 9 | 8 | 1 | 4 | 0 | 1 |
10,055 |
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.ClientEncryptionIncludedPath
|
class ClientEncryptionIncludedPath(_serialization.Model):
""".
All required parameters must be populated in order to send to server.
:ivar path: Path that needs to be encrypted. Required.
:vartype path: str
:ivar client_encryption_key_id: The identifier of the Client Encryption Key to be used to
encrypt the path. Required.
:vartype client_encryption_key_id: str
:ivar encryption_type: The type of encryption to be performed. Eg - Deterministic, Randomized.
Required.
:vartype encryption_type: str
:ivar encryption_algorithm: The encryption algorithm which will be used. Eg -
AEAD_AES_256_CBC_HMAC_SHA256. Required.
:vartype encryption_algorithm: str
"""
_validation = {
"path": {"required": True},
"client_encryption_key_id": {"required": True},
"encryption_type": {"required": True},
"encryption_algorithm": {"required": True},
}
_attribute_map = {
"path": {"key": "path", "type": "str"},
"client_encryption_key_id": {"key": "clientEncryptionKeyId", "type": "str"},
"encryption_type": {"key": "encryptionType", "type": "str"},
"encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"},
}
def __init__(
self,
*,
path: str,
client_encryption_key_id: str,
encryption_type: str,
encryption_algorithm: str,
**kwargs: Any
) -> None:
"""
:keyword path: Path that needs to be encrypted. Required.
:paramtype path: str
:keyword client_encryption_key_id: The identifier of the Client Encryption Key to be used to
encrypt the path. Required.
:paramtype client_encryption_key_id: str
:keyword encryption_type: The type of encryption to be performed. Eg - Deterministic,
Randomized. Required.
:paramtype encryption_type: str
:keyword encryption_algorithm: The encryption algorithm which will be used. Eg -
AEAD_AES_256_CBC_HMAC_SHA256. Required.
:paramtype encryption_algorithm: str
"""
super().__init__(**kwargs)
self.path = path
self.client_encryption_key_id = client_encryption_key_id
self.encryption_type = encryption_type
self.encryption_algorithm = encryption_algorithm
|
class ClientEncryptionIncludedPath(_serialization.Model):
'''.
All required parameters must be populated in order to send to server.
:ivar path: Path that needs to be encrypted. Required.
:vartype path: str
:ivar client_encryption_key_id: The identifier of the Client Encryption Key to be used to
encrypt the path. Required.
:vartype client_encryption_key_id: str
:ivar encryption_type: The type of encryption to be performed. Eg - Deterministic, Randomized.
Required.
:vartype encryption_type: str
:ivar encryption_algorithm: The encryption algorithm which will be used. Eg -
AEAD_AES_256_CBC_HMAC_SHA256. Required.
:vartype encryption_algorithm: str
'''
def __init__(
self,
*,
path: str,
client_encryption_key_id: str,
encryption_type: str,
encryption_algorithm: str,
**kwargs: Any
) -> None:
'''
:keyword path: Path that needs to be encrypted. Required.
:paramtype path: str
:keyword client_encryption_key_id: The identifier of the Client Encryption Key to be used to
encrypt the path. Required.
:paramtype client_encryption_key_id: str
:keyword encryption_type: The type of encryption to be performed. Eg - Deterministic,
Randomized. Required.
:paramtype encryption_type: str
:keyword encryption_algorithm: The encryption algorithm which will be used. Eg -
AEAD_AES_256_CBC_HMAC_SHA256. Required.
:paramtype encryption_algorithm: str
'''
pass
| 2 | 2 | 27 | 0 | 14 | 13 | 1 | 1 | 1 | 3 | 0 | 0 | 1 | 4 | 1 | 16 | 59 | 5 | 27 | 16 | 17 | 27 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
10,056 |
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.ClientEncryptionKeyCreateUpdateParameters
|
class ClientEncryptionKeyCreateUpdateParameters(_serialization.Model): # pylint: disable=name-too-long
"""Parameters to create and update ClientEncryptionKey.
All required parameters must be populated in order to send to server.
:ivar resource: The standard JSON format of a ClientEncryptionKey. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyResource
"""
_validation = {
"resource": {"required": True},
}
_attribute_map = {
"resource": {"key": "properties.resource", "type": "ClientEncryptionKeyResource"},
}
def __init__(self, *, resource: "_models.ClientEncryptionKeyResource", **kwargs: Any) -> None:
"""
:keyword resource: The standard JSON format of a ClientEncryptionKey. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyResource
"""
super().__init__(**kwargs)
self.resource = resource
|
class ClientEncryptionKeyCreateUpdateParameters(_serialization.Model):
'''Parameters to create and update ClientEncryptionKey.
All required parameters must be populated in order to send to server.
:ivar resource: The standard JSON format of a ClientEncryptionKey. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyResource
'''
def __init__(self, *, resource: "_models.ClientEncryptionKeyResource", **kwargs: Any) -> None:
'''
:keyword resource: The standard JSON format of a ClientEncryptionKey. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyResource
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 24 | 5 | 10 | 5 | 8 | 10 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,057 |
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.ClientEncryptionKeyGetPropertiesResource
|
class ClientEncryptionKeyGetPropertiesResource(ClientEncryptionKeyResource, ExtendedResourceProperties):
"""ClientEncryptionKeyGetPropertiesResource.
Variables are only populated by the server, and will be ignored when sending a request.
: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 ClientEncryptionKey.
:vartype id: str
:ivar encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:vartype encryption_algorithm: str
:ivar wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:vartype wrapped_data_encryption_key: bytes
:ivar key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:vartype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
"""
_validation = {
"rid": {"readonly": True},
"ts": {"readonly": True},
"etag": {"readonly": True},
}
_attribute_map = {
"rid": {"key": "_rid", "type": "str"},
"ts": {"key": "_ts", "type": "float"},
"etag": {"key": "_etag", "type": "str"},
"id": {"key": "id", "type": "str"},
"encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"},
"wrapped_data_encryption_key": {"key": "wrappedDataEncryptionKey", "type": "bytearray"},
"key_wrap_metadata": {"key": "keyWrapMetadata", "type": "KeyWrapMetadata"},
}
def __init__(
self,
*,
id: Optional[str] = None, # pylint: disable=redefined-builtin
encryption_algorithm: Optional[str] = None,
wrapped_data_encryption_key: Optional[bytes] = None,
key_wrap_metadata: Optional["_models.KeyWrapMetadata"] = None,
**kwargs: Any
) -> None:
"""
:keyword id: Name of the ClientEncryptionKey.
:paramtype id: str
:keyword encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:paramtype encryption_algorithm: str
:keyword wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:paramtype wrapped_data_encryption_key: bytes
:keyword key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:paramtype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
"""
super().__init__(
id=id,
encryption_algorithm=encryption_algorithm,
wrapped_data_encryption_key=wrapped_data_encryption_key,
key_wrap_metadata=key_wrap_metadata,
**kwargs
)
self.rid = None
self.ts = None
self.etag = None
self.id = id
self.encryption_algorithm = encryption_algorithm
self.wrapped_data_encryption_key = wrapped_data_encryption_key
self.key_wrap_metadata = key_wrap_metadata
|
class ClientEncryptionKeyGetPropertiesResource(ClientEncryptionKeyResource, ExtendedResourceProperties):
'''ClientEncryptionKeyGetPropertiesResource.
Variables are only populated by the server, and will be ignored when sending a request.
: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 ClientEncryptionKey.
:vartype id: str
:ivar encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:vartype encryption_algorithm: str
:ivar wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:vartype wrapped_data_encryption_key: bytes
:ivar key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:vartype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
'''
def __init__(
self,
*,
id: Optional[str] = None, # pylint: disable=redefined-builtin
encryption_algorithm: Optional[str] = None,
wrapped_data_encryption_key: Optional[bytes] = None,
key_wrap_metadata: Optional["_models.KeyWrapMetadata"] = None,
**kwargs: Any
) -> None:
'''
:keyword id: Name of the ClientEncryptionKey.
:paramtype id: str
:keyword encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:paramtype encryption_algorithm: str
:keyword wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:paramtype wrapped_data_encryption_key: bytes
:keyword key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:paramtype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
'''
pass
| 2 | 2 | 36 | 0 | 23 | 14 | 1 | 0.92 | 2 | 4 | 0 | 0 | 1 | 7 | 1 | 18 | 77 | 5 | 38 | 19 | 28 | 35 | 12 | 11 | 10 | 1 | 3 | 0 | 1 |
10,058 |
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/incident/comment/_update.py
|
azext_sentinel.aaz.latest.sentinel.incident.comment._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("message", AAZStrType, ".message", 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 | 8 | 1 | 7 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 19 | 4 | 15 | 5 | 12 | 0 | 11 | 5 | 8 | 2 | 1 | 1 | 3 |
10,059 |
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.ClientEncryptionKeyGetResults
|
class ClientEncryptionKeyGetResults(ARMProxyResource):
"""Client Encryption Key.
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 resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetPropertiesResource
"""
_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"},
"resource": {"key": "properties.resource", "type": "ClientEncryptionKeyGetPropertiesResource"},
}
def __init__(
self, *, resource: Optional["_models.ClientEncryptionKeyGetPropertiesResource"] = None, **kwargs: Any
) -> None:
"""
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetPropertiesResource
"""
super().__init__(**kwargs)
self.resource = resource
|
class ClientEncryptionKeyGetResults(ARMProxyResource):
'''Client Encryption Key.
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 resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetPropertiesResource
'''
def __init__(
self, *, resource: Optional["_models.ClientEncryptionKeyGetPropertiesResource"] = None, **kwargs: Any
) -> None:
'''
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetPropertiesResource
'''
pass
| 2 | 2 | 9 | 0 | 5 | 4 | 1 | 0.88 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 37 | 5 | 17 | 7 | 13 | 15 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
10,060 |
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.ClientEncryptionKeysListResult
|
class ClientEncryptionKeysListResult(_serialization.Model):
"""The List operation response, that contains the client encryption keys and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of client encryption keys and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults]
"""
_validation = {
"value": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[ClientEncryptionKeyGetResults]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
|
class ClientEncryptionKeysListResult(_serialization.Model):
'''The List operation response, that contains the client encryption keys and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of client encryption keys and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.ClientEncryptionKeyGetResults]
'''
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 |
10,061 |
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.ClientEncryptionPolicy
|
class ClientEncryptionPolicy(_serialization.Model):
"""Cosmos DB client encryption policy.
All required parameters must be populated in order to send to server.
:ivar included_paths: Paths of the item that need encryption along with path-specific settings.
Required.
:vartype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath]
:ivar policy_format_version: Version of the client encryption policy definition. Supported
versions are 1 and 2. Version 2 supports id and partition key path encryption. Required.
:vartype policy_format_version: int
"""
_validation = {
"included_paths": {"required": True},
"policy_format_version": {"required": True, "maximum": 2, "minimum": 1},
}
_attribute_map = {
"included_paths": {"key": "includedPaths", "type": "[ClientEncryptionIncludedPath]"},
"policy_format_version": {"key": "policyFormatVersion", "type": "int"},
}
def __init__(
self, *, included_paths: List["_models.ClientEncryptionIncludedPath"], policy_format_version: int, **kwargs: Any
) -> None:
"""
:keyword included_paths: Paths of the item that need encryption along with path-specific
settings. Required.
:paramtype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath]
:keyword policy_format_version: Version of the client encryption policy definition. Supported
versions are 1 and 2. Version 2 supports id and partition key path encryption. Required.
:paramtype policy_format_version: int
"""
super().__init__(**kwargs)
self.included_paths = included_paths
self.policy_format_version = policy_format_version
|
class ClientEncryptionPolicy(_serialization.Model):
'''Cosmos DB client encryption policy.
All required parameters must be populated in order to send to server.
:ivar included_paths: Paths of the item that need encryption along with path-specific settings.
Required.
:vartype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath]
:ivar policy_format_version: Version of the client encryption policy definition. Supported
versions are 1 and 2. Version 2 supports id and partition key path encryption. Required.
:vartype policy_format_version: int
'''
def __init__(
self, *, included_paths: List["_models.ClientEncryptionIncludedPath"], policy_format_version: int, **kwargs: Any
) -> None:
'''
:keyword included_paths: Paths of the item that need encryption along with path-specific
settings. Required.
:paramtype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath]
:keyword policy_format_version: Version of the client encryption policy definition. Supported
versions are 1 and 2. Version 2 supports id and partition key path encryption. Required.
:paramtype policy_format_version: int
'''
pass
| 2 | 2 | 14 | 0 | 6 | 8 | 1 | 1.13 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 37 | 5 | 15 | 8 | 11 | 17 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
10,062 |
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.ClusterKey
|
class ClusterKey(_serialization.Model):
"""Cosmos DB Cassandra table cluster key.
:ivar name: Name of the Cosmos DB Cassandra table cluster key.
:vartype name: str
:ivar order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and
"Desc".
:vartype order_by: str
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
"order_by": {"key": "orderBy", "type": "str"},
}
def __init__(self, *, name: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword name: Name of the Cosmos DB Cassandra table cluster key.
:paramtype name: str
:keyword order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and
"Desc".
:paramtype order_by: str
"""
super().__init__(**kwargs)
self.name = name
self.order_by = order_by
|
class ClusterKey(_serialization.Model):
'''Cosmos DB Cassandra table cluster key.
:ivar name: Name of the Cosmos DB Cassandra table cluster key.
:vartype name: str
:ivar order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and
"Desc".
:vartype order_by: str
'''
def __init__(self, *, name: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword name: Name of the Cosmos DB Cassandra table cluster key.
:paramtype name: str
:keyword order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and
"Desc".
:paramtype order_by: str
'''
pass
| 2 | 2 | 11 | 0 | 4 | 7 | 1 | 1.56 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 26 | 3 | 9 | 5 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,063 |
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.ClusterResource
|
class ClusterResource(ManagedCassandraARMResourceProperties):
"""Representation of a managed Cassandra cluster.
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.ManagedCassandraManagedServiceIdentity
:ivar properties: Properties of a managed Cassandra cluster.
:vartype properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties
"""
_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": "ManagedCassandraManagedServiceIdentity"},
"properties": {"key": "properties", "type": "ClusterResourceProperties"},
}
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedCassandraManagedServiceIdentity"] = None,
properties: Optional["_models.ClusterResourceProperties"] = 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.ManagedCassandraManagedServiceIdentity
:keyword properties: Properties of a managed Cassandra cluster.
:paramtype properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.properties = properties
|
class ClusterResource(ManagedCassandraARMResourceProperties):
'''Representation of a managed Cassandra cluster.
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.ManagedCassandraManagedServiceIdentity
:ivar properties: Properties of a managed Cassandra cluster.
:vartype properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties
'''
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedCassandraManagedServiceIdentity"] = None,
properties: Optional["_models.ClusterResourceProperties"] = 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.ManagedCassandraManagedServiceIdentity
:keyword properties: Properties of a managed Cassandra cluster.
:paramtype properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties
'''
pass
| 2 | 2 | 26 | 0 | 11 | 15 | 1 | 1.42 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 17 | 68 | 5 | 26 | 13 | 16 | 37 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
10,064 |
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.ClusterResourceProperties
|
class ClusterResourceProperties(_serialization.Model):
"""Properties of a managed Cassandra cluster.
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 restore_from_backup_id: To create an empty cluster, omit this field or set it to null. To
restore a backup into a new cluster, set this field to the resource id of the backup.
:vartype restore_from_backup_id: str
:ivar delegated_management_subnet_id: Resource id of a subnet that this cluster's management
service should have its network interface attached to. The subnet must be routable to all
subnets that will be delegated to data centers. The resource id must be of the form
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
network>`/subnets/:code:`<subnet>`'.
:vartype delegated_management_subnet_id: str
:ivar cassandra_version: Which version of Cassandra should this cluster converge to running
(e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
:vartype cassandra_version: str
:ivar cluster_name_override: If you need to set the clusterName property in cassandra.yaml to
something besides the resource name of the cluster, set the value to use on this property.
:vartype cluster_name_override: str
:ivar authentication_method: Which authentication method Cassandra should use to authenticate
clients. 'None' turns off authentication, so should not be used except in emergencies.
'Cassandra' is the default password based authentication. The default is 'Cassandra'. Known
values are: "None", "Cassandra", and "Ldap".
:vartype authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod
:ivar initial_cassandra_admin_password: Initial password for clients connecting as admin to the
cluster. Should be changed after cluster creation. Returns null on GET. This field only applies
when the authenticationMethod field is 'Cassandra'.
:vartype initial_cassandra_admin_password: str
:ivar prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing data
about the managed Cassandra nodes can be reached.
:vartype prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode
:ivar repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true,
and should stay true unless you are running a hybrid cluster where you are already doing your
own repairs.
:vartype repair_enabled: bool
:ivar auto_replicate: The form of AutoReplicate that is being used by this cluster. Known
values are: "None", "SystemKeyspaces", and "AllKeyspaces".
:vartype auto_replicate: str or ~azure.mgmt.cosmosdb.models.AutoReplicate
:ivar client_certificates: List of TLS certificates used to authorize clients connecting to the
cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if
clientCertificates is set, the managed Cassandra cluster will reject all connections not
bearing a TLS client certificate that can be validated from one or more of the public
certificates in this property.
:vartype client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:ivar external_gossip_certificates: List of TLS certificates used to authorize gossip from
unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be
verifiable using one of the certificates provided in this property.
:vartype external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:ivar gossip_certificates: List of TLS certificates that unmanaged nodes must trust for gossip
with managed nodes. All managed nodes will present TLS client certificates that are verifiable
using one of the certificates provided in this property.
:vartype gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:ivar external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers. These
will be added to the seed node lists of all managed nodes.
:vartype external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode]
:ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should
be added to the seed node lists of all unmanaged nodes.
:vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode]
:ivar external_data_centers: List of the data center names for unmanaged data centers in this
cluster to be included in auto-replication.
:vartype external_data_centers: list[str]
:ivar hours_between_backups: (Deprecated) Number of hours to wait between taking a backup of
the cluster.
:vartype hours_between_backups: int
:ivar deallocated: Whether the cluster and associated data centers has been deallocated.
:vartype deallocated: bool
:ivar cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled.
:vartype cassandra_audit_logging_enabled: bool
:ivar cluster_type: Type of the cluster. If set to Production, some operations might not be
permitted on cluster. Known values are: "Production" and "NonProduction".
:vartype cluster_type: str or ~azure.mgmt.cosmosdb.models.ClusterType
:ivar provision_error: Error related to resource provisioning.
:vartype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError
:ivar extensions: Extensions to be added or updated on cluster.
:vartype extensions: list[str]
:ivar backup_schedules: List of backup schedules that define when you want to back up your
data.
:vartype backup_schedules: list[~azure.mgmt.cosmosdb.models.BackupSchedule]
:ivar scheduled_event_strategy: How the nodes in the cluster react to scheduled events. Known
values are: "Ignore", "StopAny", and "StopByRack".
:vartype scheduled_event_strategy: str or ~azure.mgmt.cosmosdb.models.ScheduledEventStrategy
:ivar azure_connection_method: How to connect to the azure services needed for running the
cluster. Known values are: "None" and "VPN".
:vartype azure_connection_method: str or ~azure.mgmt.cosmosdb.models.AzureConnectionType
:ivar private_link_resource_id: If the Connection Method is Vpn, this is the Id of the private
link resource that the datacenters need to connect to.
:vartype private_link_resource_id: str
"""
_validation = {
"gossip_certificates": {"readonly": True},
"seed_nodes": {"readonly": True},
"private_link_resource_id": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"restore_from_backup_id": {"key": "restoreFromBackupId", "type": "str"},
"delegated_management_subnet_id": {"key": "delegatedManagementSubnetId", "type": "str"},
"cassandra_version": {"key": "cassandraVersion", "type": "str"},
"cluster_name_override": {"key": "clusterNameOverride", "type": "str"},
"authentication_method": {"key": "authenticationMethod", "type": "str"},
"initial_cassandra_admin_password": {"key": "initialCassandraAdminPassword", "type": "str"},
"prometheus_endpoint": {"key": "prometheusEndpoint", "type": "SeedNode"},
"repair_enabled": {"key": "repairEnabled", "type": "bool"},
"auto_replicate": {"key": "autoReplicate", "type": "str"},
"client_certificates": {"key": "clientCertificates", "type": "[Certificate]"},
"external_gossip_certificates": {"key": "externalGossipCertificates", "type": "[Certificate]"},
"gossip_certificates": {"key": "gossipCertificates", "type": "[Certificate]"},
"external_seed_nodes": {"key": "externalSeedNodes", "type": "[SeedNode]"},
"seed_nodes": {"key": "seedNodes", "type": "[SeedNode]"},
"external_data_centers": {"key": "externalDataCenters", "type": "[str]"},
"hours_between_backups": {"key": "hoursBetweenBackups", "type": "int"},
"deallocated": {"key": "deallocated", "type": "bool"},
"cassandra_audit_logging_enabled": {"key": "cassandraAuditLoggingEnabled", "type": "bool"},
"cluster_type": {"key": "clusterType", "type": "str"},
"provision_error": {"key": "provisionError", "type": "CassandraError"},
"extensions": {"key": "extensions", "type": "[str]"},
"backup_schedules": {"key": "backupSchedules", "type": "[BackupSchedule]"},
"scheduled_event_strategy": {"key": "scheduledEventStrategy", "type": "str"},
"azure_connection_method": {"key": "azureConnectionMethod", "type": "str"},
"private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"},
}
def __init__( # pylint: disable=too-many-locals
self,
*,
provisioning_state: Optional[Union[str, "_models.ManagedCassandraProvisioningState"]] = None,
restore_from_backup_id: Optional[str] = None,
delegated_management_subnet_id: Optional[str] = None,
cassandra_version: Optional[str] = None,
cluster_name_override: Optional[str] = None,
authentication_method: Optional[Union[str, "_models.AuthenticationMethod"]] = None,
initial_cassandra_admin_password: Optional[str] = None,
prometheus_endpoint: Optional["_models.SeedNode"] = None,
repair_enabled: Optional[bool] = None,
auto_replicate: Optional[Union[str, "_models.AutoReplicate"]] = None,
client_certificates: Optional[List["_models.Certificate"]] = None,
external_gossip_certificates: Optional[List["_models.Certificate"]] = None,
external_seed_nodes: Optional[List["_models.SeedNode"]] = None,
external_data_centers: Optional[List[str]] = None,
hours_between_backups: Optional[int] = None,
deallocated: Optional[bool] = None,
cassandra_audit_logging_enabled: Optional[bool] = None,
cluster_type: Optional[Union[str, "_models.ClusterType"]] = None,
provision_error: Optional["_models.CassandraError"] = None,
extensions: Optional[List[str]] = None,
backup_schedules: Optional[List["_models.BackupSchedule"]] = None,
scheduled_event_strategy: Optional[Union[str, "_models.ScheduledEventStrategy"]] = None,
azure_connection_method: Optional[Union[str, "_models.AzureConnectionType"]] = 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 restore_from_backup_id: To create an empty cluster, omit this field or set it to null.
To restore a backup into a new cluster, set this field to the resource id of the backup.
:paramtype restore_from_backup_id: str
:keyword delegated_management_subnet_id: Resource id of a subnet that this cluster's management
service should have its network interface attached to. The subnet must be routable to all
subnets that will be delegated to data centers. The resource id must be of the form
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
network>`/subnets/:code:`<subnet>`'.
:paramtype delegated_management_subnet_id: str
:keyword cassandra_version: Which version of Cassandra should this cluster converge to running
(e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
:paramtype cassandra_version: str
:keyword cluster_name_override: If you need to set the clusterName property in cassandra.yaml
to something besides the resource name of the cluster, set the value to use on this property.
:paramtype cluster_name_override: str
:keyword authentication_method: Which authentication method Cassandra should use to
authenticate clients. 'None' turns off authentication, so should not be used except in
emergencies. 'Cassandra' is the default password based authentication. The default is
'Cassandra'. Known values are: "None", "Cassandra", and "Ldap".
:paramtype authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod
:keyword initial_cassandra_admin_password: Initial password for clients connecting as admin to
the cluster. Should be changed after cluster creation. Returns null on GET. This field only
applies when the authenticationMethod field is 'Cassandra'.
:paramtype initial_cassandra_admin_password: str
:keyword prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing
data about the managed Cassandra nodes can be reached.
:paramtype prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode
:keyword repair_enabled: Should automatic repairs run on this cluster? If omitted, this is
true, and should stay true unless you are running a hybrid cluster where you are already doing
your own repairs.
:paramtype repair_enabled: bool
:keyword auto_replicate: The form of AutoReplicate that is being used by this cluster. Known
values are: "None", "SystemKeyspaces", and "AllKeyspaces".
:paramtype auto_replicate: str or ~azure.mgmt.cosmosdb.models.AutoReplicate
:keyword client_certificates: List of TLS certificates used to authorize clients connecting to
the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if
clientCertificates is set, the managed Cassandra cluster will reject all connections not
bearing a TLS client certificate that can be validated from one or more of the public
certificates in this property.
:paramtype client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:keyword external_gossip_certificates: List of TLS certificates used to authorize gossip from
unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be
verifiable using one of the certificates provided in this property.
:paramtype external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:keyword external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers.
These will be added to the seed node lists of all managed nodes.
:paramtype external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode]
:keyword external_data_centers: List of the data center names for unmanaged data centers in
this cluster to be included in auto-replication.
:paramtype external_data_centers: list[str]
:keyword hours_between_backups: (Deprecated) Number of hours to wait between taking a backup of
the cluster.
:paramtype hours_between_backups: int
:keyword deallocated: Whether the cluster and associated data centers has been deallocated.
:paramtype deallocated: bool
:keyword cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled.
:paramtype cassandra_audit_logging_enabled: bool
:keyword cluster_type: Type of the cluster. If set to Production, some operations might not be
permitted on cluster. Known values are: "Production" and "NonProduction".
:paramtype cluster_type: str or ~azure.mgmt.cosmosdb.models.ClusterType
:keyword provision_error: Error related to resource provisioning.
:paramtype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError
:keyword extensions: Extensions to be added or updated on cluster.
:paramtype extensions: list[str]
:keyword backup_schedules: List of backup schedules that define when you want to back up your
data.
:paramtype backup_schedules: list[~azure.mgmt.cosmosdb.models.BackupSchedule]
:keyword scheduled_event_strategy: How the nodes in the cluster react to scheduled events.
Known values are: "Ignore", "StopAny", and "StopByRack".
:paramtype scheduled_event_strategy: str or ~azure.mgmt.cosmosdb.models.ScheduledEventStrategy
:keyword azure_connection_method: How to connect to the azure services needed for running the
cluster. Known values are: "None" and "VPN".
:paramtype azure_connection_method: str or ~azure.mgmt.cosmosdb.models.AzureConnectionType
"""
super().__init__(**kwargs)
self.provisioning_state = provisioning_state
self.restore_from_backup_id = restore_from_backup_id
self.delegated_management_subnet_id = delegated_management_subnet_id
self.cassandra_version = cassandra_version
self.cluster_name_override = cluster_name_override
self.authentication_method = authentication_method
self.initial_cassandra_admin_password = initial_cassandra_admin_password
self.prometheus_endpoint = prometheus_endpoint
self.repair_enabled = repair_enabled
self.auto_replicate = auto_replicate
self.client_certificates = client_certificates
self.external_gossip_certificates = external_gossip_certificates
self.gossip_certificates = None
self.external_seed_nodes = external_seed_nodes
self.seed_nodes = None
self.external_data_centers = external_data_centers
self.hours_between_backups = hours_between_backups
self.deallocated = deallocated
self.cassandra_audit_logging_enabled = cassandra_audit_logging_enabled
self.cluster_type = cluster_type
self.provision_error = provision_error
self.extensions = extensions
self.backup_schedules = backup_schedules
self.scheduled_event_strategy = scheduled_event_strategy
self.azure_connection_method = azure_connection_method
self.private_link_resource_id = None
|
class ClusterResourceProperties(_serialization.Model):
'''Properties of a managed Cassandra cluster.
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 restore_from_backup_id: To create an empty cluster, omit this field or set it to null. To
restore a backup into a new cluster, set this field to the resource id of the backup.
:vartype restore_from_backup_id: str
:ivar delegated_management_subnet_id: Resource id of a subnet that this cluster's management
service should have its network interface attached to. The subnet must be routable to all
subnets that will be delegated to data centers. The resource id must be of the form
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
network>`/subnets/:code:`<subnet>`'.
:vartype delegated_management_subnet_id: str
:ivar cassandra_version: Which version of Cassandra should this cluster converge to running
(e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
:vartype cassandra_version: str
:ivar cluster_name_override: If you need to set the clusterName property in cassandra.yaml to
something besides the resource name of the cluster, set the value to use on this property.
:vartype cluster_name_override: str
:ivar authentication_method: Which authentication method Cassandra should use to authenticate
clients. 'None' turns off authentication, so should not be used except in emergencies.
'Cassandra' is the default password based authentication. The default is 'Cassandra'. Known
values are: "None", "Cassandra", and "Ldap".
:vartype authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod
:ivar initial_cassandra_admin_password: Initial password for clients connecting as admin to the
cluster. Should be changed after cluster creation. Returns null on GET. This field only applies
when the authenticationMethod field is 'Cassandra'.
:vartype initial_cassandra_admin_password: str
:ivar prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing data
about the managed Cassandra nodes can be reached.
:vartype prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode
:ivar repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true,
and should stay true unless you are running a hybrid cluster where you are already doing your
own repairs.
:vartype repair_enabled: bool
:ivar auto_replicate: The form of AutoReplicate that is being used by this cluster. Known
values are: "None", "SystemKeyspaces", and "AllKeyspaces".
:vartype auto_replicate: str or ~azure.mgmt.cosmosdb.models.AutoReplicate
:ivar client_certificates: List of TLS certificates used to authorize clients connecting to the
cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if
clientCertificates is set, the managed Cassandra cluster will reject all connections not
bearing a TLS client certificate that can be validated from one or more of the public
certificates in this property.
:vartype client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:ivar external_gossip_certificates: List of TLS certificates used to authorize gossip from
unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be
verifiable using one of the certificates provided in this property.
:vartype external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:ivar gossip_certificates: List of TLS certificates that unmanaged nodes must trust for gossip
with managed nodes. All managed nodes will present TLS client certificates that are verifiable
using one of the certificates provided in this property.
:vartype gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:ivar external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers. These
will be added to the seed node lists of all managed nodes.
:vartype external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode]
:ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should
be added to the seed node lists of all unmanaged nodes.
:vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode]
:ivar external_data_centers: List of the data center names for unmanaged data centers in this
cluster to be included in auto-replication.
:vartype external_data_centers: list[str]
:ivar hours_between_backups: (Deprecated) Number of hours to wait between taking a backup of
the cluster.
:vartype hours_between_backups: int
:ivar deallocated: Whether the cluster and associated data centers has been deallocated.
:vartype deallocated: bool
:ivar cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled.
:vartype cassandra_audit_logging_enabled: bool
:ivar cluster_type: Type of the cluster. If set to Production, some operations might not be
permitted on cluster. Known values are: "Production" and "NonProduction".
:vartype cluster_type: str or ~azure.mgmt.cosmosdb.models.ClusterType
:ivar provision_error: Error related to resource provisioning.
:vartype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError
:ivar extensions: Extensions to be added or updated on cluster.
:vartype extensions: list[str]
:ivar backup_schedules: List of backup schedules that define when you want to back up your
data.
:vartype backup_schedules: list[~azure.mgmt.cosmosdb.models.BackupSchedule]
:ivar scheduled_event_strategy: How the nodes in the cluster react to scheduled events. Known
values are: "Ignore", "StopAny", and "StopByRack".
:vartype scheduled_event_strategy: str or ~azure.mgmt.cosmosdb.models.ScheduledEventStrategy
:ivar azure_connection_method: How to connect to the azure services needed for running the
cluster. Known values are: "None" and "VPN".
:vartype azure_connection_method: str or ~azure.mgmt.cosmosdb.models.AzureConnectionType
:ivar private_link_resource_id: If the Connection Method is Vpn, this is the Id of the private
link resource that the datacenters need to connect to.
:vartype private_link_resource_id: str
'''
def __init__( # pylint: disable=too-many-locals
self,
*,
provisioning_state: Optional[Union[str, "_models.ManagedCassandraProvisioningState"]] = None,
restore_from_backup_id: Optional[str] = None,
delegated_management_subnet_id: Optional[str] = None,
cassandra_version: Optional[str] = None,
cluster_name_override: Optional[str] = None,
authentication_method: Optional[Union[str, "_models.AuthenticationMethod"]] = None,
initial_cassandra_admin_password: Optional[str] = None,
prometheus_endpoint: Optional["_models.SeedNode"] = None,
repair_enabled: Optional[bool] = None,
auto_replicate: Optional[Union[str, "_models.AutoReplicate"]] = None,
client_certificates: Optional[List["_models.Certificate"]] = None,
external_gossip_certificates: Optional[List["_models.Certificate"]] = None,
external_seed_nodes: Optional[List["_models.SeedNode"]] = None,
external_data_centers: Optional[List[str]] = None,
hours_between_backups: Optional[int] = None,
deallocated: Optional[bool] = None,
cassandra_audit_logging_enabled: Optional[bool] = None,
cluster_type: Optional[Union[str, "_models.ClusterType"]] = None,
provision_error: Optional["_models.CassandraError"] = None,
extensions: Optional[List[str]] = None,
backup_schedules: Optional[List["_models.BackupSchedule"]] = None,
scheduled_event_strategy: Optional[Union[str, "_models.ScheduledEventStrategy"]] = None,
azure_connection_method: Optional[Union[str, "_models.AzureConnectionType"]] = 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 restore_from_backup_id: To create an empty cluster, omit this field or set it to null.
To restore a backup into a new cluster, set this field to the resource id of the backup.
:paramtype restore_from_backup_id: str
:keyword delegated_management_subnet_id: Resource id of a subnet that this cluster's management
service should have its network interface attached to. The subnet must be routable to all
subnets that will be delegated to data centers. The resource id must be of the form
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
network>`/subnets/:code:`<subnet>`'.
:paramtype delegated_management_subnet_id: str
:keyword cassandra_version: Which version of Cassandra should this cluster converge to running
(e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
:paramtype cassandra_version: str
:keyword cluster_name_override: If you need to set the clusterName property in cassandra.yaml
to something besides the resource name of the cluster, set the value to use on this property.
:paramtype cluster_name_override: str
:keyword authentication_method: Which authentication method Cassandra should use to
authenticate clients. 'None' turns off authentication, so should not be used except in
emergencies. 'Cassandra' is the default password based authentication. The default is
'Cassandra'. Known values are: "None", "Cassandra", and "Ldap".
:paramtype authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod
:keyword initial_cassandra_admin_password: Initial password for clients connecting as admin to
the cluster. Should be changed after cluster creation. Returns null on GET. This field only
applies when the authenticationMethod field is 'Cassandra'.
:paramtype initial_cassandra_admin_password: str
:keyword prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing
data about the managed Cassandra nodes can be reached.
:paramtype prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode
:keyword repair_enabled: Should automatic repairs run on this cluster? If omitted, this is
true, and should stay true unless you are running a hybrid cluster where you are already doing
your own repairs.
:paramtype repair_enabled: bool
:keyword auto_replicate: The form of AutoReplicate that is being used by this cluster. Known
values are: "None", "SystemKeyspaces", and "AllKeyspaces".
:paramtype auto_replicate: str or ~azure.mgmt.cosmosdb.models.AutoReplicate
:keyword client_certificates: List of TLS certificates used to authorize clients connecting to
the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if
clientCertificates is set, the managed Cassandra cluster will reject all connections not
bearing a TLS client certificate that can be validated from one or more of the public
certificates in this property.
:paramtype client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:keyword external_gossip_certificates: List of TLS certificates used to authorize gossip from
unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be
verifiable using one of the certificates provided in this property.
:paramtype external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate]
:keyword external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers.
These will be added to the seed node lists of all managed nodes.
:paramtype external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode]
:keyword external_data_centers: List of the data center names for unmanaged data centers in
this cluster to be included in auto-replication.
:paramtype external_data_centers: list[str]
:keyword hours_between_backups: (Deprecated) Number of hours to wait between taking a backup of
the cluster.
:paramtype hours_between_backups: int
:keyword deallocated: Whether the cluster and associated data centers has been deallocated.
:paramtype deallocated: bool
:keyword cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled.
:paramtype cassandra_audit_logging_enabled: bool
:keyword cluster_type: Type of the cluster. If set to Production, some operations might not be
permitted on cluster. Known values are: "Production" and "NonProduction".
:paramtype cluster_type: str or ~azure.mgmt.cosmosdb.models.ClusterType
:keyword provision_error: Error related to resource provisioning.
:paramtype provision_error: ~azure.mgmt.cosmosdb.models.CassandraError
:keyword extensions: Extensions to be added or updated on cluster.
:paramtype extensions: list[str]
:keyword backup_schedules: List of backup schedules that define when you want to back up your
data.
:paramtype backup_schedules: list[~azure.mgmt.cosmosdb.models.BackupSchedule]
:keyword scheduled_event_strategy: How the nodes in the cluster react to scheduled events.
Known values are: "Ignore", "StopAny", and "StopByRack".
:paramtype scheduled_event_strategy: str or ~azure.mgmt.cosmosdb.models.ScheduledEventStrategy
:keyword azure_connection_method: How to connect to the azure services needed for running the
cluster. Known values are: "None" and "VPN".
:paramtype azure_connection_method: str or ~azure.mgmt.cosmosdb.models.AzureConnectionType
'''
pass
| 2 | 2 | 135 | 0 | 55 | 81 | 1 | 1.93 | 1 | 5 | 0 | 0 | 1 | 26 | 1 | 16 | 265 | 5 | 89 | 57 | 60 | 172 | 31 | 30 | 29 | 1 | 2 | 0 | 1 |
10,065 |
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.Column
|
class Column(_serialization.Model):
"""Cosmos DB Cassandra table column.
:ivar name: Name of the Cosmos DB Cassandra table column.
:vartype name: str
:ivar type: Type of the Cosmos DB Cassandra table column.
:vartype type: str
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
}
def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword name: Name of the Cosmos DB Cassandra table column.
:paramtype name: str
:keyword type: Type of the Cosmos DB Cassandra table column.
:paramtype type: str
"""
super().__init__(**kwargs)
self.name = name
self.type = type
|
class Column(_serialization.Model):
'''Cosmos DB Cassandra table column.
:ivar name: Name of the Cosmos DB Cassandra table column.
:vartype name: str
:ivar type: Type of the Cosmos DB Cassandra table column.
:vartype type: str
'''
def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword name: Name of the Cosmos DB Cassandra table column.
:paramtype name: str
:keyword type: Type of the Cosmos DB Cassandra table column.
:paramtype type: str
'''
pass
| 2 | 2 | 10 | 0 | 4 | 6 | 1 | 1.33 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 24 | 3 | 9 | 5 | 7 | 12 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
10,066 |
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.CommandAsyncPostBody
|
class CommandAsyncPostBody(_serialization.Model):
"""Specification of which command to run where.
All required parameters must be populated in order to send to server.
:ivar command: The command which should be run. Required.
:vartype command: str
:ivar arguments: The arguments for the command to be run.
:vartype arguments: dict[str, str]
:ivar host: IP address of the cassandra host to run the command on. Required.
:vartype host: str
:ivar cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:vartype cassandra_stop_start: bool
:ivar readwrite: If true, allows the command to *write* to the cassandra directory, otherwise
read-only.
:vartype readwrite: bool
"""
_validation = {
"command": {"required": True},
"host": {"required": True},
}
_attribute_map = {
"command": {"key": "command", "type": "str"},
"arguments": {"key": "arguments", "type": "{str}"},
"host": {"key": "host", "type": "str"},
"cassandra_stop_start": {"key": "cassandra-stop-start", "type": "bool"},
"readwrite": {"key": "readwrite", "type": "bool"},
}
def __init__(
self,
*,
command: str,
host: str,
arguments: Optional[Dict[str, str]] = None,
cassandra_stop_start: Optional[bool] = None,
readwrite: Optional[bool] = None,
**kwargs: Any
) -> None:
"""
:keyword command: The command which should be run. Required.
:paramtype command: str
:keyword arguments: The arguments for the command to be run.
:paramtype arguments: dict[str, str]
:keyword host: IP address of the cassandra host to run the command on. Required.
:paramtype host: str
:keyword cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:paramtype cassandra_stop_start: bool
:keyword readwrite: If true, allows the command to *write* to the cassandra directory,
otherwise read-only.
:paramtype readwrite: bool
"""
super().__init__(**kwargs)
self.command = command
self.arguments = arguments
self.host = host
self.cassandra_stop_start = cassandra_stop_start
self.readwrite = readwrite
|
class CommandAsyncPostBody(_serialization.Model):
'''Specification of which command to run where.
All required parameters must be populated in order to send to server.
:ivar command: The command which should be run. Required.
:vartype command: str
:ivar arguments: The arguments for the command to be run.
:vartype arguments: dict[str, str]
:ivar host: IP address of the cassandra host to run the command on. Required.
:vartype host: str
:ivar cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:vartype cassandra_stop_start: bool
:ivar readwrite: If true, allows the command to *write* to the cassandra directory, otherwise
read-only.
:vartype readwrite: bool
'''
def __init__(
self,
*,
command: str,
host: str,
arguments: Optional[Dict[str, str]] = None,
cassandra_stop_start: Optional[bool] = None,
readwrite: Optional[bool] = None,
**kwargs: Any
) -> None:
'''
:keyword command: The command which should be run. Required.
:paramtype command: str
:keyword arguments: The arguments for the command to be run.
:paramtype arguments: dict[str, str]
:keyword host: IP address of the cassandra host to run the command on. Required.
:paramtype host: str
:keyword cassandra_stop_start: If true, stops cassandra before executing the command and then
start it again.
:paramtype cassandra_stop_start: bool
:keyword readwrite: If true, allows the command to *write* to the cassandra directory,
otherwise read-only.
:paramtype readwrite: bool
'''
pass
| 2 | 2 | 30 | 0 | 16 | 14 | 1 | 1.04 | 1 | 4 | 0 | 0 | 1 | 5 | 1 | 16 | 62 | 5 | 28 | 18 | 17 | 29 | 10 | 9 | 8 | 1 | 2 | 0 | 1 |
10,067 |
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/incident/_list_bookmark.py
|
azext_sentinel.aaz.latest.sentinel.incident._list_bookmark.ListBookmark.IncidentsListBookmarks
|
class IncidentsListBookmarks(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/incidents/{incidentId}/bookmarks",
**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(
"incidentId", self.ctx.args.incident_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.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.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.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.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()
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 IncidentsListBookmarks(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 | 191 | 20 | 171 | 32 | 154 | 0 | 73 | 25 | 63 | 2 | 1 | 1 | 11 |
10,068 |
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.ClientEncryptionKeyResource
|
class ClientEncryptionKeyResource(_serialization.Model):
"""Cosmos DB client encryption key resource object.
:ivar id: Name of the ClientEncryptionKey.
:vartype id: str
:ivar encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:vartype encryption_algorithm: str
:ivar wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:vartype wrapped_data_encryption_key: bytes
:ivar key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:vartype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
"""
_attribute_map = {
"id": {"key": "id", "type": "str"},
"encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"},
"wrapped_data_encryption_key": {"key": "wrappedDataEncryptionKey", "type": "bytearray"},
"key_wrap_metadata": {"key": "keyWrapMetadata", "type": "KeyWrapMetadata"},
}
def __init__(
self,
*,
id: Optional[str] = None, # pylint: disable=redefined-builtin
encryption_algorithm: Optional[str] = None,
wrapped_data_encryption_key: Optional[bytes] = None,
key_wrap_metadata: Optional["_models.KeyWrapMetadata"] = None,
**kwargs: Any
) -> None:
"""
:keyword id: Name of the ClientEncryptionKey.
:paramtype id: str
:keyword encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:paramtype encryption_algorithm: str
:keyword wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:paramtype wrapped_data_encryption_key: bytes
:keyword key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:paramtype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
"""
super().__init__(**kwargs)
self.id = id
self.encryption_algorithm = encryption_algorithm
self.wrapped_data_encryption_key = wrapped_data_encryption_key
self.key_wrap_metadata = key_wrap_metadata
|
class ClientEncryptionKeyResource(_serialization.Model):
'''Cosmos DB client encryption key resource object.
:ivar id: Name of the ClientEncryptionKey.
:vartype id: str
:ivar encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:vartype encryption_algorithm: str
:ivar wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:vartype wrapped_data_encryption_key: bytes
:ivar key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:vartype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
'''
def __init__(
self,
*,
id: Optional[str] = None, # pylint: disable=redefined-builtin
encryption_algorithm: Optional[str] = None,
wrapped_data_encryption_key: Optional[bytes] = None,
key_wrap_metadata: Optional["_models.KeyWrapMetadata"] = None,
**kwargs: Any
) -> None:
'''
:keyword id: Name of the ClientEncryptionKey.
:paramtype id: str
:keyword encryption_algorithm: Encryption algorithm that will be used along with this client
encryption key to encrypt/decrypt data.
:paramtype encryption_algorithm: str
:keyword wrapped_data_encryption_key: Wrapped (encrypted) form of the key represented as a byte
array.
:paramtype wrapped_data_encryption_key: bytes
:keyword key_wrap_metadata: Metadata for the wrapping provider that can be used to unwrap the
wrapped client encryption key.
:paramtype key_wrap_metadata: ~azure.mgmt.cosmosdb.models.KeyWrapMetadata
'''
pass
| 2 | 2 | 27 | 0 | 14 | 14 | 1 | 1.29 | 1 | 4 | 0 | 1 | 1 | 4 | 1 | 16 | 50 | 3 | 21 | 15 | 11 | 27 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
10,069 |
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/incident/relation/_create.py
|
azext_sentinel.aaz.latest.sentinel.incident.relation._create.Create.IncidentRelationsCreateOrUpdate
|
class IncidentRelationsCreateOrUpdate(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/incidents/{incidentId}/relations/{relationName}",
**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(
"incidentId", self.ctx.args.incident_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
@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("relatedResourceId", AAZStrType, ".related_resource_id", 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.related_resource_id = AAZStrType(
serialized_name="relatedResourceId",
flags={"required": True},
)
properties.related_resource_kind = AAZStrType(
serialized_name="relatedResourceKind",
flags={"read_only": True},
)
properties.related_resource_name = AAZStrType(
serialized_name="relatedResourceName",
flags={"read_only": True},
)
properties.related_resource_type = AAZStrType(
serialized_name="relatedResourceType",
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},
)
return cls._schema_on_200_201
|
class IncidentRelationsCreateOrUpdate(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 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 171 | 19 | 152 | 32 | 133 | 0 | 59 | 24 | 48 | 2 | 1 | 1 | 13 |
10,070 |
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/incident/relation/_delete.py
|
azext_sentinel.aaz.latest.sentinel.incident.relation._delete.Delete.IncidentRelationsDelete
|
class IncidentRelationsDelete(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/incidents/{incidentId}/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(
"incidentId", self.ctx.args.incident_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 IncidentRelationsDelete(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 |
10,071 |
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/incident/relation/_list.py
|
azext_sentinel.aaz.latest.sentinel.incident.relation._list.List.IncidentRelationsList
|
class IncidentRelationsList(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/incidents/{incidentId}/relations",
**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(
"incidentId", self.ctx.args.incident_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(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"$orderby", self.ctx.args.orderby,
),
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**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.related_resource_id = AAZStrType(
serialized_name="relatedResourceId",
flags={"required": True},
)
properties.related_resource_kind = AAZStrType(
serialized_name="relatedResourceKind",
flags={"read_only": True},
)
properties.related_resource_name = AAZStrType(
serialized_name="relatedResourceName",
flags={"read_only": True},
)
properties.related_resource_type = AAZStrType(
serialized_name="relatedResourceType",
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},
)
return cls._schema_on_200
|
class IncidentRelationsList(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 | 17 | 1 | 16 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 172 | 18 | 154 | 30 | 137 | 0 | 56 | 23 | 46 | 2 | 1 | 1 | 11 |
10,072 |
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/site-recovery/azext_site_recovery/aaz/latest/site_recovery/alert_setting/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.alert_setting._update.Update.ReplicationAlertSettingsCreate
|
class ReplicationAlertSettingsCreate(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.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}",
**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(
"alertSettingName", self.ctx.args.alert_setting_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
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(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()
_UpdateHelper._build_schema_alert_read(cls._schema_on_200)
return cls._schema_on_200
|
class ReplicationAlertSettingsCreate(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 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
10,073 |
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/site-recovery/azext_site_recovery/aaz/latest/site_recovery/alert_setting/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.alert_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("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("customEmailAddresses",
AAZListType, ".custom_email_addresses")
properties.set_prop("locale", AAZStrType, ".locale")
properties.set_prop(
"sendToOwners", AAZStrType, ".send_to_owners")
custom_email_addresses = _builder.get(
".properties.customEmailAddresses")
if custom_email_addresses is not None:
custom_email_addresses.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 11 | 2 | 9 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 24 | 5 | 19 | 6 | 16 | 0 | 15 | 6 | 12 | 3 | 1 | 1 | 4 |
10,074 |
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/site-recovery/azext_site_recovery/aaz/latest/site_recovery/alert_setting/_show.py
|
azext_site_recovery.aaz.latest.site_recovery.alert_setting._show.Show.ReplicationAlertSettingsGet
|
class ReplicationAlertSettingsGet(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.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}",
**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(
"alertSettingName", self.ctx.args.alert_setting_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
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.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.custom_email_addresses = AAZListType(
serialized_name="customEmailAddresses",
)
properties.locale = AAZStrType()
properties.send_to_owners = AAZStrType(
serialized_name="sendToOwners",
)
custom_email_addresses = cls._schema_on_200.properties.custom_email_addresses
custom_email_addresses.Element = AAZStrType()
return cls._schema_on_200
|
class ReplicationAlertSettingsGet(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 | 10 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 110 | 16 | 94 | 28 | 77 | 0 | 44 | 21 | 34 | 2 | 1 | 1 | 11 |
10,075 |
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/site-recovery/azext_site_recovery/aaz/latest/site_recovery/alert_setting/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.alert_setting._list.List.ReplicationAlertSettingsList
|
class ReplicationAlertSettingsList(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.RecoveryServices/vaults/{resourceName}/replicationAlertSettings",
**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(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
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.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.custom_email_addresses = AAZListType(
serialized_name="customEmailAddresses",
)
properties.locale = AAZStrType()
properties.send_to_owners = AAZStrType(
serialized_name="sendToOwners",
)
custom_email_addresses = cls._schema_on_200.value.Element.properties.custom_email_addresses
custom_email_addresses.Element = AAZStrType()
return cls._schema_on_200
|
class ReplicationAlertSettingsList(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 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 115 | 18 | 97 | 30 | 80 | 0 | 49 | 23 | 39 | 2 | 1 | 1 | 11 |
10,076 |
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/site-recovery/azext_site_recovery/aaz/latest/site_recovery/alert_setting/_create.py
|
azext_site_recovery.aaz.latest.site_recovery.alert_setting._create.Create.ReplicationAlertSettingsCreate
|
class ReplicationAlertSettingsCreate(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.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}",
**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(
"alertSettingName", self.ctx.args.alert_setting_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
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("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("customEmailAddresses",
AAZListType, ".custom_email_addresses")
properties.set_prop("locale", AAZStrType, ".locale")
properties.set_prop(
"sendToOwners", AAZStrType, ".send_to_owners")
custom_email_addresses = _builder.get(
".properties.customEmailAddresses")
if custom_email_addresses is not None:
custom_email_addresses.set_elements(AAZStrType, ".")
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.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.custom_email_addresses = AAZListType(
serialized_name="customEmailAddresses",
)
properties.locale = AAZStrType()
properties.send_to_owners = AAZStrType(
serialized_name="sendToOwners",
)
custom_email_addresses = cls._schema_on_200.properties.custom_email_addresses
custom_email_addresses.Element = AAZStrType()
return cls._schema_on_200
|
class ReplicationAlertSettingsCreate(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 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 134 | 20 | 114 | 33 | 95 | 0 | 56 | 25 | 45 | 3 | 1 | 1 | 14 |
10,077 |
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/serial-console/azext_serialconsole/tests/latest/test_serialconsole_scenario.py
|
azext_serialconsole.tests.latest.test_serialconsole_scenario.SerialconsoleAdminCommandsTest
|
class SerialconsoleAdminCommandsTest(LiveScenarioTest):
def check_result(self, resource_group_name, vm_vmss_name, vmss_instanceid=None, message=""):
ARM_ENDPOINT = "https://management.azure.com"
RP_PROVIDER = "Microsoft.SerialConsole"
subscription_id = self.get_subscription_id()
vm_path = f"virtualMachineScaleSets/{vm_vmss_name}/virtualMachines/{vmss_instanceid}" \
if vmss_instanceid else f"virtualMachines/{vm_vmss_name}"
connection_url = (f"{ARM_ENDPOINT}/subscriptions/{subscription_id}/resourcegroups/{resource_group_name}"
f"/providers/Microsoft.Compute/{vm_path}"
f"/providers/{RP_PROVIDER}/serialPorts/0"
f"/connect?api-version=2024-07-01")
from azure.cli.core._profile import Profile
token_info, _, _ = Profile().get_raw_token()
access_token = token_info[1]
application_json_format = "application/json"
headers = {'authorization': "Bearer " + access_token,
'accept': application_json_format,
'content-type': application_json_format}
result = requests.post(connection_url, headers=headers)
json_results = json.loads(result.text)
self.assertTrue(result.status_code ==
200 and "connectionString" in json_results)
websocket_url = json_results["connectionString"]
ws = websocket.WebSocket()
ws.connect(websocket_url + "?authorization=" +
access_token, timeout=30)
buffer = ""
while True:
try:
buffer += ws.recv()
except (websocket.WebSocketTimeoutException, websocket.WebSocketConnectionClosedException):
break
assert message in buffer
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_sysrq_VMSS(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
self.cmd(
'az vmss create -g {rg} -n {name} --image {urn} --instance-count 2 -l {loc} --orchestration-mode uniform')
self.cmd('az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"True\\",\\"StorageUri\\":\\"https://{sa}.blob.core.windows.net/\\"}}}}"')
result = self.cmd(
'vmss list-instances --resource-group {rg} --name {name} --query "[].instanceId"').get_output_in_json()
self.kwargs.update({'id': result[1]})
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
time.sleep(60)
for i in range(5):
try:
self.cmd('vmss get-instance-view --resource-group {rg} --name {name} --instance-id {id}', checks=[
self.check('statuses[0].code',
'ProvisioningState/succeeded'),
self.check('statuses[1].code', 'PowerState/running'),
])
break
except JMESPathCheckAssertionError:
time.sleep(30)
self.cmd(
'serial-console send sysrq -g {rg} -n {name} --instance-id {id} --input h')
self.check_result(resource_group, name,
vmss_instanceid=result[1], message="sysrq: HELP")
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_nmi_VMSS(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
self.cmd(
'az vmss create -g {rg} -n {name} --image {urn} --instance-count 2 -l {loc} --orchestration-mode uniform')
self.cmd('az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"True\\",\\"StorageUri\\":\\"https://{sa}.blob.core.windows.net/\\"}}}}"')
result = self.cmd(
'vmss list-instances --resource-group {rg} --name {name} --query "[].instanceId"').get_output_in_json()
self.kwargs.update({'id': result[1]})
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
time.sleep(60)
for i in range(5):
try:
self.cmd('vmss get-instance-view --resource-group {rg} --name {name} --instance-id {id}', checks=[
self.check('statuses[0].code',
'ProvisioningState/succeeded'),
self.check('statuses[1].code', 'PowerState/running'),
])
break
except JMESPathCheckAssertionError:
time.sleep(30)
self.cmd(
'serial-console send nmi -g {rg} -n {name} --instance-id {id}')
self.check_result(resource_group, name,
vmss_instanceid=result[1], message="NMI received")
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_reset_VMSS(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
self.cmd(
'az vmss create -g {rg} -n {name} --image {urn} --instance-count 2 -l {loc} --orchestration-mode uniform')
self.cmd('az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"True\\",\\"StorageUri\\":\\"https://{sa}.blob.core.windows.net/\\"}}}}"')
result = self.cmd(
'vmss list-instances --resource-group {rg} --name {name} --query "[].instanceId"').get_output_in_json()
self.kwargs.update({'id': result[1]})
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
time.sleep(60)
for i in range(5):
try:
self.cmd('vmss get-instance-view --resource-group {rg} --name {name} --instance-id {id}', checks=[
self.check('statuses[0].code',
'ProvisioningState/succeeded'),
self.check('statuses[1].code', 'PowerState/running'),
])
break
except JMESPathCheckAssertionError:
time.sleep(30)
self.cmd(
'serial-console send reset -g {rg} -n {name} --instance-id {id}')
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_nmi_VM(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
self.cmd(
'az vm create -g {rg} -n {name} --image {urn} --boot-diagnostics-storage {sa} -l {loc} --generate-ssh-keys')
time.sleep(60)
for i in range(5):
try:
self.cmd('vm get-instance-view --resource-group {rg} --name {name}', checks=[
self.check(
'instanceView.statuses[0].code', 'ProvisioningState/succeeded'),
self.check(
'instanceView.statuses[1].code', 'PowerState/running'),
])
break
except JMESPathCheckAssertionError:
time.sleep(30)
self.cmd('serial-console send nmi -g {rg} -n {name}')
self.check_result(resource_group, name, message="NMI received")
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_sysrq_VM(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
self.cmd(
'az vm create -g {rg} -n {name} --image {urn} --boot-diagnostics-storage {sa} -l {loc} --generate-ssh-keys')
time.sleep(60)
for i in range(5):
try:
self.cmd('vm get-instance-view --resource-group {rg} --name {name}', checks=[
self.check(
'instanceView.statuses[0].code', 'ProvisioningState/succeeded'),
self.check(
'instanceView.statuses[1].code', 'PowerState/running'),
])
break
except JMESPathCheckAssertionError:
time.sleep(30)
self.cmd('serial-console send sysrq -g {rg} -n {name} --input h')
self.check_result(resource_group, name, message="sysrq: HELP")
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_reset_VM(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
self.cmd(
'az vm create -g {rg} -n {name} --image {urn} --boot-diagnostics-storage {sa} -l {loc} --generate-ssh-keys')
time.sleep(60)
for i in range(5):
try:
self.cmd('vm get-instance-view --resource-group {rg} --name {name}', checks=[
self.check(
'instanceView.statuses[0].code', 'ProvisioningState/succeeded'),
self.check(
'instanceView.statuses[1].code', 'PowerState/running'),
])
break
except JMESPathCheckAssertionError:
time.sleep(30)
self.cmd('serial-console send reset -g {rg} -n {name}')
|
class SerialconsoleAdminCommandsTest(LiveScenarioTest):
def check_result(self, resource_group_name, vm_vmss_name, vmss_instanceid=None, message=""):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_sysrq_VMSS(self, resource_group, storage_account):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_nmi_VMSS(self, resource_group, storage_account):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_reset_VMSS(self, resource_group, storage_account):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_nmi_VMSS(self, resource_group, storage_account):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_sysrq_VMSS(self, resource_group, storage_account):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_send_reset_VMSS(self, resource_group, storage_account):
pass
| 20 | 0 | 29 | 0 | 28 | 0 | 3 | 0 | 1 | 1 | 0 | 0 | 7 | 0 | 7 | 7 | 221 | 10 | 211 | 44 | 190 | 0 | 113 | 38 | 104 | 4 | 1 | 2 | 22 |
10,078 |
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/serial-console/azext_serialconsole/tests/latest/test_serialconsole_scenario.py
|
azext_serialconsole.tests.latest.test_serialconsole_scenario.CheckResourceTest
|
class CheckResourceTest(ScenarioTest):
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_check_resource_VMSS(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
with self.assertRaises(ComputeClientResourceNotFoundError):
check_resource(self.cli_ctx, resource_group, name, None)
with self.assertRaises(ComputeClientResourceNotFoundError):
check_resource(self.cli_ctx, resource_group, name, "0")
self.cmd(
'az vmss create -g {rg} -n {name} --image {urn} --instance-count 2 -l {loc} --orchestration-mode uniform')
with self.assertRaises(ResourceNotFoundError):
check_resource(self.cli_ctx, resource_group, name, None)
iid = self.cmd(
'vmss list-instances --resource-group {rg} --name {name} --query "[].instanceId"').get_output_in_json()[0]
self.kwargs.update({'id': iid})
self.cmd(
'az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"True\\",\\"StorageUri\\" : null}}}}"')
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss deallocate -g {rg} -n {name} --instance-ids {id}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss start -g {rg} -n {name} --instance-ids {id}')
self.cmd('az vmss stop -g {rg} -n {name} --instance-ids {id}')
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss start -g {rg} -n {name} --instance-ids {id}')
self.cmd('az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"True\\",\\"StorageUri\\":\\"https://{sa}.blob.core.windows.net/\\"}}}}"')
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az serial-console disable')
with self.assertRaises(ForbiddenError):
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az serial-console enable')
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss deallocate -g {rg} -n {name} --instance-ids {id}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss start -g {rg} -n {name} --instance-ids {id}')
self.cmd('az vmss stop -g {rg} -n {name} --instance-ids {id}')
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss start -g {rg} -n {name} --instance-ids {id}')
self.cmd(
'az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"False\\",\\"StorageUri\\" : null}}}}"')
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss deallocate -g {rg} -n {name} --instance-ids {id}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd('az vmss start -g {rg} -n {name} --instance-ids {id}')
self.cmd(
'az vmss update --name {name} --resource-group {rg} --set virtualMachineProfile.diagnosticsProfile="{{\\"bootDiagnostics\\": {{\\"Enabled\\" : \\"True\\",\\"StorageUri\\" : null}}}}"')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, iid)
self.cmd(
'az vmss update-instances -g {rg} -n {name} --instance-ids {id}')
check_resource(self.cli_ctx, resource_group, name, iid)
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
@AllowLargeResponse()
def test_check_resource_VM(self, resource_group, storage_account):
name = self.create_random_name(prefix='cli', length=24)
self.kwargs.update({
'sa': storage_account,
'rg': resource_group,
'name': name,
'urn': 'Ubuntu2204',
'loc': 'westus2'
})
with self.assertRaises(ComputeClientResourceNotFoundError):
check_resource(self.cli_ctx, resource_group, name, None)
with self.assertRaises(ComputeClientResourceNotFoundError):
check_resource(self.cli_ctx, resource_group, name, "0")
self.cmd(
'az vm create -g {rg} -n {name} --image {urn} -l {loc} --generate-ssh-keys')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm boot-diagnostics enable -g {rg} -n {name}')
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm deallocate -g {rg} -n {name}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm start -g {rg} -n {name}')
self.cmd('az vm stop -g {rg} -n {name}')
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm boot-diagnostics disable -g {rg} -n {name}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm start -g {rg} -n {name}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd(
'az vm boot-diagnostics enable -g {rg} -n {name} --storage {sa}')
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az serial-console disable')
with self.assertRaises(ForbiddenError):
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az serial-console enable')
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm stop -g {rg} -n {name}')
check_resource(self.cli_ctx, resource_group, name, None)
self.cmd('az vm deallocate -g {rg} -n {name}')
with self.assertRaises(AzureConnectionError):
check_resource(self.cli_ctx, resource_group, name, None)
|
class CheckResourceTest(ScenarioTest):
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
def test_check_resource_VMSS(self, resource_group, storage_account):
pass
@ResourceGroupPreparer(name_prefix='cli_test_serialconsole', location='westus2')
@StorageAccountPreparer(name_prefix='cli', location="westus2")
@AllowLargeResponse()
def test_check_resource_VMSS(self, resource_group, storage_account):
pass
| 8 | 0 | 76 | 26 | 50 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 159 | 54 | 105 | 8 | 97 | 0 | 88 | 6 | 85 | 1 | 1 | 1 | 2 |
10,079 |
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/tests/latest/test_securityinsight.py
|
azext_sentinel.tests.latest.test_securityinsight.SentinelClientTest
|
class SentinelClientTest(ScenarioTest):
def __init__(self, method_name):
super().__init__(method_name)
self.cmd("extension add -n log-analytics-solution")
@AllowLargeResponse(size_kb=2048)
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_alert_rule_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"alert_rule_name": self.create_random_name("alert-rule-", 16),
"template_id": "65360bb0-8986-4ade-a89d-af3cf44d28aa"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel alert-rule create -n {alert_rule_name} -w {workspace_name} -g {rg} "
"--ms-security-incident \"{{product-filter:'Microsoft Cloud App Security',display-name:testing,enabled:true}}\"",
checks=[
self.check("name", "{alert_rule_name}"),
self.check("type", "Microsoft.SecurityInsights/alertRules")
]
)
self.cmd(
"sentinel alert-rule list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("@[0].name", "{alert_rule_name}")
]
)
self.cmd(
"sentinel alert-rule update -n {alert_rule_name} -w {workspace_name} -g {rg} --ms-security-incident display-name=tested")
self.cmd(
"sentinel alert-rule show -n {alert_rule_name} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{alert_rule_name}"),
self.check("displayName", "tested")
]
)
self.cmd(
"sentinel alert-rule delete -n {alert_rule_name} --workspace-name {workspace_name} -g {rg} --yes")
self.cmd(
"sentinel alert-rule template list -w {workspace_name} -g {rg}")
self.cmd(
"sentinel alert-rule template show -n {template_id} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{template_id}"),
self.check("kind", "Scheduled")
]
)
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_automation_rule_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"rule_name": self.create_random_name("rule-", 12)
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel automation-rule create -n {rule_name} -w {workspace_name} -g {rg} "
"--display-name 'High severity incidents escalation' --order 1 "
"--actions \"[{{order:1,modify-properties:{{action-configuration:{{severity:High}}}}}}]\" "
"--triggering-logic \"{{is-enabled:true,triggers-on:Incidents,triggers-when:Created}}\"",
checks=[
self.check("name", "{rule_name}"),
self.check(
"type", "Microsoft.SecurityInsights/AutomationRules")
]
)
self.cmd(
"sentinel automation-rule list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{rule_name}")
]
)
self.cmd(
"sentinel automation-rule update -n {rule_name} -w {workspace_name} -g {rg} --display-name 'New name'")
self.cmd(
"sentinel automation-rule show -n {rule_name} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{rule_name}"),
self.check("displayName", "New name"),
self.check(
"type", "Microsoft.SecurityInsights/AutomationRules")
]
)
self.cmd(
"sentinel automation-rule delete -n {rule_name} -w {workspace_name} -g {rg} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_bookmark_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"bookmark_id": "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"query": "SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)",
"expand_id": "27f76e63-c41b-480f-bb18-12ad2e011d49",
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel bookmark create -n {bookmark_id} -w {workspace_name} -g {rg} "
"--query-content '{query}' --query-result 'Security Event query result' "
"--display-name 'My bookmark' --notes 'Found a suspicious activity' "
"--entity-mappings \"[{{entity-type:Account,field-mappings:[{{identifier:Fullname,value:johndoe@microsoft.com}}]}}]\" "
"--tactics \"[Execution]\" "
"--techniques \"[T1609]\" "
"--labels \"[Tag1,Tag2]\"",
checks=[
self.check("name", "{bookmark_id}"),
self.check("query", "{query}")
]
)
self.cmd(
"sentinel bookmark list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{bookmark_id}")
]
)
self.cmd(
"sentinel bookmark show -n {bookmark_id} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{bookmark_id}"),
self.check("displayName", "My bookmark")
]
)
self.cmd(
"sentinel bookmark delete -n {bookmark_id} -w {workspace_name} -g {rg} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_incident_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"incident_id": "73e01a99-5cd7-4139-a149-9f2736ff2ab5"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel incident create -n {incident_id} -w {workspace_name} -g {rg} "
"--classification FalsePositive --classification-reason IncorrectAlertLogic --classification-comment 'Not a malicious activity' "
"--first-activity-time-utc 2019-01-01T13:00:30Z --last-activity-time-utc 2019-01-01T13:05:30Z "
"--severity High --status Closed --title 'My incident' --description 'This is a demo incident' "
"--owner \"{{object-id:2046feea-040d-4a46-9e2b-91c2941bfa70}}\"",
checks=[
self.check("name", "{incident_id}"),
self.check("classification", "FalsePositive")
]
)
self.cmd(
"sentinel incident list -w {workspace_name} -g {rg} --orderby 'properties/createdTimeUtc desc' --top 1",
checks=[
self.check("length(@)", "1"),
self.check("[0].name", "{incident_id}")
]
)
self.cmd(
"sentinel incident show -n {incident_id} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{incident_id}"),
self.check("classification", "FalsePositive")
]
)
self.cmd(
"sentinel incident delete -n {incident_id} -w {workspace_name} -g {rg} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_incident_comment_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"incident_id": "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"comment_id": "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel incident create -n {incident_id} -w {workspace_name} -g {rg} "
"--classification FalsePositive --classification-reason IncorrectAlertLogic --classification-comment 'Not a malicious activity' "
"--first-activity-time-utc 2019-01-01T13:00:30Z --last-activity-time-utc 2019-01-01T13:05:30Z "
"--severity High --status Closed --title 'My incident' --description 'This is a demo incident' "
"--owner \"{{object-id:2046feea-040d-4a46-9e2b-91c2941bfa70}}\""
)
self.cmd(
"sentinel incident comment create -n {comment_id} -w {workspace_name} -g {rg} --incident-id {incident_id} --message 'Some message'",
checks=[
self.check("name", "{comment_id}"),
self.check("message", "Some message")
]
)
self.cmd(
"sentinel incident comment list -w {workspace_name} -g {rg} --incident-id {incident_id}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{comment_id}")
]
)
self.cmd(
"sentinel incident comment update -n {comment_id} -w {workspace_name} -g {rg} --incident-id {incident_id} --message 'Some messages'")
self.cmd(
"sentinel incident comment show -n {comment_id} -w {workspace_name} -g {rg} --incident-id {incident_id}",
checks=[
self.check("name", "{comment_id}"),
self.check("message", "Some messages")
]
)
self.cmd(
"sentinel incident comment delete -n {comment_id} -w {workspace_name} -g {rg} --incident-id {incident_id} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_bookmark_relation_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"relation_name": self.create_random_name("relation-", 16),
"bookmark_id": "2216d0e1-91e3-4902-89fd-d2df8c535096",
"incident_id": "afbd324f-6c48-459c-8710-8d1e1cd03812",
"query": "SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel bookmark create -n {bookmark_id} -w {workspace_name} -g {rg} "
"--query-content '{query}' --query-result 'Security Event query result' "
"--display-name 'My bookmark' --notes 'Found a suspicious activity' "
"--entity-mappings \"[{{entity-type:Account,field-mappings:[{{identifier:Fullname,value:johndoe@microsoft.com}}]}}]\" "
"--tactics \"[Execution]\" "
"--techniques \"[T1609]\" "
"--labels \"[Tag1,Tag2]\""
)
self.kwargs["resource_id"] = self.cmd(
"sentinel incident create -n {incident_id} -w {workspace_name} -g {rg} "
"--classification FalsePositive --classification-reason IncorrectAlertLogic --classification-comment 'Not a malicious activity' "
"--first-activity-time-utc 2019-01-01T13:00:30Z --last-activity-time-utc 2019-01-01T13:05:30Z "
"--severity High --status Closed --title 'My incident' --description 'This is a demo incident' "
"--owner \"{{object-id:2046feea-040d-4a46-9e2b-91c2941bfa70}}\""
).get_output_in_json()["id"]
self.cmd(
"sentinel bookmark relation create -n {relation_name} -w {workspace_name} -g {rg} --bookmark-id {bookmark_id} --related-resource-id {resource_id}",
checks=[
self.check("name", "{relation_name}"),
self.check(
"type", "Microsoft.SecurityInsights/Bookmarks/relations")
]
)
self.cmd(
"sentinel bookmark relation list -w {workspace_name} -g {rg} --bookmark-id {bookmark_id}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{relation_name}")
]
)
self.cmd(
"sentinel bookmark relation show -n {relation_name} -w {workspace_name} -g {rg} --bookmark-id {bookmark_id}",
checks=[
self.check("name", "{relation_name}"),
self.check(
"type", "Microsoft.SecurityInsights/Bookmarks/relations")
]
)
self.cmd(
"sentinel bookmark relation delete -n {relation_name} -w {workspace_name} -g {rg} --bookmark-id {bookmark_id} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_incident_relation_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"relation_name": self.create_random_name("relation-", 16),
"bookmark_id": "2216d0e1-91e3-4902-89fd-d2df8c535096",
"incident_id": "afbd324f-6c48-459c-8710-8d1e1cd03812",
"query": "SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel incident create -n {incident_id} -w {workspace_name} -g {rg} "
"--classification FalsePositive --classification-reason IncorrectAlertLogic --classification-comment 'Not a malicious activity' "
"--first-activity-time-utc 2019-01-01T13:00:30Z --last-activity-time-utc 2019-01-01T13:05:30Z "
"--severity High --status Closed --title 'My incident' --description 'This is a demo incident' "
"--owner \"{{object-id:2046feea-040d-4a46-9e2b-91c2941bfa70}}\""
)
self.kwargs["resource_id"] = self.cmd(
"sentinel bookmark create -n {bookmark_id} -w {workspace_name} -g {rg} "
"--query-content '{query}' --query-result 'Security Event query result' "
"--display-name 'My bookmark' --notes 'Found a suspicious activity' "
"--entity-mappings \"[{{entity-type:Account,field-mappings:[{{identifier:Fullname,value:johndoe@microsoft.com}}]}}]\" "
"--tactics \"[Execution]\" "
"--techniques \"[T1609]\" "
"--labels \"[Tag1,Tag2]\""
).get_output_in_json()["id"]
self.cmd(
"sentinel incident relation create -n {relation_name} -w {workspace_name} -g {rg} --incident-id {incident_id} --related-resource-id {resource_id}",
checks=[
self.check("name", "{relation_name}"),
self.check(
"type", "Microsoft.SecurityInsights/Incidents/relations")
]
)
self.cmd(
"sentinel incident relation list -w {workspace_name} -g {rg} --incident-id {incident_id}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{relation_name}")
]
)
self.cmd(
"sentinel incident relation show -n {relation_name} -w {workspace_name} -g {rg} --incident-id {incident_id}",
checks=[
self.check("name", "{relation_name}"),
self.check(
"type", "Microsoft.SecurityInsights/Incidents/relations")
]
)
self.cmd(
"sentinel incident relation delete -n {relation_name} -w {workspace_name} -g {rg} --incident-id {incident_id} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_enrichment_crud(self):
self.kwargs.update({
"domain": "microsoft.com",
"ip_address": "1.2.3.4"
})
self.cmd(
"sentinel enrichment domain-whois show -g {rg} --domain {domain}",
checks=[
self.check("domain", "{domain}")
]
)
self.cmd(
"sentinel enrichment ip-geodata show -g {rg} --ip-address {ip_address}",
checks=[
self.check("ipAddr", "{ip_address}")
]
)
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_metadata_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"alert_rule_name": self.create_random_name("alert-rule-", 16),
"metadata_name": self.create_random_name("metadata-", 16),
"content_id": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.kwargs["parent_id"] = self.cmd(
"sentinel alert-rule create -n {alert_rule_name} -w {workspace_name} -g {rg} "
"--ms-security-incident \"{{product-filter:'Microsoft Cloud App Security',display-name:testing,enabled:true}}\""
).get_output_in_json()["id"]
self.cmd(
"sentinel metadata create -n {metadata_name} -w {workspace_name} -g {rg} "
"--content-id {content_id} --parent-id {parent_id} --kind AnalyticsRule",
checks=[
self.check("name", "{metadata_name}"),
self.check("contentId", "{content_id}")
]
)
self.cmd(
"sentinel metadata list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{metadata_name}")
]
)
self.cmd(
"sentinel metadata update -n {metadata_name} -w {workspace_name} -g {rg} --author \"{{name:cli,email:cli@microsoft.com}}\"")
self.cmd(
"sentinel metadata show -n {metadata_name} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{metadata_name}"),
self.check("author.name", "cli"),
self.check("author.email", "cli@microsoft.com")
]
)
self.cmd(
"sentinel metadata delete -n {metadata_name} -w {workspace_name} -g {rg} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_onboarding_state_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16)
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel onboarding-state create -n default -w {workspace_name} -g {rg} --customer-managed-key false",
checks=[
self.check("name", "default"),
self.check(
"type", "Microsoft.SecurityInsights/onboardingStates")
]
)
self.cmd(
"sentinel onboarding-state list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("value[0].name", "default")
]
)
self.cmd(
"sentinel onboarding-state show -n default -w {workspace_name} -g {rg}",
checks=[
self.check("name", "default"),
self.check(
"type", "Microsoft.SecurityInsights/onboardingStates")
]
)
self.cmd(
"sentinel onboarding-state delete -n default -w {workspace_name} -g {rg} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_threat_indicator_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"reference": "contoso@contoso.com"
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.kwargs["indicator_name"] = self.cmd(
"sentinel threat-indicator create -w {workspace_name} -g {rg} "
"--source 'Microsoft Sentinel' --display-name 'new schema' --confidence 78 --created-by-ref {reference} "
"--modified '' --pattern '[url:value = 'https://www.contoso.com']' --pattern-type url --revoked false "
"--valid-from 2022-06-15T17:44:00.114052Z --valid-until '' --description 'debugging indicators' "
"--threat-tags \"['new schema']\" "
"--threat-types \"[compromised]\" "
"--external-references \"[]\"",
checks=[
self.check("createdByRef", "{reference}"),
self.check(
"type", "Microsoft.SecurityInsights/threatIntelligence")
]
).get_output_in_json()["name"]
self.cmd(
"sentinel threat-indicator list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("[0].createdByRef", "{reference}")
]
)
self.cmd(
"sentinel threat-indicator show -n {indicator_name} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{indicator_name}"),
self.check("confidence", "78")
]
)
self.cmd(
"sentinel threat-indicator delete -n {indicator_name} -w {workspace_name} -g {rg} --yes")
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_watchlist_crud(self):
self.kwargs.update({
"workspace_name": self.create_random_name("workspace-", 16),
"watchlist_name": self.create_random_name("watchlist-", 16)
})
self.cmd(
"monitor log-analytics workspace create -n {workspace_name} -g {rg}")
self.cmd(
"monitor log-analytics solution create -t SecurityInsights -w {workspace_name} -g {rg}")
self.cmd(
"sentinel watchlist create -n {watchlist_name} -w {workspace_name} -g {rg} "
"--description 'Watchlist from CSV content' --display-name 'High Value Assets Watchlist' "
"--provider Microsoft --items-search-key header1",
checks=[
self.check("name", "{watchlist_name}"),
self.check("type", "Microsoft.SecurityInsights/Watchlists")
]
)
self.cmd(
"sentinel watchlist list -w {workspace_name} -g {rg}",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{watchlist_name}")
]
)
self.cmd(
"sentinel watchlist update -n {watchlist_name} -w {workspace_name} -g {rg} --display-name 'New name'")
self.cmd(
"sentinel watchlist show -n {watchlist_name} -w {workspace_name} -g {rg}",
checks=[
self.check("name", "{watchlist_name}"),
self.check("displayName", "New name"),
self.check("type", "Microsoft.SecurityInsights/Watchlists")
]
)
self.cmd(
"sentinel watchlist delete -n {watchlist_name} -w {workspace_name} -g {rg} --yes")
|
class SentinelClientTest(ScenarioTest):
def __init__(self, method_name):
pass
@AllowLargeResponse(size_kb=2048)
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_alert_rule_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_automation_rule_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_bookmark_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_incident_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_incident_comment_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_bookmark_relation_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_incident_relation_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_enrichment_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_metadata_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_onboarding_state_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_threat_indicator_crud(self):
pass
@ResourceGroupPreparer(name_prefix="cli_test_sentinel_", location="eastus2")
def test_sentinel_watchlist_crud(self):
pass
| 27 | 0 | 38 | 4 | 33 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 13 | 0 | 13 | 13 | 516 | 70 | 446 | 26 | 419 | 0 | 109 | 14 | 95 | 1 | 1 | 0 | 13 |
10,080 |
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/watchlist/_update.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._update.Update.WatchlistsGet
|
class WatchlistsGet(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/watchlists/{watchlistAlias}",
**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(
"watchlistAlias", self.ctx.args.watchlist_alias,
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_watchlist_read(cls._schema_on_200)
return cls._schema_on_200
|
class WatchlistsGet(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 |
10,081 |
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/watchlist/_update.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._update.Update.WatchlistsCreateOrUpdate
|
class WatchlistsCreateOrUpdate(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/watchlists/{watchlistAlias}",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"watchlistAlias", self.ctx.args.watchlist_alias,
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_watchlist_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class WatchlistsCreateOrUpdate(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 |
10,082 |
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/watchlist/_update.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._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("contentType", AAZStrType, ".content_type")
properties.set_prop("created", AAZStrType, ".created")
_build_schema_user_info_update(properties.set_prop(
"createdBy", AAZObjectType, ".created_by"))
properties.set_prop("defaultDuration",
AAZStrType, ".default_duration")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("isDeleted", AAZBoolType, ".is_deleted")
properties.set_prop("itemsSearchKey", AAZStrType, ".items_search_key", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("labels", AAZListType, ".labels")
properties.set_prop("numberOfLinesToSkip",
AAZIntType, ".skip_num")
properties.set_prop("provider", AAZStrType, ".provider", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("rawContent", AAZStrType, ".raw_content")
properties.set_prop("source", AAZStrType, ".source")
properties.set_prop("sourceType", AAZStrType, ".source_type")
properties.set_prop("tenantId", AAZStrType, ".tenant_id")
properties.set_prop("updated", AAZStrType, ".updated")
_build_schema_user_info_update(properties.set_prop(
"updatedBy", AAZObjectType, ".updated_by"))
properties.set_prop(
"uploadStatus", AAZStrType, ".upload_status")
properties.set_prop(
"watchlistAlias", AAZStrType, ".watchlist_alias")
properties.set_prop("watchlistId", AAZStrType, ".watchlist_id")
properties.set_prop(
"watchlistType", AAZStrType, ".watchlist_type")
labels = _builder.get(".properties.labels")
if labels is not None:
labels.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 20 | 2 | 19 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 43 | 5 | 38 | 6 | 35 | 0 | 34 | 6 | 31 | 3 | 1 | 1 | 4 |
10,083 |
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/watchlist/_show.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._show.Show.WatchlistsGet
|
class WatchlistsGet(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/watchlists/{watchlistAlias}",
**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(
"watchlistAlias", self.ctx.args.watchlist_alias,
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.content_type = AAZStrType(
serialized_name="contentType",
)
properties.created = AAZStrType()
properties.created_by = AAZObjectType(
serialized_name="createdBy",
)
_build_schema_user_info_read(properties.created_by)
properties.default_duration = AAZStrType(
serialized_name="defaultDuration",
)
properties.description = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.is_deleted = AAZBoolType(
serialized_name="isDeleted",
)
properties.items_search_key = AAZStrType(
serialized_name="itemsSearchKey",
flags={"required": True},
)
properties.labels = AAZListType()
properties.number_of_lines_to_skip = AAZIntType(
serialized_name="numberOfLinesToSkip",
)
properties.provider = AAZStrType(
flags={"required": True},
)
properties.raw_content = AAZStrType(
serialized_name="rawContent",
)
properties.source = AAZStrType()
properties.source_type = AAZStrType(
serialized_name="sourceType",
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
)
properties.updated = AAZStrType()
properties.updated_by = AAZObjectType(
serialized_name="updatedBy",
)
_build_schema_user_info_read(properties.updated_by)
properties.upload_status = AAZStrType(
serialized_name="uploadStatus",
)
properties.watchlist_alias = AAZStrType(
serialized_name="watchlistAlias",
)
properties.watchlist_id = AAZStrType(
serialized_name="watchlistId",
)
properties.watchlist_type = AAZStrType(
serialized_name="watchlistType",
)
labels = cls._schema_on_200.properties.labels
labels.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 WatchlistsGet(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 | 192 | 17 | 175 | 29 | 158 | 0 | 72 | 22 | 62 | 2 | 1 | 1 | 11 |
10,084 |
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/watchlist/_list.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._list.List.WatchlistsList
|
class WatchlistsList(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/watchlists",
**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(
"$skipToken", self.ctx.args.skip_token,
),
**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.content_type = AAZStrType(
serialized_name="contentType",
)
properties.created = AAZStrType()
properties.created_by = AAZObjectType(
serialized_name="createdBy",
)
_build_schema_user_info_read(properties.created_by)
properties.default_duration = AAZStrType(
serialized_name="defaultDuration",
)
properties.description = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.is_deleted = AAZBoolType(
serialized_name="isDeleted",
)
properties.items_search_key = AAZStrType(
serialized_name="itemsSearchKey",
flags={"required": True},
)
properties.labels = AAZListType()
properties.number_of_lines_to_skip = AAZIntType(
serialized_name="numberOfLinesToSkip",
)
properties.provider = AAZStrType(
flags={"required": True},
)
properties.raw_content = AAZStrType(
serialized_name="rawContent",
)
properties.source = AAZStrType()
properties.source_type = AAZStrType(
serialized_name="sourceType",
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
)
properties.updated = AAZStrType()
properties.updated_by = AAZObjectType(
serialized_name="updatedBy",
)
_build_schema_user_info_read(properties.updated_by)
properties.upload_status = AAZStrType(
serialized_name="uploadStatus",
)
properties.watchlist_alias = AAZStrType(
serialized_name="watchlistAlias",
)
properties.watchlist_id = AAZStrType(
serialized_name="watchlistId",
)
properties.watchlist_type = AAZStrType(
serialized_name="watchlistType",
)
labels = cls._schema_on_200.value.Element.properties.labels
labels.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 WatchlistsList(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 | 1 | 19 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 203 | 19 | 184 | 31 | 167 | 0 | 77 | 24 | 67 | 2 | 1 | 1 | 11 |
10,085 |
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/watchlist/_delete.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._delete.Delete.WatchlistsDelete
|
class WatchlistsDelete(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/watchlists/{watchlistAlias}",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"watchlistAlias", self.ctx.args.watchlist_alias,
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 WatchlistsDelete(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 |
10,086 |
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/watchlist/_create.py
|
azext_sentinel.aaz.latest.sentinel.watchlist._create.Create.WatchlistsCreateOrUpdate
|
class WatchlistsCreateOrUpdate(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/watchlists/{watchlistAlias}",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"watchlistAlias", self.ctx.args.watchlist_alias,
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("contentType", AAZStrType, ".content_type")
properties.set_prop("created", AAZStrType, ".created")
_build_schema_user_info_create(properties.set_prop(
"createdBy", AAZObjectType, ".created_by"))
properties.set_prop("defaultDuration",
AAZStrType, ".default_duration")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("isDeleted", AAZBoolType, ".is_deleted")
properties.set_prop("itemsSearchKey", AAZStrType, ".items_search_key", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("labels", AAZListType, ".labels")
properties.set_prop("numberOfLinesToSkip",
AAZIntType, ".skip_num")
properties.set_prop("provider", AAZStrType, ".provider", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("rawContent", AAZStrType, ".raw_content")
properties.set_prop("source", AAZStrType, ".source")
properties.set_prop("sourceType", AAZStrType, ".source_type")
properties.set_prop("tenantId", AAZStrType, ".tenant_id")
properties.set_prop("updated", AAZStrType, ".updated")
_build_schema_user_info_create(properties.set_prop(
"updatedBy", AAZObjectType, ".updated_by"))
properties.set_prop(
"uploadStatus", AAZStrType, ".upload_status")
properties.set_prop(
"watchlistAlias", AAZStrType, ".watchlist_alias")
properties.set_prop("watchlistId", AAZStrType, ".watchlist_id")
properties.set_prop(
"watchlistType", AAZStrType, ".watchlist_type")
labels = _builder.get(".properties.labels")
if labels is not None:
labels.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.content_type = AAZStrType(
serialized_name="contentType",
)
properties.created = AAZStrType()
properties.created_by = AAZObjectType(
serialized_name="createdBy",
)
_build_schema_user_info_read(properties.created_by)
properties.default_duration = AAZStrType(
serialized_name="defaultDuration",
)
properties.description = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
properties.is_deleted = AAZBoolType(
serialized_name="isDeleted",
)
properties.items_search_key = AAZStrType(
serialized_name="itemsSearchKey",
flags={"required": True},
)
properties.labels = AAZListType()
properties.number_of_lines_to_skip = AAZIntType(
serialized_name="numberOfLinesToSkip",
)
properties.provider = AAZStrType(
flags={"required": True},
)
properties.raw_content = AAZStrType(
serialized_name="rawContent",
)
properties.source = AAZStrType()
properties.source_type = AAZStrType(
serialized_name="sourceType",
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
)
properties.updated = AAZStrType()
properties.updated_by = AAZObjectType(
serialized_name="updatedBy",
)
_build_schema_user_info_read(properties.updated_by)
properties.upload_status = AAZStrType(
serialized_name="uploadStatus",
)
properties.watchlist_alias = AAZStrType(
serialized_name="watchlistAlias",
)
properties.watchlist_id = AAZStrType(
serialized_name="watchlistId",
)
properties.watchlist_type = AAZStrType(
serialized_name="watchlistType",
)
labels = cls._schema_on_200_201.properties.labels
labels.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 WatchlistsCreateOrUpdate(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 | 21 | 1 | 20 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 235 | 21 | 214 | 34 | 195 | 0 | 103 | 26 | 92 | 3 | 1 | 1 | 14 |
10,087 |
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/threat_indicator/metric/_list.py
|
azext_sentinel.aaz.latest.sentinel.threat_indicator.metric._list.List.ThreatIntelligenceIndicatorMetricsList
|
class ThreatIntelligenceIndicatorMetricsList(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/threatIntelligence/main/metrics",
**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.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.properties = AAZObjectType()
properties = cls._schema_on_200.value.Element.properties
properties.last_updated_time_utc = AAZStrType(
serialized_name="lastUpdatedTimeUtc",
)
properties.pattern_type_metrics = AAZListType(
serialized_name="patternTypeMetrics",
)
properties.source_metrics = AAZListType(
serialized_name="sourceMetrics",
)
properties.threat_type_metrics = AAZListType(
serialized_name="threatTypeMetrics",
)
pattern_type_metrics = cls._schema_on_200.value.Element.properties.pattern_type_metrics
pattern_type_metrics.Element = AAZObjectType()
_build_schema_threat_intelligence_metric_entity_read(
pattern_type_metrics.Element)
source_metrics = cls._schema_on_200.value.Element.properties.source_metrics
source_metrics.Element = AAZObjectType()
_build_schema_threat_intelligence_metric_entity_read(
source_metrics.Element)
threat_type_metrics = cls._schema_on_200.value.Element.properties.threat_type_metrics
threat_type_metrics.Element = AAZObjectType()
_build_schema_threat_intelligence_metric_entity_read(
threat_type_metrics.Element)
return cls._schema_on_200
|
class ThreatIntelligenceIndicatorMetricsList(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 | 11 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 118 | 20 | 98 | 32 | 81 | 0 | 52 | 25 | 42 | 2 | 1 | 1 | 11 |
10,088 |
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/threat_indicator/_update.py
|
azext_sentinel.aaz.latest.sentinel.threat_indicator._update.Update.ThreatIntelligenceIndicatorCreate
|
class ThreatIntelligenceIndicatorCreate(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/threatIntelligence/main/indicators/{name}",
**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(
"name", self.ctx.args.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": {"required": True, "client_flatten": True}}
)
_builder.set_prop("etag", AAZStrType, ".etag")
_builder.set_const("kind", "indicator", AAZStrType, ".", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("confidence", AAZIntType, ".confidence")
properties.set_prop("created", AAZStrType, ".created")
properties.set_prop(
"createdByRef", AAZStrType, ".created_by_ref")
properties.set_prop("defanged", AAZBoolType, ".defanged")
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("externalId", AAZStrType, ".external_id")
properties.set_prop(
"externalLastUpdatedTimeUtc", AAZStrType, ".external_updated_time")
properties.set_prop("externalReferences",
AAZListType, ".external_references")
properties.set_prop("granularMarkings",
AAZListType, ".granular_markings")
properties.set_prop(
"indicatorTypes", AAZListType, ".indicator_types")
properties.set_prop("killChainPhases",
AAZListType, ".kill_chain_phases")
properties.set_prop("labels", AAZListType, ".labels")
properties.set_prop("language", AAZStrType, ".language")
properties.set_prop("lastUpdatedTimeUtc",
AAZStrType, ".last_updated_time")
properties.set_prop("modified", AAZStrType, ".modified")
properties.set_prop("objectMarkingRefs",
AAZListType, ".object_marking_refs")
properties.set_prop(
"parsedPattern", AAZListType, ".parsed_pattern")
properties.set_prop("pattern", AAZStrType, ".pattern")
properties.set_prop("patternType", AAZStrType, ".pattern_type")
properties.set_prop(
"patternVersion", AAZStrType, ".pattern_version")
properties.set_prop("revoked", AAZBoolType, ".revoked")
properties.set_prop("source", AAZStrType, ".source")
properties.set_prop("threatIntelligenceTags",
AAZListType, ".threat_tags")
properties.set_prop(
"threatTypes", AAZListType, ".threat_types")
properties.set_prop("validFrom", AAZStrType, ".valid_from")
properties.set_prop("validUntil", AAZStrType, ".valid_until")
external_references = _builder.get(
".properties.externalReferences")
if external_references is not None:
external_references.set_elements(AAZObjectType)
_elements = _builder.get(".properties.externalReferences[]")
if _elements is not None:
_elements.set_prop("description", AAZStrType, ".description")
_elements.set_prop("externalId", AAZStrType, ".external_id")
_elements.set_prop("hashes", AAZDictType, ".hashes")
_elements.set_prop("sourceName", AAZStrType, ".source_name")
_elements.set_prop("url", AAZStrType, ".url")
hashes = _builder.get(".properties.externalReferences[].hashes")
if hashes is not None:
hashes.set_elements(AAZStrType, ".")
granular_markings = _builder.get(".properties.granularMarkings")
if granular_markings is not None:
granular_markings.set_elements(AAZObjectType)
_elements = _builder.get(".properties.granularMarkings[]")
if _elements is not None:
_elements.set_prop("language", AAZStrType, ".language")
_elements.set_prop("markingRef", AAZIntType, ".marking_ref")
_elements.set_prop("selectors", AAZListType, ".selectors")
selectors = _builder.get(
".properties.granularMarkings[].selectors")
if selectors is not None:
selectors.set_elements(AAZStrType, ".")
indicator_types = _builder.get(".properties.indicatorTypes")
if indicator_types is not None:
indicator_types.set_elements(AAZStrType, ".")
kill_chain_phases = _builder.get(".properties.killChainPhases")
if kill_chain_phases is not None:
kill_chain_phases.set_elements(AAZObjectType)
_elements = _builder.get(".properties.killChainPhases[]")
if _elements is not None:
_elements.set_prop(
"killChainName", AAZStrType, ".kill_chain_name")
_elements.set_prop("phaseName", AAZStrType, ".phase_name")
labels = _builder.get(".properties.labels")
if labels is not None:
labels.set_elements(AAZStrType, ".")
object_marking_refs = _builder.get(".properties.objectMarkingRefs")
if object_marking_refs is not None:
object_marking_refs.set_elements(AAZStrType, ".")
parsed_pattern = _builder.get(".properties.parsedPattern")
if parsed_pattern is not None:
parsed_pattern.set_elements(AAZObjectType)
_elements = _builder.get(".properties.parsedPattern[]")
if _elements is not None:
_elements.set_prop(
"patternTypeKey", AAZStrType, ".pattern_type_key")
_elements.set_prop("patternTypeValues",
AAZListType, ".pattern_type_values")
pattern_type_values = _builder.get(
".properties.parsedPattern[].patternTypeValues")
if pattern_type_values is not None:
pattern_type_values.set_elements(AAZObjectType)
_elements = _builder.get(
".properties.parsedPattern[].patternTypeValues[]")
if _elements is not None:
_elements.set_prop("value", AAZStrType, ".value")
_elements.set_prop("valueType", AAZStrType, ".value_type")
threat_intelligence_tags = _builder.get(
".properties.threatIntelligenceTags")
if threat_intelligence_tags is not None:
threat_intelligence_tags.set_elements(AAZStrType, ".")
threat_types = _builder.get(".properties.threatTypes")
if threat_types is not None:
threat_types.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_indicator = cls._schema_on_200_201.discriminate_by(
"kind", "indicator")
disc_indicator.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties
properties.additional_data = AAZDictType(
serialized_name="additionalData",
flags={"read_only": True},
)
properties.confidence = AAZIntType()
properties.created = AAZStrType()
properties.created_by_ref = AAZStrType(
serialized_name="createdByRef",
)
properties.defanged = AAZBoolType()
properties.description = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.external_id = AAZStrType(
serialized_name="externalId",
)
properties.external_last_updated_time_utc = AAZStrType(
serialized_name="externalLastUpdatedTimeUtc",
)
properties.external_references = AAZListType(
serialized_name="externalReferences",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
flags={"read_only": True},
)
properties.granular_markings = AAZListType(
serialized_name="granularMarkings",
)
properties.indicator_types = AAZListType(
serialized_name="indicatorTypes",
)
properties.kill_chain_phases = AAZListType(
serialized_name="killChainPhases",
)
properties.labels = AAZListType()
properties.language = AAZStrType()
properties.last_updated_time_utc = AAZStrType(
serialized_name="lastUpdatedTimeUtc",
)
properties.modified = AAZStrType()
properties.object_marking_refs = AAZListType(
serialized_name="objectMarkingRefs",
)
properties.parsed_pattern = AAZListType(
serialized_name="parsedPattern",
)
properties.pattern = AAZStrType()
properties.pattern_type = AAZStrType(
serialized_name="patternType",
)
properties.pattern_version = AAZStrType(
serialized_name="patternVersion",
)
properties.revoked = AAZBoolType()
properties.source = AAZStrType()
properties.threat_intelligence_tags = AAZListType(
serialized_name="threatIntelligenceTags",
)
properties.threat_types = AAZListType(
serialized_name="threatTypes",
)
properties.valid_from = AAZStrType(
serialized_name="validFrom",
)
properties.valid_until = AAZStrType(
serialized_name="validUntil",
)
external_references = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.external_references
external_references.Element = AAZObjectType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.external_references.Element
_element.description = AAZStrType()
_element.external_id = AAZStrType(
serialized_name="externalId",
)
_element.hashes = AAZDictType()
_element.source_name = AAZStrType(
serialized_name="sourceName",
)
_element.url = AAZStrType()
hashes = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.external_references.Element.hashes
hashes.Element = AAZStrType()
granular_markings = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.granular_markings
granular_markings.Element = AAZObjectType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.granular_markings.Element
_element.language = AAZStrType()
_element.marking_ref = AAZIntType(
serialized_name="markingRef",
)
_element.selectors = AAZListType()
selectors = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.granular_markings.Element.selectors
selectors.Element = AAZStrType()
indicator_types = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.indicator_types
indicator_types.Element = AAZStrType()
kill_chain_phases = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.kill_chain_phases
kill_chain_phases.Element = AAZObjectType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.kill_chain_phases.Element
_element.kill_chain_name = AAZStrType(
serialized_name="killChainName",
)
_element.phase_name = AAZStrType(
serialized_name="phaseName",
)
labels = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.labels
labels.Element = AAZStrType()
object_marking_refs = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.object_marking_refs
object_marking_refs.Element = AAZStrType()
parsed_pattern = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.parsed_pattern
parsed_pattern.Element = AAZObjectType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.parsed_pattern.Element
_element.pattern_type_key = AAZStrType(
serialized_name="patternTypeKey",
)
_element.pattern_type_values = AAZListType(
serialized_name="patternTypeValues",
)
pattern_type_values = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.parsed_pattern.Element.pattern_type_values
pattern_type_values.Element = AAZObjectType()
_element = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.parsed_pattern.Element.pattern_type_values.Element
_element.value = AAZStrType()
_element.value_type = AAZStrType(
serialized_name="valueType",
)
threat_intelligence_tags = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.threat_intelligence_tags
threat_intelligence_tags.Element = AAZStrType()
threat_types = cls._schema_on_200_201.discriminate_by(
"kind", "indicator").properties.threat_types
threat_types.Element = AAZStrType()
return cls._schema_on_200_201
|
class ThreatIntelligenceIndicatorCreate(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 | 38 | 4 | 34 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 405 | 54 | 351 | 59 | 332 | 0 | 216 | 51 | 205 | 19 | 1 | 1 | 30 |
10,089 |
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.BackupInformation
|
class BackupInformation(_serialization.Model):
"""Backup information of a resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar continuous_backup_information: Information about the status of continuous backups.
:vartype continuous_backup_information: ~azure.mgmt.cosmosdb.models.ContinuousBackupInformation
"""
_validation = {
"continuous_backup_information": {"readonly": True},
}
_attribute_map = {
"continuous_backup_information": {"key": "continuousBackupInformation", "type": "ContinuousBackupInformation"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.continuous_backup_information = None
|
class BackupInformation(_serialization.Model):
'''Backup information of a resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar continuous_backup_information: Information about the status of continuous backups.
:vartype continuous_backup_information: ~azure.mgmt.cosmosdb.models.ContinuousBackupInformation
'''
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 |
10,090 |
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.AzureBlobDataTransferDataSourceSink
|
class AzureBlobDataTransferDataSourceSink(DataTransferDataSourceSink):
"""An Azure Blob Storage 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 container_name: Required.
:vartype container_name: str
:ivar endpoint_url:
:vartype endpoint_url: str
"""
_validation = {
"component": {"required": True},
"container_name": {"required": True},
}
_attribute_map = {
"component": {"key": "component", "type": "str"},
"container_name": {"key": "containerName", "type": "str"},
"endpoint_url": {"key": "endpointUrl", "type": "str"},
}
def __init__(self, *, container_name: str, endpoint_url: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword container_name: Required.
:paramtype container_name: str
:keyword endpoint_url:
:paramtype endpoint_url: str
"""
super().__init__(**kwargs)
self.component: str = "AzureBlobStorage"
self.container_name = container_name
self.endpoint_url = endpoint_url
|
class AzureBlobDataTransferDataSourceSink(DataTransferDataSourceSink):
'''An Azure Blob Storage 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 container_name: Required.
:vartype container_name: str
:ivar endpoint_url:
:vartype endpoint_url: str
'''
def __init__(self, *, container_name: str, endpoint_url: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword container_name: Required.
:paramtype container_name: str
:keyword endpoint_url:
:paramtype endpoint_url: str
'''
pass
| 2 | 2 | 11 | 0 | 5 | 6 | 1 | 1.07 | 1 | 3 | 0 | 0 | 1 | 3 | 1 | 17 | 36 | 5 | 15 | 7 | 13 | 16 | 8 | 7 | 6 | 1 | 3 | 0 | 1 |
10,091 |
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.AutoscaleSettingsResource
|
class AutoscaleSettingsResource(_serialization.Model):
"""Cosmos DB provisioned throughput settings object.
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 max_throughput: Represents maximum throughput container can scale up to. Required.
:vartype max_throughput: int
:ivar auto_upgrade_policy: Cosmos DB resource auto-upgrade policy.
:vartype auto_upgrade_policy: ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource
:ivar target_max_throughput: Represents target maximum throughput container can scale up to
once offer is no longer in pending state.
:vartype target_max_throughput: int
"""
_validation = {
"max_throughput": {"required": True},
"target_max_throughput": {"readonly": True},
}
_attribute_map = {
"max_throughput": {"key": "maxThroughput", "type": "int"},
"auto_upgrade_policy": {"key": "autoUpgradePolicy", "type": "AutoUpgradePolicyResource"},
"target_max_throughput": {"key": "targetMaxThroughput", "type": "int"},
}
def __init__(
self,
*,
max_throughput: int,
auto_upgrade_policy: Optional["_models.AutoUpgradePolicyResource"] = None,
**kwargs: Any
) -> None:
"""
:keyword max_throughput: Represents maximum throughput container can scale up to. Required.
:paramtype max_throughput: int
:keyword auto_upgrade_policy: Cosmos DB resource auto-upgrade policy.
:paramtype auto_upgrade_policy: ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource
"""
super().__init__(**kwargs)
self.max_throughput = max_throughput
self.auto_upgrade_policy = auto_upgrade_policy
self.target_max_throughput = None
|
class AutoscaleSettingsResource(_serialization.Model):
'''Cosmos DB provisioned throughput settings object.
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 max_throughput: Represents maximum throughput container can scale up to. Required.
:vartype max_throughput: int
:ivar auto_upgrade_policy: Cosmos DB resource auto-upgrade policy.
:vartype auto_upgrade_policy: ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource
:ivar target_max_throughput: Represents target maximum throughput container can scale up to
once offer is no longer in pending state.
:vartype target_max_throughput: int
'''
def __init__(
self,
*,
max_throughput: int,
auto_upgrade_policy: Optional["_models.AutoUpgradePolicyResource"] = None,
**kwargs: Any
) -> None:
'''
:keyword max_throughput: Represents maximum throughput container can scale up to. Required.
:paramtype max_throughput: int
:keyword auto_upgrade_policy: Cosmos DB resource auto-upgrade policy.
:paramtype auto_upgrade_policy: ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource
'''
pass
| 2 | 2 | 17 | 0 | 11 | 6 | 1 | 0.81 | 1 | 3 | 0 | 0 | 1 | 3 | 1 | 16 | 44 | 6 | 21 | 13 | 13 | 17 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
10,092 |
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.AutoscaleSettings
|
class AutoscaleSettings(_serialization.Model):
"""AutoscaleSettings.
:ivar max_throughput: Represents maximum throughput, the resource can scale up to.
:vartype max_throughput: int
"""
_attribute_map = {
"max_throughput": {"key": "maxThroughput", "type": "int"},
}
def __init__(self, *, max_throughput: Optional[int] = None, **kwargs: Any) -> None:
"""
:keyword max_throughput: Represents maximum throughput, the resource can scale up to.
:paramtype max_throughput: int
"""
super().__init__(**kwargs)
self.max_throughput = max_throughput
|
class AutoscaleSettings(_serialization.Model):
'''AutoscaleSettings.
:ivar max_throughput: Represents maximum throughput, the resource can scale up to.
:vartype max_throughput: int
'''
def __init__(self, *, max_throughput: Optional[int] = None, **kwargs: Any) -> None:
'''
:keyword max_throughput: Represents maximum throughput, the resource can scale up to.
:paramtype max_throughput: int
'''
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 |
10,093 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.SupportedActions
|
class SupportedActions(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates whether what action to take for the Chaos Fault."""
ENABLE = "Enable"
DISABLE = "Disable"
|
class SupportedActions(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''Indicates whether what action to take for the Chaos Fault.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
10,094 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.ThroughputPolicyType
|
class ThroughputPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""ThroughputPolicy to apply for throughput redistribution."""
NONE = "none"
EQUAL = "equal"
CUSTOM = "custom"
|
class ThroughputPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''ThroughputPolicy to apply for throughput redistribution.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
10,095 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.TriggerOperation
|
class TriggerOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The operation the trigger is associated with."""
ALL = "All"
CREATE = "Create"
UPDATE = "Update"
DELETE = "Delete"
REPLACE = "Replace"
|
class TriggerOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''The operation the trigger is associated with.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 8 | 1 | 6 | 6 | 5 | 1 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
10,096 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.TriggerType
|
class TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of the Trigger."""
PRE = "Pre"
POST = "Post"
|
class TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''Type of the Trigger.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
10,097 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.Type
|
class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of the connection string."""
SQL = "Sql"
TABLE = "Table"
MONGO_DB = "MongoDB"
CASSANDRA = "Cassandra"
CASSANDRA_CONNECTOR_METADATA = "CassandraConnectorMetadata"
GREMLIN = "Gremlin"
SQL_DEDICATED_GATEWAY = "SqlDedicatedGateway"
GREMLIN_V2 = "GremlinV2"
UNDEFINED = "Undefined"
|
class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''Type of the connection string.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 12 | 1 | 10 | 10 | 9 | 1 | 10 | 10 | 9 | 0 | 4 | 0 | 0 |
10,098 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.UnitType
|
class UnitType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The unit of the metric."""
COUNT = "Count"
BYTES = "Bytes"
SECONDS = "Seconds"
PERCENT = "Percent"
COUNT_PER_SECOND = "CountPerSecond"
BYTES_PER_SECOND = "BytesPerSecond"
MILLISECONDS = "Milliseconds"
|
class UnitType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''The unit of the metric.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 10 | 1 | 8 | 8 | 7 | 1 | 8 | 8 | 7 | 0 | 4 | 0 | 0 |
10,099 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_cosmos_db_management_client_enums.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._cosmos_db_management_client_enums.VectorDataType
|
class VectorDataType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates the data type of vector."""
FLOAT32 = "float32"
UINT8 = "uint8"
INT8 = "int8"
|
class VectorDataType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''Indicates the data type of vector.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.