Skip to content

Commit

Permalink
[AutoPR sql/resource-manager] [DO NOT MERGE] Add DatabaseVulnerabilit…
Browse files Browse the repository at this point in the history
…yAssessments swagger (#2831)

* Generated from 6444d2002961b584bdaf3c93623a498ca3066cde

Clean non required params in version 10-2017

clean databaseVulnerabilityAssessmentScans

* Generated from 135edfbe1c84314a9e283bc0f095e673dadbf6e0

fix error in execute scan example
  • Loading branch information
AutorestCI authored Jul 27, 2018
1 parent ba12168 commit 9a3f5fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
hold the scan results (e.g.
https://myStorage.blob.core.windows.net/VaScans/).
:type storage_container_path: str
:param storage_container_sas_key: Required. A shared access signature (SAS
Key) that has write access to the blob container specified in
'storageContainerPath' parameter.
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If 'StorageContainerSasKey' isn't specified,
storageAccountAccessKey is required.
:type storage_account_access_key: str
:param recurring_scans: The recurring scans settings
:type recurring_scans:
~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties
Expand All @@ -44,7 +49,6 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'name': {'readonly': True},
'type': {'readonly': True},
'storage_container_path': {'required': True},
'storage_container_sas_key': {'required': True},
}

_attribute_map = {
Expand All @@ -53,11 +57,13 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'type': {'key': 'type', 'type': 'str'},
'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'},
'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'},
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'},
'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'},
}

def __init__(self, **kwargs):
super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs)
self.storage_container_path = kwargs.get('storage_container_path', None)
self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None)
self.storage_account_access_key = kwargs.get('storage_account_access_key', None)
self.recurring_scans = kwargs.get('recurring_scans', None)
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
hold the scan results (e.g.
https://myStorage.blob.core.windows.net/VaScans/).
:type storage_container_path: str
:param storage_container_sas_key: Required. A shared access signature (SAS
Key) that has write access to the blob container specified in
'storageContainerPath' parameter.
:param storage_container_sas_key: A shared access signature (SAS Key) that
has write access to the blob container specified in 'storageContainerPath'
parameter. If 'storageAccountAccessKey' isn't specified,
StorageContainerSasKey is required.
:type storage_container_sas_key: str
:param storage_account_access_key: Specifies the identifier key of the
auditing storage account. If 'StorageContainerSasKey' isn't specified,
storageAccountAccessKey is required.
:type storage_account_access_key: str
:param recurring_scans: The recurring scans settings
:type recurring_scans:
~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties
Expand All @@ -44,7 +49,6 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'name': {'readonly': True},
'type': {'readonly': True},
'storage_container_path': {'required': True},
'storage_container_sas_key': {'required': True},
}

_attribute_map = {
Expand All @@ -53,11 +57,13 @@ class DatabaseVulnerabilityAssessment(ProxyResource):
'type': {'key': 'type', 'type': 'str'},
'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'},
'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'},
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'},
'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'},
}

def __init__(self, *, storage_container_path: str, storage_container_sas_key: str, recurring_scans=None, **kwargs) -> None:
def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None:
super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs)
self.storage_container_path = storage_container_path
self.storage_container_sas_key = storage_container_sas_key
self.storage_account_access_key = storage_account_access_key
self.recurring_scans = recurring_scans

0 comments on commit 9a3f5fd

Please sign in to comment.