diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionDeploymentSlotImpl.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionDeploymentSlotImpl.java index c137bb4c49432..8e4be1444653e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionDeploymentSlotImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/FunctionDeploymentSlotImpl.java @@ -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; @@ -80,4 +81,15 @@ Mono 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 getMasterKeyAsync() { + return this.manager().serviceClient().getWebApps().listHostKeysSlotAsync( + this.resourceGroupName(), this.parent().name(), this.name()).map(HostKeysInner::masterKey); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/FunctionDeploymentSlot.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/FunctionDeploymentSlot.java index 1bc09a05c1ef8..1ab5ff15abb4b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/FunctionDeploymentSlot.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/FunctionDeploymentSlot.java @@ -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 @@ -20,6 +21,12 @@ public interface FunctionDeploymentSlot Updatable>, HasParent { + /** @return the master key for the function app */ + String getMasterKey(); + + /** @return the master key for the function app */ + Mono getMasterKeyAsync(); + /************************************************************** * Fluent interfaces to provision a function deployment slot **************************************************************/