Skip to content

Commit c3510b4

Browse files
author
Martin Sawicki
authored
Merge pull request #7 from anudeepsharma/UpdatedSample
Updated sample
2 parents acc9f22 + bfa4ac9 commit c3510b4

File tree

5 files changed

+378
-30
lines changed

5 files changed

+378
-30
lines changed

.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
*.class
2+
3+
# Auth filed
4+
*.auth
5+
*.azureauth
6+
7+
# Mobile Tools for Java (J2ME)
8+
.mtj.tmp/
9+
10+
# Package Files #
11+
*.jar
12+
*.war
13+
*.ear
14+
15+
# Azure Tooling #
16+
node_modules
17+
packages
18+
19+
# Eclipse #
20+
*.pydevproject
21+
.project
22+
.metadata
23+
bin/**
24+
tmp/**
25+
tmp/**/*
26+
*.tmp
27+
*.bak
28+
*.swp
29+
*~.nib
30+
local.properties
31+
.classpath
32+
.settings/
33+
.loadpath
34+
35+
# Other Tooling #
36+
.classpath
37+
.project
38+
target
39+
.idea
40+
*.iml
41+
42+
# Mac OS #
43+
.DS_Store
44+
.DS_Store?
45+
46+
# Windows #
47+
Thumbs.db
48+
49+
# reduced pom files should not be included
50+
dependency-reduced-pom.xml

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
---
2-
services: azure-resource-manager
2+
services: Resources
33
platforms: java
44
author: alvadb
55
---
66

7-
# Getting Started with Resources - Manage Resource Group - in Java
7+
#Getting Started with Resources - Manage Resource Group - in Java #
88

99

10-
Resource: Manage Resource Sample (for 1.0.0-beta2) - demonstrates how to perform common tasks using the Microsoft Azure Resource management service.
11-
- Create a resource group
12-
- Update a resource group
13-
- Create another resource group
14-
- Export an ARM template
15-
- List resource groups
16-
- Delete a resource group.
10+
Azure Resource sample for managing resource groups -
11+
- Create a resource group
12+
- Update a resource group
13+
- Create another resource group
14+
- List resource groups
15+
- Delete a resource group.
1716

1817

19-
## Running this Sample
18+
## Running this Sample ##
2019

2120
To run this sample:
2221

@@ -28,12 +27,12 @@ Set the environment variable `AZURE_AUTH_LOCATION` with the full path for an aut
2827

2928
mvn clean compile exec:java
3029

31-
## More information
30+
## More information ##
3231

3332
[http://azure.com/java] (http://azure.com/java)
3433

3534
If you don't have a Microsoft Azure subscription you can get a FREE trial account [here](http://go.microsoft.com/fwlink/?LinkId=330212)
3635

3736
---
3837

39-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
38+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<dependency>
1111
<groupId>com.microsoft.azure</groupId>
1212
<artifactId>azure</artifactId>
13-
<version>1.0.0-beta2</version>
13+
<version>1.0.0-beta3</version>
1414
</dependency>
1515
</dependencies>
1616
<build>
@@ -27,16 +27,15 @@
2727
<version>1.4.0</version>
2828
<configuration>
2929
<mainClass>com.microsoft.azure.management.resources.samples.ManageResourceGroup</mainClass>
30-
<cleanupDaemonThreads>false</cleanupDaemonThreads>
3130
</configuration>
3231
</plugin>
3332
<plugin>
3433
<groupId>org.apache.maven.plugins</groupId>
3534
<artifactId>maven-compiler-plugin</artifactId>
3635
<version>3.0</version>
3736
<configuration>
38-
<source>1.8</source>
39-
<target>1.8</target>
37+
<source>1.7</source>
38+
<target>1.7</target>
4039
</configuration>
4140
</plugin>
4241
<plugin>

src/main/java/com/microsoft/azure/management/resources/samples/ManageResourceGroup.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99

1010
import java.io.File;
1111

12-
import com.microsoft.azure.Azure;
12+
import com.microsoft.azure.management.Azure;
1313
import com.microsoft.azure.management.resources.ResourceGroup;
1414
import com.microsoft.azure.management.resources.fluentcore.arm.Region;
1515
import com.microsoft.azure.management.resources.fluentcore.utils.ResourceNamer;
16-
import com.microsoft.azure.management.samples.Utils;
1716

1817
import okhttp3.logging.HttpLoggingInterceptor;
1918

@@ -87,7 +86,7 @@ public static void main(String[] args) {
8786

8887
System.out.println("Creating another resource group with name: " + rgName2);
8988

90-
ResourceGroup resourceGroup2 = azure.resourceGroups()
89+
azure.resourceGroups()
9190
.define(rgName)
9291
.withRegion(Region.US_WEST)
9392
.create();

0 commit comments

Comments
 (0)