Skip to content

Commit efccdba

Browse files
committed
interfaces
1 parent 6627203 commit efccdba

File tree

8 files changed

+127
-1
lines changed

8 files changed

+127
-1
lines changed

sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationSecurityGroups.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package com.azure.resourcemanager.network.models;
44

55
import com.azure.core.annotation.Fluent;
6+
import com.azure.core.util.Context;
67
import com.azure.resourcemanager.network.NetworkManager;
78
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion;
89
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup;
@@ -22,4 +23,14 @@ public interface ApplicationSecurityGroups extends SupportsCreating<ApplicationS
2223
SupportsGettingByResourceGroup<ApplicationSecurityGroup>, SupportsGettingById<ApplicationSecurityGroup>,
2324
SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsBatchCreation<ApplicationSecurityGroup>,
2425
SupportsBatchDeletion, HasManager<NetworkManager> {
26+
27+
/**
28+
* Gets the information about a resource from Azure based on the resource name and the name of its resource group.
29+
*
30+
* @param resourceGroupName the name of the resource group the resource is in
31+
* @param name the name of the application security group. (Note, this is not the ID)
32+
* @param context the {@link Context} of the request
33+
* @return an immutable representation of the resource
34+
*/
35+
ApplicationSecurityGroup getByResourceGroup(String resourceGroupName, String name, Context context);
2536
}

sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/HasNetworkInterfaces.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33
package com.azure.resourcemanager.network.models;
44

5+
import com.azure.core.util.Context;
56
import com.azure.resourcemanager.resources.fluentcore.arm.models.HasId;
67
import reactor.core.publisher.Mono;
78

@@ -18,6 +19,16 @@ public interface HasNetworkInterfaces extends HasId {
1819
*/
1920
NetworkInterface getPrimaryNetworkInterface();
2021

22+
/**
23+
* Gets the primary network interface.
24+
*
25+
* <p>Note that this method can result in a call to the cloud to fetch the network interface information.
26+
*
27+
* @param context the {@link Context} of the request
28+
* @return the primary network interface associated with this resource
29+
*/
30+
NetworkInterface getPrimaryNetworkInterface(Context context);
31+
2132
/**
2233
* Gets the primary network interface.
2334
*

sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NetworkInterfaces.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,13 @@ PagedIterable<VirtualMachineScaleSetNetworkInterface> listByVirtualMachineScaleS
128128
* @return the accepted deleting operation
129129
*/
130130
Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name, Context context);
131+
132+
/**
133+
* Lists resources of the specified type in the specified resource group.
134+
*
135+
* @param resourceGroupName the name of the resource group to list the resources from
136+
* @param context the {@link Context} of the request
137+
* @return the list of resources
138+
*/
139+
PagedIterable<NetworkInterface> listByResourceGroup(String resourceGroupName, Context context);
131140
}

sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NetworkSecurityGroups.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package com.azure.resourcemanager.network.models;
44

55
import com.azure.core.annotation.Fluent;
6+
import com.azure.core.util.Context;
67
import com.azure.resourcemanager.network.NetworkManager;
78
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion;
89
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup;
@@ -22,4 +23,13 @@ public interface NetworkSecurityGroups
2223
SupportsListingByResourceGroup<NetworkSecurityGroup>, SupportsGettingByResourceGroup<NetworkSecurityGroup>,
2324
SupportsGettingById<NetworkSecurityGroup>, SupportsDeletingById, SupportsDeletingByResourceGroup,
2425
SupportsBatchCreation<NetworkSecurityGroup>, SupportsBatchDeletion, HasManager<NetworkManager> {
26+
/**
27+
* Gets the information about {@link NetworkSecurityGroup} based on the resource name and the name of its resource group.
28+
*
29+
* @param resourceGroupName the name of the resource group the resource is in
30+
* @param name the name of the network security group. (Note, this is not the ID)
31+
* @param context the {@link Context} of the request
32+
* @return an immutable representation of the resource
33+
*/
34+
NetworkSecurityGroup getByResourceGroup(String resourceGroupName, String name, Context context);
2535
}

sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/Networks.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package com.azure.resourcemanager.network.models;
44

55
import com.azure.core.annotation.Fluent;
6+
import com.azure.core.util.Context;
67
import com.azure.resourcemanager.network.NetworkManager;
78
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion;
89
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup;
@@ -21,4 +22,13 @@ public interface Networks extends SupportsCreating<Network.DefinitionStages.Blan
2122
SupportsListingByResourceGroup<Network>, SupportsGettingByResourceGroup<Network>, SupportsGettingById<Network>,
2223
SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsBatchCreation<Network>, SupportsBatchDeletion,
2324
HasManager<NetworkManager> {
25+
/**
26+
* Gets the information about {@link Network} based on the resource name and the name of its resource group.
27+
*
28+
* @param resourceGroupName the name of the resource group the resource is in
29+
* @param name the name of the virtual network. (Note, this is not the ID)
30+
* @param context the {@link Context} of the request
31+
* @return an immutable representation of the resource
32+
*/
33+
Network getByResourceGroup(String resourceGroupName, String name, Context context);
2434
}

sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NicIpConfigurationBase.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package com.azure.resourcemanager.network.models;
55

66
import com.azure.core.annotation.Fluent;
7+
import com.azure.core.util.Context;
78
import com.azure.resourcemanager.resources.fluentcore.arm.models.HasSubnet;
89
import java.util.Collection;
910
import java.util.List;
@@ -72,4 +73,12 @@ public interface NicIpConfigurationBase extends HasSubnet, HasPrivateIpAddress {
7273
* @return the application security groups associated with this network IP configuration
7374
*/
7475
List<ApplicationSecurityGroup> listAssociatedApplicationSecurityGroups();
76+
77+
/**
78+
* Gets the application security groups associated with this network IP configuration.
79+
*
80+
* @param context the {@link Context} of the request
81+
* @return the application security groups associated with this network IP configuration
82+
*/
83+
List<ApplicationSecurityGroup> listAssociatedApplicationSecurityGroups(Context context);
7584
}

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Deployments.java

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
package com.azure.resourcemanager.resources.models;
55

66
import com.azure.core.annotation.Fluent;
7+
import com.azure.core.util.Context;
8+
import com.azure.resourcemanager.resources.ResourceManager;
79
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup;
810
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById;
911
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName;
@@ -13,7 +15,7 @@
1315
import com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating;
1416
import com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById;
1517
import com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing;
16-
import com.azure.resourcemanager.resources.ResourceManager;
18+
import com.azure.resourcemanager.resources.fluentcore.model.Accepted;
1719

1820
/**
1921
* Entry point to template deployment in Azure.
@@ -31,4 +33,48 @@ public interface Deployments extends SupportsCreating<Deployment.DefinitionStage
3133
* @return true if the deployment exists; false otherwise
3234
*/
3335
boolean checkExistence(String resourceGroupName, String deploymentName);
36+
37+
/**
38+
* Deletes a deployment from the deployment history by its ID.
39+
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the
40+
* associated deployment operations. Deleting a template deployment does not affect the state of the resource group.
41+
*
42+
* @param id the resource ID of the resource to delete
43+
* @return the accepted deleting operation
44+
*/
45+
Accepted<Void> beginDeleteById(String id);
46+
47+
/**
48+
* Deletes a deployment from the deployment history by its ID.
49+
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the
50+
* associated deployment operations. Deleting a template deployment does not affect the state of the resource group.
51+
*
52+
* @param id the resource ID of the resource to delete
53+
* @param context the {@link Context} of the request
54+
* @return the accepted deleting operation
55+
*/
56+
Accepted<Void> beginDeleteById(String id, Context context);
57+
58+
/**
59+
* Deletes a deployment from the deployment history by its resource group and name.
60+
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the
61+
* associated deployment operations. Deleting a template deployment does not affect the state of the resource group.
62+
*
63+
* @param resourceGroupName the resource group the deployment is part of
64+
* @param name the name of the deployment
65+
* @return the accepted deleting operation
66+
*/
67+
Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name);
68+
69+
/**
70+
* Deletes a deployment from the deployment history by its resource group and name.
71+
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the
72+
* associated deployment operations. Deleting a template deployment does not affect the state of the resource group.
73+
*
74+
* @param resourceGroupName the resource group the deployment is part of
75+
* @param name the name of the deployment
76+
* @param context the {@link Context} of the request
77+
* @return the accepted deleting operation
78+
*/
79+
Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name, Context context);
3480
}

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/ResourceGroups.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package com.azure.resourcemanager.resources.models;
55

66
import com.azure.core.annotation.Fluent;
7+
import com.azure.core.util.Context;
78
import com.azure.resourcemanager.resources.ResourceManager;
89
import com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByName;
910
import com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager;
@@ -43,6 +44,15 @@ public interface ResourceGroups
4344
*/
4445
Accepted<Void> beginDeleteByName(String name);
4546

47+
/**
48+
* Begins deleting a resource group from Azure, identifying it by its name.
49+
*
50+
* @param name the resource group name
51+
* @param context the {@link Context} of the request
52+
* @return the accepted deleting operation
53+
*/
54+
Accepted<Void> beginDeleteByName(String name, Context context);
55+
4656
/**
4757
* Begins deleting a resource group from Azure, identifying it by its name.
4858
*
@@ -52,6 +62,16 @@ public interface ResourceGroups
5262
*/
5363
Accepted<Void> beginDeleteByName(String name, Collection<ForceDeletionResourceType> forceDeletionResourceTypes);
5464

65+
/**
66+
* Begins deleting a resource group from Azure, identifying it by its name.
67+
*
68+
* @param name the resource group name
69+
* @param forceDeletionResourceTypes resource types for force deletion
70+
* @param context the {@link Context} of the request
71+
* @return the accepted deleting operation
72+
*/
73+
Accepted<Void> beginDeleteByName(String name, Collection<ForceDeletionResourceType> forceDeletionResourceTypes, Context context);
74+
5575
/**
5676
* Deletes a resource from Azure, identifying it by its resource name.
5777
*

0 commit comments

Comments
 (0)