Skip to content

Commit

Permalink
[AutoPR sql/resource-manager] Adding Swagger for POST APIs used to up…
Browse files Browse the repository at this point in the history
…load a customer TDE certificates (#2759)

* Generated from e3529a46fd8d20ae6db5a542fe9762a365879439

Adding Swagger for POST APIs used to upload a customer TDE certificate in CMS

* Generated from 9f0ba3d29675d6160b4cd881c52991fef58e0927

Addressing Jared's comment on PR
- Remove certificateName property
- Remove Resource and ProxyResource manually
- Edit TdeCertificate to reference "../../../common/v1/types.json#/definitions/ProxyResource"

* Generated from 8a72b9ba5c2b5c8621cd628c62702a0bd4933259

Adding to all package-composite-v* and package-pure of appropriate version
  • Loading branch information
AutorestCI authored Jun 21, 2018
1 parent 0f759c6 commit 9e863b4
Show file tree
Hide file tree
Showing 26 changed files with 429 additions and 2,171 deletions.
29 changes: 8 additions & 21 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from .transparent_data_encryption_activity_py3 import TransparentDataEncryptionActivity
from .server_usage_py3 import ServerUsage
from .database_usage_py3 import DatabaseUsage
from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy
from .automatic_tuning_options_py3 import AutomaticTuningOptions
from .database_automatic_tuning_py3 import DatabaseAutomaticTuning
from .encryption_protector_py3 import EncryptionProtector
Expand Down Expand Up @@ -80,10 +81,6 @@
from .sync_member_py3 import SyncMember
from .subscription_usage_py3 import SubscriptionUsage
from .virtual_network_rule_py3 import VirtualNetworkRule
from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy
from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy
from .server_blob_auditing_policy_py3 import ServerBlobAuditingPolicy
from .database_blob_auditing_policy_py3 import DatabaseBlobAuditingPolicy
from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem
from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline
from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties
Expand Down Expand Up @@ -111,7 +108,6 @@
from .server_automatic_tuning_py3 import ServerAutomaticTuning
from .server_dns_alias_py3 import ServerDnsAlias
from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition
from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy
from .restore_point_py3 import RestorePoint
from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition
from .database_operation_py3 import DatabaseOperation
Expand Down Expand Up @@ -148,6 +144,7 @@
from .managed_instance_pair_info_py3 import ManagedInstancePairInfo
from .instance_failover_group_py3 import InstanceFailoverGroup
from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy
from .tde_certificate_py3 import TdeCertificate
except (SyntaxError, ImportError):
from .recoverable_database import RecoverableDatabase
from .restorable_dropped_database import RestorableDroppedDatabase
Expand Down Expand Up @@ -187,6 +184,7 @@
from .transparent_data_encryption_activity import TransparentDataEncryptionActivity
from .server_usage import ServerUsage
from .database_usage import DatabaseUsage
from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy
from .automatic_tuning_options import AutomaticTuningOptions
from .database_automatic_tuning import DatabaseAutomaticTuning
from .encryption_protector import EncryptionProtector
Expand Down Expand Up @@ -219,10 +217,6 @@
from .sync_member import SyncMember
from .subscription_usage import SubscriptionUsage
from .virtual_network_rule import VirtualNetworkRule
from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy
from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy
from .server_blob_auditing_policy import ServerBlobAuditingPolicy
from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy
from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem
from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline
from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties
Expand Down Expand Up @@ -250,7 +244,6 @@
from .server_automatic_tuning import ServerAutomaticTuning
from .server_dns_alias import ServerDnsAlias
from .server_dns_alias_acquisition import ServerDnsAliasAcquisition
from .server_security_alert_policy import ServerSecurityAlertPolicy
from .restore_point import RestorePoint
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .database_operation import DatabaseOperation
Expand Down Expand Up @@ -287,6 +280,7 @@
from .managed_instance_pair_info import ManagedInstancePairInfo
from .instance_failover_group import InstanceFailoverGroup
from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy
from .tde_certificate import TdeCertificate
from .recoverable_database_paged import RecoverableDatabasePaged
from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged
from .server_paged import ServerPaged
Expand Down Expand Up @@ -338,7 +332,6 @@
from .elastic_pool_operation_paged import ElasticPoolOperationPaged
from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged
from .instance_failover_group_paged import InstanceFailoverGroupPaged
from .backup_short_term_retention_policy_paged import BackupShortTermRetentionPolicyPaged
from .sql_management_client_enums import (
CheckNameAvailabilityReason,
ServerConnectionType,
Expand All @@ -364,6 +357,7 @@
RecommendedIndexType,
TransparentDataEncryptionStatus,
TransparentDataEncryptionActivityStatus,
BlobAuditingPolicyState,
AutomaticTuningMode,
AutomaticTuningOptionModeDesired,
AutomaticTuningOptionModeActual,
Expand All @@ -382,7 +376,6 @@
SyncDirection,
SyncMemberState,
VirtualNetworkRuleState,
BlobAuditingPolicyState,
JobAgentState,
JobExecutionLifecycle,
ProvisioningState,
Expand Down Expand Up @@ -414,7 +407,6 @@
VulnerabilityAssessmentScanState,
InstanceFailoverGroupReplicationRole,
LongTermRetentionDatabaseState,
VulnerabilityAssessmentPolicyBaselineName,
CapabilityGroup,
)

Expand Down Expand Up @@ -457,6 +449,7 @@
'TransparentDataEncryptionActivity',
'ServerUsage',
'DatabaseUsage',
'DatabaseBlobAuditingPolicy',
'AutomaticTuningOptions',
'DatabaseAutomaticTuning',
'EncryptionProtector',
Expand Down Expand Up @@ -489,10 +482,6 @@
'SyncMember',
'SubscriptionUsage',
'VirtualNetworkRule',
'ExtendedDatabaseBlobAuditingPolicy',
'ExtendedServerBlobAuditingPolicy',
'ServerBlobAuditingPolicy',
'DatabaseBlobAuditingPolicy',
'DatabaseVulnerabilityAssessmentRuleBaselineItem',
'DatabaseVulnerabilityAssessmentRuleBaseline',
'VulnerabilityAssessmentRecurringScansProperties',
Expand Down Expand Up @@ -520,7 +509,6 @@
'ServerAutomaticTuning',
'ServerDnsAlias',
'ServerDnsAliasAcquisition',
'ServerSecurityAlertPolicy',
'RestorePoint',
'CreateDatabaseRestorePointDefinition',
'DatabaseOperation',
Expand Down Expand Up @@ -557,6 +545,7 @@
'ManagedInstancePairInfo',
'InstanceFailoverGroup',
'BackupShortTermRetentionPolicy',
'TdeCertificate',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand Down Expand Up @@ -608,7 +597,6 @@
'ElasticPoolOperationPaged',
'VulnerabilityAssessmentScanRecordPaged',
'InstanceFailoverGroupPaged',
'BackupShortTermRetentionPolicyPaged',
'CheckNameAvailabilityReason',
'ServerConnectionType',
'SecurityAlertPolicyState',
Expand All @@ -633,6 +621,7 @@
'RecommendedIndexType',
'TransparentDataEncryptionStatus',
'TransparentDataEncryptionActivityStatus',
'BlobAuditingPolicyState',
'AutomaticTuningMode',
'AutomaticTuningOptionModeDesired',
'AutomaticTuningOptionModeActual',
Expand All @@ -651,7 +640,6 @@
'SyncDirection',
'SyncMemberState',
'VirtualNetworkRuleState',
'BlobAuditingPolicyState',
'JobAgentState',
'JobExecutionLifecycle',
'ProvisioningState',
Expand Down Expand Up @@ -683,6 +671,5 @@
'VulnerabilityAssessmentScanState',
'InstanceFailoverGroupReplicationRole',
'LongTermRetentionDatabaseState',
'VulnerabilityAssessmentPolicyBaselineName',
'CapabilityGroup',
]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,72 +43,14 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:param retention_days: Specifies the number of days to keep in the audit
logs.
:type retention_days: int
:param audit_actions_and_groups: Specifies the Actions-Groups and Actions
:param audit_actions_and_groups: Specifies the Actions and Actions-Groups
to audit.
The recommended set of action groups to use is the following combination -
this will audit all the queries and stored procedures executed against the
database, as well as successful and failed logins:
BATCH_COMPLETED_GROUP,
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP.
This above combination is also the set that is configured by default when
enabling auditing from the Azure portal.
The supported action groups to audit are (note: choose only specific
groups that cover your auditing needs. Using unnecessary groups could lead
to very large quantities of audit records):
APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
BACKUP_RESTORE_GROUP
DATABASE_LOGOUT_GROUP
DATABASE_OBJECT_CHANGE_GROUP
DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
DATABASE_OPERATION_GROUP
DATABASE_PERMISSION_CHANGE_GROUP
DATABASE_PRINCIPAL_CHANGE_GROUP
DATABASE_PRINCIPAL_IMPERSONATION_GROUP
DATABASE_ROLE_MEMBER_CHANGE_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
SCHEMA_OBJECT_ACCESS_GROUP
SCHEMA_OBJECT_CHANGE_GROUP
SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
USER_CHANGE_PASSWORD_GROUP
BATCH_STARTED_GROUP
BATCH_COMPLETED_GROUP
These are groups that cover all sql statements and stored procedures
executed against the database, and should not be used in combination with
other groups as this will result in duplicate audit logs.
For more information, see [Database-Level Audit Action
Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
For Database auditing policy, specific Actions can also be specified (note
that Actions cannot be specified for Server auditing policy). The
supported actions to audit are:
SELECT
UPDATE
INSERT
DELETE
EXECUTE
RECEIVE
REFERENCES
The general form for defining an action to be audited is:
<action> ON <object> BY <principal>
Note that <object> in the above format can refer to an object like a
table, view, or stored procedure, or an entire database or schema. For the
latter cases, the forms DATABASE::<db_name> and SCHEMA::<schema_name> are
used, respectively.
For example:
SELECT on dbo.myTable by public
SELECT on DATABASE::myDatabase by public
SELECT on SCHEMA::mySchema by public
For more information, see [Database-Level Audit
Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
:type audit_actions_and_groups: list[str]
:param storage_account_subscription_id: Specifies the blob storage
subscription Id.
:type storage_account_subscription_id: str
:param is_storage_secondary_key_in_use: Specifies whether
storageAccountAccessKey value is the storage's secondary key.
storageAccountAccessKey value is the storages secondary key.
:type is_storage_secondary_key_in_use: bool
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,72 +43,14 @@ class DatabaseBlobAuditingPolicy(ProxyResource):
:param retention_days: Specifies the number of days to keep in the audit
logs.
:type retention_days: int
:param audit_actions_and_groups: Specifies the Actions-Groups and Actions
:param audit_actions_and_groups: Specifies the Actions and Actions-Groups
to audit.
The recommended set of action groups to use is the following combination -
this will audit all the queries and stored procedures executed against the
database, as well as successful and failed logins:
BATCH_COMPLETED_GROUP,
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP.
This above combination is also the set that is configured by default when
enabling auditing from the Azure portal.
The supported action groups to audit are (note: choose only specific
groups that cover your auditing needs. Using unnecessary groups could lead
to very large quantities of audit records):
APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
BACKUP_RESTORE_GROUP
DATABASE_LOGOUT_GROUP
DATABASE_OBJECT_CHANGE_GROUP
DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
DATABASE_OPERATION_GROUP
DATABASE_PERMISSION_CHANGE_GROUP
DATABASE_PRINCIPAL_CHANGE_GROUP
DATABASE_PRINCIPAL_IMPERSONATION_GROUP
DATABASE_ROLE_MEMBER_CHANGE_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
SCHEMA_OBJECT_ACCESS_GROUP
SCHEMA_OBJECT_CHANGE_GROUP
SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
USER_CHANGE_PASSWORD_GROUP
BATCH_STARTED_GROUP
BATCH_COMPLETED_GROUP
These are groups that cover all sql statements and stored procedures
executed against the database, and should not be used in combination with
other groups as this will result in duplicate audit logs.
For more information, see [Database-Level Audit Action
Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
For Database auditing policy, specific Actions can also be specified (note
that Actions cannot be specified for Server auditing policy). The
supported actions to audit are:
SELECT
UPDATE
INSERT
DELETE
EXECUTE
RECEIVE
REFERENCES
The general form for defining an action to be audited is:
<action> ON <object> BY <principal>
Note that <object> in the above format can refer to an object like a
table, view, or stored procedure, or an entire database or schema. For the
latter cases, the forms DATABASE::<db_name> and SCHEMA::<schema_name> are
used, respectively.
For example:
SELECT on dbo.myTable by public
SELECT on DATABASE::myDatabase by public
SELECT on SCHEMA::mySchema by public
For more information, see [Database-Level Audit
Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
:type audit_actions_and_groups: list[str]
:param storage_account_subscription_id: Specifies the blob storage
subscription Id.
:type storage_account_subscription_id: str
:param is_storage_secondary_key_in_use: Specifies whether
storageAccountAccessKey value is the storage's secondary key.
storageAccountAccessKey value is the storages secondary key.
:type is_storage_secondary_key_in_use: bool
"""

Expand Down
Loading

0 comments on commit 9e863b4

Please sign in to comment.