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 @@ -38,6 +38,12 @@ public class DeletedAppRestoreRequest extends ProxyOnlyResource {
@JsonProperty(value = "properties.snapshotTime")
private String snapshotTime;

/**
* If true, the snapshot is retrieved from DRSecondary endpoint.
*/
@JsonProperty(value = "properties.useDRSecondary")
private Boolean useDRSecondary;

/**
* Get aRM resource ID of the deleted app. Example:
/subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}.
Expand Down Expand Up @@ -102,4 +108,24 @@ public DeletedAppRestoreRequest withSnapshotTime(String snapshotTime) {
return this;
}

/**
* Get if true, the snapshot is retrieved from DRSecondary endpoint.
*
* @return the useDRSecondary value
*/
public Boolean useDRSecondary() {
return this.useDRSecondary;
}

/**
* Set if true, the snapshot is retrieved from DRSecondary endpoint.
*
* @param useDRSecondary the useDRSecondary value to set
* @return the DeletedAppRestoreRequest object itself.
*/
public DeletedAppRestoreRequest withUseDRSecondary(Boolean useDRSecondary) {
this.useDRSecondary = useDRSecondary;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public class SnapshotRestoreRequest extends ProxyOnlyResource {
@JsonProperty(value = "properties.ignoreConflictingHostNames")
private Boolean ignoreConflictingHostNames;

/**
* If true, the snapshot is retrieved from DRSecondary endpoint.
*/
@JsonProperty(value = "properties.useDRSecondary")
private Boolean useDRSecondary;

/**
* Get point in time in which the app restore should be done, formatted as a DateTime string.
*
Expand Down Expand Up @@ -156,4 +162,24 @@ public SnapshotRestoreRequest withIgnoreConflictingHostNames(Boolean ignoreConfl
return this;
}

/**
* Get if true, the snapshot is retrieved from DRSecondary endpoint.
*
* @return the useDRSecondary value
*/
public Boolean useDRSecondary() {
return this.useDRSecondary;
}

/**
* Set if true, the snapshot is retrieved from DRSecondary endpoint.
*
* @param useDRSecondary the useDRSecondary value to set
* @return the SnapshotRestoreRequest object itself.
*/
public SnapshotRestoreRequest withUseDRSecondary(Boolean useDRSecondary) {
this.useDRSecondary = useDRSecondary;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,17 @@ public interface WebApps {
*/
Completable swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity);

/**
* Returns all Snapshots to the user from DRSecondary endpoint.
* Returns all Snapshots to the user from DRSecondary endpoint.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Website Name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<Snapshot> listSnapshotsFromDRSecondaryAsync(final String resourceGroupName, final String name);

/**
* Starts an app (or deployment slot, if specified).
* Starts an app (or deployment slot, if specified).
Expand Down Expand Up @@ -3637,6 +3648,18 @@ public interface WebApps {
*/
Completable swapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity);

/**
* Returns all Snapshots to the user from DRSecondary endpoint.
* Returns all Snapshots to the user from DRSecondary endpoint.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Website Name.
* @param slot Website Slot.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<Snapshot> listSnapshotsFromDRSecondarySlotAsync(final String resourceGroupName, final String name, final String slot);

/**
* Starts an app (or deployment slot, if specified).
* Starts an app (or deployment slot, if specified).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.microsoft.azure.management.appservice.v2018_02_01.NetworkTrace;
import com.microsoft.azure.management.appservice.v2018_02_01.SitePhpErrorLogFlag;
import com.microsoft.azure.management.appservice.v2018_02_01.SlotDifference;
import com.microsoft.azure.management.appservice.v2018_02_01.Snapshot;
import com.microsoft.azure.management.appservice.v2018_02_01.CsmSlotEntity;
import com.microsoft.azure.management.appservice.v2018_02_01.StorageMigrationOptions;
import com.microsoft.azure.management.appservice.v2018_02_01.MigrateMySqlRequest;
Expand All @@ -45,7 +46,6 @@
import com.microsoft.azure.management.appservice.v2018_02_01.User;
import com.microsoft.azure.management.appservice.v2018_02_01.PushSettings;
import com.microsoft.azure.management.appservice.v2018_02_01.SlotConfigNamesResource;
import com.microsoft.azure.management.appservice.v2018_02_01.Snapshot;
import com.microsoft.azure.management.appservice.v2018_02_01.SiteConfigurationSnapshotInfo;
import com.microsoft.azure.management.appservice.v2018_02_01.ContinuousWebJob;
import com.microsoft.azure.management.appservice.v2018_02_01.Deployment;
Expand Down Expand Up @@ -961,6 +961,24 @@ public Completable swapSlotWithProductionAsync(String resourceGroupName, String
return client.swapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).toCompletable();
}

@Override
public Observable<Snapshot> listSnapshotsFromDRSecondaryAsync(final String resourceGroupName, final String name) {
WebAppsInner client = this.inner();
return client.listSnapshotsFromDRSecondaryAsync(resourceGroupName, name)
.flatMapIterable(new Func1<Page<SnapshotInner>, Iterable<SnapshotInner>>() {
@Override
public Iterable<SnapshotInner> call(Page<SnapshotInner> page) {
return page.items();
}
})
.map(new Func1<SnapshotInner, Snapshot>() {
@Override
public Snapshot call(SnapshotInner inner) {
return new SnapshotImpl(inner, manager());
}
});
}

@Override
public Completable startAsync(String resourceGroupName, String name) {
WebAppsInner client = this.inner();
Expand Down Expand Up @@ -3763,6 +3781,24 @@ public Completable swapSlotSlotAsync(String resourceGroupName, String name, Stri
return client.swapSlotSlotAsync(resourceGroupName, name, slot, slotSwapEntity).toCompletable();
}

@Override
public Observable<Snapshot> listSnapshotsFromDRSecondarySlotAsync(final String resourceGroupName, final String name, final String slot) {
WebAppsInner client = this.inner();
return client.listSnapshotsFromDRSecondarySlotAsync(resourceGroupName, name, slot)
.flatMapIterable(new Func1<Page<SnapshotInner>, Iterable<SnapshotInner>>() {
@Override
public Iterable<SnapshotInner> call(Page<SnapshotInner> page) {
return page.items();
}
})
.map(new Func1<SnapshotInner, Snapshot>() {
@Override
public Snapshot call(SnapshotInner inner) {
return new SnapshotImpl(inner, manager());
}
});
}

@Override
public Completable startSlotAsync(String resourceGroupName, String name, String slot) {
WebAppsInner client = this.inner();
Expand Down
Loading