Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR sql/resource-manager] Add ManagedServerSecurityAlertPolicy and ManagedDatabaseSecurityAlert… #2787

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_03_01_preview;

import com.microsoft.azure.arm.collection.SupportsCreating;
import rx.Observable;
import com.microsoft.azure.management.sql.v2017_03_01_preview.implementation.ManagedDatabaseSecurityAlertPoliciesInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing ManagedDatabaseSecurityAlertPolicies.
*/
public interface ManagedDatabaseSecurityAlertPolicies extends SupportsCreating<ManagedDatabaseSecurityAlertPolicy.DefinitionStages.Blank>, HasInner<ManagedDatabaseSecurityAlertPoliciesInner> {
/**
* Gets a managed database's security alert policy.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.
* @param databaseName The name of the managed database for which the security alert policy is defined.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ManagedDatabaseSecurityAlertPolicy> getAsync(String resourceGroupName, String managedInstanceName, String databaseName);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_03_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.sql.v2017_03_01_preview.implementation.ManagedDatabaseSecurityAlertPolicyInner;
import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.sql.v2017_03_01_preview.implementation.SqlManager;
import java.util.List;
import org.joda.time.DateTime;

/**
* Type representing ManagedDatabaseSecurityAlertPolicy.
*/
public interface ManagedDatabaseSecurityAlertPolicy extends HasInner<ManagedDatabaseSecurityAlertPolicyInner>, Indexable, Refreshable<ManagedDatabaseSecurityAlertPolicy>, Updatable<ManagedDatabaseSecurityAlertPolicy.Update>, HasManager<SqlManager> {
/**
* @return the creationTime value.
*/
DateTime creationTime();

/**
* @return the disabledAlerts value.
*/
List<String> disabledAlerts();

/**
* @return the emailAccountAdmins value.
*/
Boolean emailAccountAdmins();

/**
* @return the emailAddresses value.
*/
List<String> emailAddresses();

/**
* @return the id value.
*/
String id();

/**
* @return the name value.
*/
String name();

/**
* @return the retentionDays value.
*/
Integer retentionDays();

/**
* @return the state value.
*/
SecurityAlertPolicyState state();

/**
* @return the storageAccountAccessKey value.
*/
String storageAccountAccessKey();

/**
* @return the storageEndpoint value.
*/
String storageEndpoint();

/**
* @return the type value.
*/
String type();

/**
* The entirety of the ManagedDatabaseSecurityAlertPolicy definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabasis, DefinitionStages.WithState, DefinitionStages.WithCreate {
}

/**
* Grouping of ManagedDatabaseSecurityAlertPolicy definition stages.
*/
interface DefinitionStages {
/**
* The first stage of a ManagedDatabaseSecurityAlertPolicy definition.
*/
interface Blank extends WithDatabasis {
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify Databasis.
*/
interface WithDatabasis {
/**
* Specifies resourceGroupName, managedInstanceName, databaseName.
*/
WithState withExistingDatabasis(String resourceGroupName, String managedInstanceName, String databaseName);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify State.
*/
interface WithState {
/**
* Specifies state.
*/
WithCreate withState(SecurityAlertPolicyState state);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify DisabledAlerts.
*/
interface WithDisabledAlerts {
/**
* Specifies disabledAlerts.
*/
WithCreate withDisabledAlerts(List<String> disabledAlerts);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify EmailAccountAdmins.
*/
interface WithEmailAccountAdmins {
/**
* Specifies emailAccountAdmins.
*/
WithCreate withEmailAccountAdmins(Boolean emailAccountAdmins);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify EmailAddresses.
*/
interface WithEmailAddresses {
/**
* Specifies emailAddresses.
*/
WithCreate withEmailAddresses(List<String> emailAddresses);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify RetentionDays.
*/
interface WithRetentionDays {
/**
* Specifies retentionDays.
*/
WithCreate withRetentionDays(Integer retentionDays);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify StorageAccountAccessKey.
*/
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
*/
WithCreate withStorageAccountAccessKey(String storageAccountAccessKey);
}

/**
* The stage of the manageddatabasesecurityalertpolicy definition allowing to specify StorageEndpoint.
*/
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
*/
WithCreate withStorageEndpoint(String storageEndpoint);
}

/**
* The stage of the definition which contains all the minimum required inputs for
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<ManagedDatabaseSecurityAlertPolicy>, DefinitionStages.WithDisabledAlerts, DefinitionStages.WithEmailAccountAdmins, DefinitionStages.WithEmailAddresses, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageEndpoint {
}
}
/**
* The template for a ManagedDatabaseSecurityAlertPolicy update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<ManagedDatabaseSecurityAlertPolicy>, UpdateStages.WithDisabledAlerts, UpdateStages.WithEmailAccountAdmins, UpdateStages.WithEmailAddresses, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageEndpoint {
}

/**
* Grouping of ManagedDatabaseSecurityAlertPolicy update stages.
*/
interface UpdateStages {
/**
* The stage of the manageddatabasesecurityalertpolicy update allowing to specify DisabledAlerts.
*/
interface WithDisabledAlerts {
/**
* Specifies disabledAlerts.
*/
Update withDisabledAlerts(List<String> disabledAlerts);
}

/**
* The stage of the manageddatabasesecurityalertpolicy update allowing to specify EmailAccountAdmins.
*/
interface WithEmailAccountAdmins {
/**
* Specifies emailAccountAdmins.
*/
Update withEmailAccountAdmins(Boolean emailAccountAdmins);
}

/**
* The stage of the manageddatabasesecurityalertpolicy update allowing to specify EmailAddresses.
*/
interface WithEmailAddresses {
/**
* Specifies emailAddresses.
*/
Update withEmailAddresses(List<String> emailAddresses);
}

/**
* The stage of the manageddatabasesecurityalertpolicy update allowing to specify RetentionDays.
*/
interface WithRetentionDays {
/**
* Specifies retentionDays.
*/
Update withRetentionDays(Integer retentionDays);
}

/**
* The stage of the manageddatabasesecurityalertpolicy update allowing to specify StorageAccountAccessKey.
*/
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
*/
Update withStorageAccountAccessKey(String storageAccountAccessKey);
}

/**
* The stage of the manageddatabasesecurityalertpolicy update allowing to specify StorageEndpoint.
*/
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
*/
Update withStorageEndpoint(String storageEndpoint);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2017_03_01_preview;

import rx.Observable;

/**
* Type representing ManagedServerSecurityAlertPolicies.
*/
public interface ManagedServerSecurityAlertPolicies {
/**
* Begins definition for a new SecurityAlertPolicy resource.
* @param name resource name.
* @return the first stage of the new SecurityAlertPolicy definition.
*/
ManagedServerSecurityAlertPolicy.DefinitionStages.Blank defineSecurityAlertPolicy(String name);

/**
* Get a managed server's threat detection policy.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ManagedServerSecurityAlertPolicy> getAsync(String resourceGroupName, String managedInstanceName);

}
Loading