本文整理了Java中com.microsoft.azure.management.resources.fluentcore.utils.Utils.rootResource()
方法的一些代码示例,展示了Utils.rootResource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.rootResource()
方法的具体详情如下:
包路径:com.microsoft.azure.management.resources.fluentcore.utils.Utils
类名称:Utils
方法名:rootResource
[英]Gets an observable of type U, where U extends Indexable, that emits only the root resource from a given observable of Indexable.
[中]获取类型为U的可观察对象,其中U扩展了可索引,它只从给定的可索引可观察对象发出根资源。
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@SuppressWarnings("unchecked")
private Observable<CreatedResources<T>> createAsyncNonStream(Creatable<T>... creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
private Observable<CreatedResources<T>> createAsyncNonStream(List<Creatable<T>> creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: Azure/azure-libraries-for-java
@SuppressWarnings("unchecked")
private Observable<CreatedResources<T>> createAsyncNonStream(Creatable<T>... creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: Azure/azure-libraries-for-java
private Observable<CreatedResources<T>> createAsyncNonStream(List<Creatable<T>> creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public FluentModelT create() {
return Utils.<FluentModelT>rootResource(createAsync()).toBlocking().single();
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public FluentModelT create() {
return Utils.<FluentModelT>rootResource(createAsync()).toBlocking().single();
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public FluentModelT create() {
return Utils.<FluentModelT>rootResource(createAsync()).toBlocking().single();
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public FluentModelT create() {
return Utils.<FluentModelT>rootResource(createAsync()).toBlocking().single();
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public ServiceFuture<FluentModelT> createAsync(final ServiceCallback<FluentModelT> callback) {
return ServiceFuture.fromBody(Utils.<FluentModelT>rootResource(createAsync()), callback);
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public ServiceFuture<HostNameBinding> createAsync(ServiceCallback<HostNameBinding> callback) {
Observable<Indexable> indexableObservable = createAsync();
return ServiceFuture.fromBody(Utils.<HostNameBinding>rootResource(indexableObservable), callback);
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public ServiceFuture<FluentModelT> createAsync(final ServiceCallback<FluentModelT> callback) {
return ServiceFuture.fromBody(Utils.<FluentModelT>rootResource(createAsync()), callback);
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public ServiceFuture<FluentModelT> createAsync(final ServiceCallback<FluentModelT> callback) {
return ServiceFuture.fromBody(Utils.<FluentModelT>rootResource(createAsync()), callback);
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public ServiceFuture<FluentModelT> createAsync(final ServiceCallback<FluentModelT> callback) {
return ServiceFuture.fromBody(Utils.<FluentModelT>rootResource(createAsync()), callback);
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public HostNameSslBindingImpl<FluentT, FluentImplT> withExistingKeyVault(final Vault vault) {
Observable<AppServiceCertificateOrder> appServiceCertificateOrderObservable = Utils.rootResource(certificateInDefinition
.withExistingKeyVault(vault)
.createAsync());
final AppServiceManager manager = this.parent().manager();
this.newCertificate = appServiceCertificateOrderObservable
.flatMap(new Func1<AppServiceCertificateOrder, Observable<AppServiceCertificate>>() {
@Override
public Observable<AppServiceCertificate> call(AppServiceCertificateOrder appServiceCertificateOrder) {
return Utils.rootResource(manager.certificates().define(appServiceCertificateOrder.name())
.withRegion(parent().regionName())
.withExistingResourceGroup(parent().resourceGroupName())
.withExistingCertificateOrder(appServiceCertificateOrder)
.createAsync());
}
});
return this;
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public HostNameSslBindingImpl<FluentT, FluentImplT> withNewKeyVault(String vaultName) {
Observable<AppServiceCertificateOrder> appServiceCertificateOrderObservable = Utils.rootResource(certificateInDefinition
.withNewKeyVault(vaultName, parent().region())
.createAsync());
final AppServiceManager manager = this.parent().manager();
this.newCertificate = appServiceCertificateOrderObservable
.flatMap(new Func1<AppServiceCertificateOrder, Observable<AppServiceCertificate>>() {
@Override
public Observable<AppServiceCertificate> call(AppServiceCertificateOrder appServiceCertificateOrder) {
return Utils.rootResource(manager.certificates().define(appServiceCertificateOrder.name())
.withRegion(parent().regionName())
.withExistingResourceGroup(parent().resourceGroupName())
.withExistingCertificateOrder(appServiceCertificateOrder)
.createAsync());
}
});
return this;
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public Observable<AppServiceCertificate> call(AppServiceCertificateOrder appServiceCertificateOrder) {
return Utils.rootResource(manager.certificates().define(appServiceCertificateOrder.name())
.withRegion(parent().regionName())
.withExistingResourceGroup(parent().resourceGroupName())
.withExistingCertificateOrder(appServiceCertificateOrder)
.createAsync());
}
});
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public Observable<AppServiceCertificate> call(AppServiceCertificateOrder appServiceCertificateOrder) {
return Utils.rootResource(manager.certificates().define(appServiceCertificateOrder.name())
.withRegion(parent().regionName())
.withExistingResourceGroup(parent().resourceGroupName())
.withExistingCertificateOrder(appServiceCertificateOrder)
.createAsync());
}
});
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public HostNameSslBindingImpl<FluentT, FluentImplT> withPfxCertificateToUpload(final File pfxFile, final String password) {
String thumbprint = getCertificateThumbprint(pfxFile.getPath(), password);
newCertificate = Utils.rootResource(this.parent().manager().certificates().define(
getCertificateUniqueName(thumbprint, parent().region()))
.withRegion(parent().region())
.withExistingResourceGroup(parent().resourceGroupName())
.withPfxFile(pfxFile)
.withPfxPassword(password)
.createAsync());
return this;
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public HostNameSslBindingImpl<FluentT, FluentImplT> withExistingAppServiceCertificateOrder(final AppServiceCertificateOrder certificateOrder) {
Observable<Indexable> resourceStream = this.parent().manager().certificates().define(getCertificateUniqueName(certificateOrder.signedCertificate().thumbprint(), parent().region()))
.withRegion(parent().region())
.withExistingResourceGroup(parent().resourceGroupName())
.withExistingCertificateOrder(certificateOrder)
.createAsync();
newCertificate = Utils.rootResource(resourceStream);
return this;
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public AppServiceCertificateOrderImpl withNewKeyVault(String vaultName, Region region) {
Observable<Indexable> resourceStream = myManager.keyVaultManager().vaults().define(vaultName)
.withRegion(region)
.withExistingResourceGroup(resourceGroupName())
.defineAccessPolicy()
.forServicePrincipal("f3c21649-0979-4721-ac85-b0216b2cf413")
.allowSecretPermissions(SecretPermissions.GET, SecretPermissions.SET, SecretPermissions.DELETE)
.attach()
.defineAccessPolicy()
.forServicePrincipal("abfa0a7c-a6b6-4736-8310-5855508787cd")
.allowSecretPermissions(SecretPermissions.GET)
.attach()
.createAsync();
this.bindingVault = Utils.rootResource(resourceStream);
return this;
}
}
内容来源于网络,如有侵权,请联系作者删除!