@Override public RegistryImpl withExistingStorageAccount(StorageAccount storageAccount) { this.storageAccountId = storageAccount.id(); return this; }
@Override public Map<String, String> toProperties() { final Map<String, String> properties = new HashMap<>(); properties.put(AppInsightsConstants.SubscriptionId, ResourceId.fromString(this.storageAccount.id()).subscriptionId()); properties.put(AppInsightsConstants.Region, this.storageAccount.regionName()); return properties; }
@Override public Map<String, String> toProperties() { final Map<String, String> properties = new HashMap<>(); properties.put(AppInsightsConstants.SubscriptionId, ResourceId.fromString(this.storageAccount.id()).subscriptionId()); properties.put(AppInsightsConstants.Region, this.storageAccount.regionName()); return properties; }
@Override public Map<String, String> toProperties() { final Map<String, String> properties = new HashMap<>(); properties.put(AppInsightsConstants.SubscriptionId, ResourceId.fromString(this.storageAccount.id()).subscriptionId()); properties.put(AppInsightsConstants.Region, this.storageAccount.regionName()); return properties; }
private void handleStorageSettings() { StorageAccount storageAccount; if (this.creatableStorageAccountKey != null) { storageAccount = this.<StorageAccount>taskResult(this.creatableStorageAccountKey); existingStorageAccountToAssociate = storageAccount; } else if (this.existingStorageAccountToAssociate != null) { storageAccount = this.existingStorageAccountToAssociate; } else { return; } if (autoStorage == null) { autoStorage = new AutoStorageProperties(); } autoStorage.withStorageAccountId(storageAccount.id()); }
public CaptureSettings withExistingStorageAccountForCapturedData(final StorageAccount storageAccount, final String containerName) { this.ensureSettings().destination().withStorageAccountResourceId(storageAccount.id()); this.ensureSettings().destination().withBlobContainer(containerName); // // Schedule task to create container if not exists. // addDependency(new FunctionalTaskItem() { @Override public Observable<Indexable> call(final Context context) { return createContainerIfNotExistsAsync(storageAccount, containerName) .flatMap(new Func1<Boolean, Observable<Indexable>>() { @Override public Observable<Indexable> call(Boolean aBoolean) { return context.voidObservable(); } }); } }); return this; }
public CaptureSettings withExistingStorageAccountForCapturedData(final StorageAccount storageAccount, final String containerName) { this.ensureSettings().destination().withStorageAccountResourceId(storageAccount.id()); this.ensureSettings().destination().withBlobContainer(containerName); // // Schedule task to create container if not exists. // addDependency(new FunctionalTaskItem() { @Override public Observable<Indexable> call(final Context context) { return createContainerIfNotExistsAsync(storageAccount, containerName) .flatMap(new Func1<Boolean, Observable<Indexable>>() { @Override public Observable<Indexable> call(Boolean aBoolean) { return context.voidObservable(); } }); } }); return this; }
@Override public Observable<Registry> createResourceAsync() { final RegistryImpl self = this; if (isInCreateMode()) { if (self.creatableStorageAccountKey != null) { StorageAccount storageAccount = self.<StorageAccount>taskResult(this.creatableStorageAccountKey); self.inner().storageAccount().withId(storageAccount.id()); } else if (storageAccountId != null) { self.inner().storageAccount().withId(storageAccountId); } return manager().inner().registries().createAsync(self.resourceGroupName(), self.name(), self.inner()) .map(innerToFluentMap(this)); } else { updateParameters.withTags(inner().getTags()); return manager().inner().registries().updateAsync(self.resourceGroupName(), self.name(), self.updateParameters) .map(innerToFluentMap(this)); } }