/** * @return known PolicyMode values */ public static Collection<PolicyMode> values() { return values(PolicyMode.class); } }
@Override public DeploymentImpl withExistingResourceGroup(ResourceGroup resourceGroup) { this.resourceGroupName = resourceGroup.name(); return this; }
/** * @return known PolicyType values */ public static Collection<PolicyType> values() { return values(PolicyType.class); } }
@Override protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) { super.initializeClients(restClient, defaultSubscription, domain); testId = SdkContext.randomResourceName("", 9); resourceGroups = resourceClient.resourceGroups(); rgName = "rg" + testId; resourceGroup = resourceGroups.define(rgName) .withRegion(Region.US_SOUTH_CENTRAL) .create(); }
@Override public DeploymentImpl withNewResourceGroup(String resourceGroupName, Region region) { this.creatableResourceGroup = this.resourceManager.resourceGroups() .define(resourceGroupName) .withRegion(region); this.addDependency(this.creatableResourceGroup); this.resourceGroupName = resourceGroupName; return this; }
@Override public ResourceGroup internalCreate(String key) { return azure.resourceGroups().define(key).withRegion(azureProperties.getRegion()).create(); } }
@Override public DeploymentImpl withParametersLink(String uri, String contentVersion) { if (this.inner().properties() == null) { this.inner().withProperties(new DeploymentPropertiesExtended()); } this.inner().properties().withParametersLink(new ParametersLink().withUri(uri).withContentVersion(contentVersion)); this.inner().properties().withParameters(null); return this; }
@Override public DeploymentImpl withTemplateLink(String uri, String contentVersion) { if (this.inner().properties() == null) { this.inner().withProperties(new DeploymentPropertiesExtended()); } this.inner().properties().withTemplateLink(new TemplateLink().withUri(uri).withContentVersion(contentVersion)); this.inner().properties().withTemplate(null); return this; }
Subscriptions subs = youtube.subscriptions(); com.google.api.services.youtube.YouTube.Subscriptions.List subscribers = subs.list("id").setMine(true); // <- use setMine(), not setMySubscribers() SubscriptionListResponse resp = subscribers.execute(); ...
public static void createOrUpdateResourceGroup( ResourceManagementClient resourceManagementClient, ResourceContext context) throws ServiceException, IOException, URISyntaxException { //make sure the rg exist resourceManagementClient.getResourceGroupsOperations().createOrUpdate(context.getResourceGroupName(), new ResourceGroup(context.getLocation())); }
@Override protected void cleanUpResources() { resourceGroups.deleteByName(newRgName); resourceGroups.deleteByName(rgName); }
@Override protected void cleanUpResources() { resourceGroups.beginDeleteByName(rgName); }
@Override protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) { testId = SdkContext.randomResourceName("", 9); rgName = "rg429" + testId; super.initializeClients(restClient, defaultSubscription, domain); resourceGroups = resourceClient.resourceGroups(); rg = resourceGroups.define(rgName) .withRegion(Region.US_EAST) .create(); }
@Override public DeploymentImpl withExistingResourceGroup(ResourceGroup resourceGroup) { this.resourceGroupName = resourceGroup.name(); return this; }
@Override public DeploymentImpl withParametersLink(String uri, String contentVersion) { if (this.inner().properties() == null) { this.inner().withProperties(new DeploymentPropertiesExtended()); } this.inner().properties().withParametersLink(new ParametersLink().withUri(uri).withContentVersion(contentVersion)); this.inner().properties().withParameters(null); return this; }
@Override public DeploymentImpl withTemplateLink(String uri, String contentVersion) { if (this.inner().properties() == null) { this.inner().withProperties(new DeploymentPropertiesExtended()); } this.inner().properties().withTemplateLink(new TemplateLink().withUri(uri).withContentVersion(contentVersion)); this.inner().properties().withTemplate(null); return this; }
@Override protected void cleanUpResources() { resourceGroups.deleteByName(rgName); }
/** * @return known PolicyMode values */ public static Collection<PolicyMode> values() { return values(PolicyMode.class); } }
/** * @return known PolicyType values */ public static Collection<PolicyType> values() { return values(PolicyType.class); } }
@Override protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) { testId = SdkContext.randomResourceName("", 9); rgName = "rg" + testId; newRgName = "rgB" + testId; super.initializeClients(restClient, defaultSubscription, domain); resourceGroups = resourceClient.resourceGroups(); genericResources = resourceClient.genericResources(); resourceGroups.define(rgName) .withRegion(Region.US_EAST) .create(); resourceGroups.define(newRgName) .withRegion(Region.US_SOUTH_CENTRAL) .create(); }