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

mgmt, key on function app slot #22198

Merged
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 @@ -3,6 +3,7 @@

package com.azure.resourcemanager.appservice.implementation;

import com.azure.resourcemanager.appservice.fluent.models.HostKeysInner;
import com.azure.resourcemanager.appservice.fluent.models.SitePatchResourceInner;
import com.azure.resourcemanager.appservice.models.DeploymentSlotBase;
import com.azure.resourcemanager.appservice.models.FunctionApp;
Expand Down Expand Up @@ -80,4 +81,15 @@ Mono<SiteInner> submitSite(final SitePatchResourceInner siteUpdate) {
// PATCH does not work for function app slot
return submitSiteWithoutSiteConfig(this.innerModel());
}

@Override
public String getMasterKey() {
return this.getMasterKeyAsync().block();
}

@Override
public Mono<String> getMasterKeyAsync() {
return this.manager().serviceClient().getWebApps().listHostKeysSlotAsync(
this.resourceGroupName(), this.parent().name(), this.name()).map(HostKeysInner::masterKey);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.azure.resourcemanager.resources.fluentcore.arm.models.IndependentChildResource;
import com.azure.resourcemanager.resources.fluentcore.model.Creatable;
import com.azure.resourcemanager.resources.fluentcore.model.Updatable;
import reactor.core.publisher.Mono;

/** An immutable client-side representation of an Azure Function App deployment slot. */
@Fluent
Expand All @@ -20,6 +21,12 @@ public interface FunctionDeploymentSlot
Updatable<DeploymentSlotBase.Update<FunctionDeploymentSlot>>,
HasParent<FunctionApp> {

/** @return the master key for the function app */
String getMasterKey();

/** @return the master key for the function app */
Mono<String> getMasterKeyAsync();

/**************************************************************
* Fluent interfaces to provision a function deployment slot
**************************************************************/
Expand Down