Skip to content
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
Expand Up @@ -21,14 +21,14 @@ public class DatabaseVulnerabilityAssessmentInner extends ProxyResourceInner {
* A blob storage container path to hold the scan results (e.g.
* https://myStorage.blob.core.windows.net/VaScans/).
*/
@JsonProperty(value = "properties.storageContainerPath")
@JsonProperty(value = "properties.storageContainerPath", required = true)
private String storageContainerPath;

/**
* A shared access signature (SAS Key) that has write access to the blob
* container specified in 'storageContainerPath' parameter.
*/
@JsonProperty(value = "properties.storageContainerSasKey")
@JsonProperty(value = "properties.storageContainerSasKey", required = true)
private String storageContainerSasKey;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ interface DatabaseVulnerabilityAssessmentScansService {
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}")
Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.DatabaseVulnerabilityAssessmentScans execute" })
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.DatabaseVulnerabilityAssessmentScans initiateScan" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan")
Observable<Response<ResponseBody>> execute(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Observable<Response<ResponseBody>> initiateScan(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.DatabaseVulnerabilityAssessmentScans beginExecute" })
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.DatabaseVulnerabilityAssessmentScans beginInitiateScan" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan")
Observable<Response<ResponseBody>> beginExecute(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Observable<Response<ResponseBody>> beginInitiateScan(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.DatabaseVulnerabilityAssessmentScans listByDatabase" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans")
Expand Down Expand Up @@ -194,8 +194,8 @@ private ServiceResponse<VulnerabilityAssessmentScanRecordInner> getDelegate(Resp
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void execute(String resourceGroupName, String serverName, String databaseName, String scanId) {
executeWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).toBlocking().last().body();
public void initiateScan(String resourceGroupName, String serverName, String databaseName, String scanId) {
initiateScanWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).toBlocking().last().body();
}

/**
Expand All @@ -209,8 +209,8 @@ public void execute(String resourceGroupName, String serverName, String database
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<Void> executeAsync(String resourceGroupName, String serverName, String databaseName, String scanId, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(executeWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId), serviceCallback);
public ServiceFuture<Void> initiateScanAsync(String resourceGroupName, String serverName, String databaseName, String scanId, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(initiateScanWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId), serviceCallback);
}

/**
Expand All @@ -223,8 +223,8 @@ public ServiceFuture<Void> executeAsync(String resourceGroupName, String serverN
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<Void> executeAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
return executeWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).map(new Func1<ServiceResponse<Void>, Void>() {
public Observable<Void> initiateScanAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
return initiateScanWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
Expand All @@ -242,7 +242,7 @@ public Void call(ServiceResponse<Void> response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<Void>> executeWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
public Observable<ServiceResponse<Void>> initiateScanWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
Expand All @@ -260,7 +260,7 @@ public Observable<ServiceResponse<Void>> executeWithServiceResponseAsync(String
}
final String vulnerabilityAssessmentName = "default";
final String apiVersion = "2017-10-01-preview";
Observable<Response<ResponseBody>> observable = service.execute(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
Observable<Response<ResponseBody>> observable = service.initiateScan(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}

Expand All @@ -275,8 +275,8 @@ public Observable<ServiceResponse<Void>> executeWithServiceResponseAsync(String
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void beginExecute(String resourceGroupName, String serverName, String databaseName, String scanId) {
beginExecuteWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).toBlocking().single().body();
public void beginInitiateScan(String resourceGroupName, String serverName, String databaseName, String scanId) {
beginInitiateScanWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).toBlocking().single().body();
}

/**
Expand All @@ -290,8 +290,8 @@ public void beginExecute(String resourceGroupName, String serverName, String dat
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<Void> beginExecuteAsync(String resourceGroupName, String serverName, String databaseName, String scanId, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginExecuteWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId), serviceCallback);
public ServiceFuture<Void> beginInitiateScanAsync(String resourceGroupName, String serverName, String databaseName, String scanId, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginInitiateScanWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId), serviceCallback);
}

/**
Expand All @@ -304,8 +304,8 @@ public ServiceFuture<Void> beginExecuteAsync(String resourceGroupName, String se
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginExecuteAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
return beginExecuteWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).map(new Func1<ServiceResponse<Void>, Void>() {
public Observable<Void> beginInitiateScanAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
return beginInitiateScanWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
Expand All @@ -323,7 +323,7 @@ public Void call(ServiceResponse<Void> response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginExecuteWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
public Observable<ServiceResponse<Void>> beginInitiateScanWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
Expand All @@ -341,12 +341,12 @@ public Observable<ServiceResponse<Void>> beginExecuteWithServiceResponseAsync(St
}
final String vulnerabilityAssessmentName = "default";
final String apiVersion = "2017-10-01-preview";
return service.beginExecute(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
return service.beginInitiateScan(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
@Override
public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
try {
ServiceResponse<Void> clientResponse = beginExecuteDelegate(response);
ServiceResponse<Void> clientResponse = beginInitiateScanDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
Expand All @@ -355,7 +355,7 @@ public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
});
}

private ServiceResponse<Void> beginExecuteDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
private ServiceResponse<Void> beginInitiateScanDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<Void>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,123 +601,6 @@ public DatabaseVulnerabilityAssessmentsInner databaseVulnerabilityAssessments()
return this.databaseVulnerabilityAssessments;
}

/**
* The JobAgentsInner object to access its operations.
*/
private JobAgentsInner jobAgents;

/**
* Gets the JobAgentsInner object to access its operations.
* @return the JobAgentsInner object.
*/
public JobAgentsInner jobAgents() {
return this.jobAgents;
}

/**
* The JobCredentialsInner object to access its operations.
*/
private JobCredentialsInner jobCredentials;

/**
* Gets the JobCredentialsInner object to access its operations.
* @return the JobCredentialsInner object.
*/
public JobCredentialsInner jobCredentials() {
return this.jobCredentials;
}

/**
* The JobExecutionsInner object to access its operations.
*/
private JobExecutionsInner jobExecutions;

/**
* Gets the JobExecutionsInner object to access its operations.
* @return the JobExecutionsInner object.
*/
public JobExecutionsInner jobExecutions() {
return this.jobExecutions;
}

/**
* The JobsInner object to access its operations.
*/
private JobsInner jobs;

/**
* Gets the JobsInner object to access its operations.
* @return the JobsInner object.
*/
public JobsInner jobs() {
return this.jobs;
}

/**
* The JobStepExecutionsInner object to access its operations.
*/
private JobStepExecutionsInner jobStepExecutions;

/**
* Gets the JobStepExecutionsInner object to access its operations.
* @return the JobStepExecutionsInner object.
*/
public JobStepExecutionsInner jobStepExecutions() {
return this.jobStepExecutions;
}

/**
* The JobStepsInner object to access its operations.
*/
private JobStepsInner jobSteps;

/**
* Gets the JobStepsInner object to access its operations.
* @return the JobStepsInner object.
*/
public JobStepsInner jobSteps() {
return this.jobSteps;
}

/**
* The JobTargetExecutionsInner object to access its operations.
*/
private JobTargetExecutionsInner jobTargetExecutions;

/**
* Gets the JobTargetExecutionsInner object to access its operations.
* @return the JobTargetExecutionsInner object.
*/
public JobTargetExecutionsInner jobTargetExecutions() {
return this.jobTargetExecutions;
}

/**
* The JobTargetGroupsInner object to access its operations.
*/
private JobTargetGroupsInner jobTargetGroups;

/**
* Gets the JobTargetGroupsInner object to access its operations.
* @return the JobTargetGroupsInner object.
*/
public JobTargetGroupsInner jobTargetGroups() {
return this.jobTargetGroups;
}

/**
* The JobVersionsInner object to access its operations.
*/
private JobVersionsInner jobVersions;

/**
* Gets the JobVersionsInner object to access its operations.
* @return the JobVersionsInner object.
*/
public JobVersionsInner jobVersions() {
return this.jobVersions;
}

/**
* The LongTermRetentionBackupsInner object to access its operations.
*/
Expand Down Expand Up @@ -945,15 +828,6 @@ protected void initialize() {
this.virtualNetworkRules = new VirtualNetworkRulesInner(restClient().retrofit(), this);
this.databaseVulnerabilityAssessmentRuleBaselines = new DatabaseVulnerabilityAssessmentRuleBaselinesInner(restClient().retrofit(), this);
this.databaseVulnerabilityAssessments = new DatabaseVulnerabilityAssessmentsInner(restClient().retrofit(), this);
this.jobAgents = new JobAgentsInner(restClient().retrofit(), this);
this.jobCredentials = new JobCredentialsInner(restClient().retrofit(), this);
this.jobExecutions = new JobExecutionsInner(restClient().retrofit(), this);
this.jobs = new JobsInner(restClient().retrofit(), this);
this.jobStepExecutions = new JobStepExecutionsInner(restClient().retrofit(), this);
this.jobSteps = new JobStepsInner(restClient().retrofit(), this);
this.jobTargetExecutions = new JobTargetExecutionsInner(restClient().retrofit(), this);
this.jobTargetGroups = new JobTargetGroupsInner(restClient().retrofit(), this);
this.jobVersions = new JobVersionsInner(restClient().retrofit(), this);
this.longTermRetentionBackups = new LongTermRetentionBackupsInner(restClient().retrofit(), this);
this.backupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesInner(restClient().retrofit(), this);
this.managedDatabases = new ManagedDatabasesInner(restClient().retrofit(), this);
Expand Down