|
| 1 | +# Code snippets and samples |
| 2 | + |
| 3 | + |
| 4 | +## ExtensionTypes |
| 5 | + |
| 6 | +- [ClusterGetVersion](#extensiontypes_clustergetversion) |
| 7 | +- [ClusterListVersions](#extensiontypes_clusterlistversions) |
| 8 | +- [Get](#extensiontypes_get) |
| 9 | +- [GetVersion](#extensiontypes_getversion) |
| 10 | +- [List](#extensiontypes_list) |
| 11 | +- [ListVersions](#extensiontypes_listversions) |
| 12 | +- [LocationGet](#extensiontypes_locationget) |
| 13 | +- [LocationList](#extensiontypes_locationlist) |
| 14 | +### ExtensionTypes_ClusterGetVersion |
| 15 | + |
| 16 | +```java |
| 17 | +/** |
| 18 | + * Samples for ExtensionTypes ListVersions. |
| 19 | + */ |
| 20 | +public final class ExtensionTypesListVersionsSamples { |
| 21 | + /* |
| 22 | + * x-ms-original-file: |
| 23 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 24 | + * 2024-11-01-preview/examples/ListExtensionTypeVersionsByLocation.json |
| 25 | + */ |
| 26 | + /** |
| 27 | + * Sample code: List Extension Type Versions. |
| 28 | + * |
| 29 | + * @param manager Entry point to ExtensionTypesManager. |
| 30 | + */ |
| 31 | + public static void listExtensionTypeVersions( |
| 32 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 33 | + manager.extensionTypes() |
| 34 | + .listVersions("westus", "extensionType1", "stable", "connectedCluster", "2", true, |
| 35 | + com.azure.core.util.Context.NONE); |
| 36 | + } |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +### ExtensionTypes_ClusterListVersions |
| 41 | + |
| 42 | +```java |
| 43 | +/** |
| 44 | + * Samples for ExtensionTypes LocationGet. |
| 45 | + */ |
| 46 | +public final class ExtensionTypesLocationGetSamples { |
| 47 | + /* |
| 48 | + * x-ms-original-file: |
| 49 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 50 | + * 2024-11-01-preview/examples/GetExtensionTypeByLocation.json |
| 51 | + */ |
| 52 | + /** |
| 53 | + * Sample code: Get Extension Type. |
| 54 | + * |
| 55 | + * @param manager Entry point to ExtensionTypesManager. |
| 56 | + */ |
| 57 | + public static void getExtensionType( |
| 58 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 59 | + manager.extensionTypes().locationGetWithResponse("westus2", "extensionType1", com.azure.core.util.Context.NONE); |
| 60 | + } |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +### ExtensionTypes_Get |
| 65 | + |
| 66 | +```java |
| 67 | +/** |
| 68 | + * Samples for ExtensionTypes LocationList. |
| 69 | + */ |
| 70 | +public final class ExtensionTypesLocationListSamples { |
| 71 | + /* |
| 72 | + * x-ms-original-file: |
| 73 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 74 | + * 2024-11-01-preview/examples/ListExtensionTypesByLocation.json |
| 75 | + */ |
| 76 | + /** |
| 77 | + * Sample code: List Extension Types. |
| 78 | + * |
| 79 | + * @param manager Entry point to ExtensionTypesManager. |
| 80 | + */ |
| 81 | + public static void listExtensionTypes( |
| 82 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 83 | + manager.extensionTypes() |
| 84 | + .locationList("westus2", "myPublisherId", "myOfferId", "myPlanId", "stable", "connectedCluster", |
| 85 | + com.azure.core.util.Context.NONE); |
| 86 | + } |
| 87 | +} |
| 88 | +``` |
| 89 | + |
| 90 | +### ExtensionTypes_GetVersion |
| 91 | + |
| 92 | +```java |
| 93 | +/** |
| 94 | + * Samples for ExtensionTypes GetVersion. |
| 95 | + */ |
| 96 | +public final class ExtensionTypesGetVersionSamples { |
| 97 | + /* |
| 98 | + * x-ms-original-file: |
| 99 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 100 | + * 2024-11-01-preview/examples/GetExtensionTypeVersionByLocation.json |
| 101 | + */ |
| 102 | + /** |
| 103 | + * Sample code: List Extension Type Versions. |
| 104 | + * |
| 105 | + * @param manager Entry point to ExtensionTypesManager. |
| 106 | + */ |
| 107 | + public static void listExtensionTypeVersions( |
| 108 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 109 | + manager.extensionTypes() |
| 110 | + .getVersionWithResponse("westus", "extensionType1", "1.20.0", com.azure.core.util.Context.NONE); |
| 111 | + } |
| 112 | +} |
| 113 | +``` |
| 114 | + |
| 115 | +### ExtensionTypes_List |
| 116 | + |
| 117 | +```java |
| 118 | +/** |
| 119 | + * Samples for ExtensionTypes ClusterGetVersion. |
| 120 | + */ |
| 121 | +public final class ExtensionTypesClusterGetVersionSamples { |
| 122 | + /* |
| 123 | + * x-ms-original-file: |
| 124 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 125 | + * 2024-11-01-preview/examples/GetExtensionTypeVersion.json |
| 126 | + */ |
| 127 | + /** |
| 128 | + * Sample code: List Extension Type Versions. |
| 129 | + * |
| 130 | + * @param manager Entry point to ExtensionTypesManager. |
| 131 | + */ |
| 132 | + public static void listExtensionTypeVersions( |
| 133 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 134 | + manager.extensionTypes() |
| 135 | + .clusterGetVersionWithResponse("rg1", "Microsoft.Kubernetes", "connectedClusters", "my-cluster", |
| 136 | + "my-extension-type", "v1.3.2", com.azure.core.util.Context.NONE); |
| 137 | + } |
| 138 | +} |
| 139 | +``` |
| 140 | + |
| 141 | +### ExtensionTypes_ListVersions |
| 142 | + |
| 143 | +```java |
| 144 | +/** |
| 145 | + * Samples for ExtensionTypes ClusterListVersions. |
| 146 | + */ |
| 147 | +public final class ExtensionTypesClusterListVersionsSamples { |
| 148 | + /* |
| 149 | + * x-ms-original-file: |
| 150 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 151 | + * 2024-11-01-preview/examples/ListExtensionTypeVersions.json |
| 152 | + */ |
| 153 | + /** |
| 154 | + * Sample code: List Extension Type Versions. |
| 155 | + * |
| 156 | + * @param manager Entry point to ExtensionTypesManager. |
| 157 | + */ |
| 158 | + public static void listExtensionTypeVersions( |
| 159 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 160 | + manager.extensionTypes() |
| 161 | + .clusterListVersions("rg1", "Microsoft.Kubernetes", "connectedClusters", "my-cluster", "my-extension-type", |
| 162 | + "stable", "2", true, com.azure.core.util.Context.NONE); |
| 163 | + } |
| 164 | +} |
| 165 | +``` |
| 166 | + |
| 167 | +### ExtensionTypes_LocationGet |
| 168 | + |
| 169 | +```java |
| 170 | +/** |
| 171 | + * Samples for ExtensionTypes List. |
| 172 | + */ |
| 173 | +public final class ExtensionTypesListSamples { |
| 174 | + /* |
| 175 | + * x-ms-original-file: |
| 176 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 177 | + * 2024-11-01-preview/examples/ListExtensionTypes.json |
| 178 | + */ |
| 179 | + /** |
| 180 | + * Sample code: Get Extension Types. |
| 181 | + * |
| 182 | + * @param manager Entry point to ExtensionTypesManager. |
| 183 | + */ |
| 184 | + public static void getExtensionTypes( |
| 185 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 186 | + manager.extensionTypes() |
| 187 | + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "my-cluster", "myPublisherId", "myOfferId", |
| 188 | + "myPlanId", "stable", com.azure.core.util.Context.NONE); |
| 189 | + } |
| 190 | +} |
| 191 | +``` |
| 192 | + |
| 193 | +### ExtensionTypes_LocationList |
| 194 | + |
| 195 | +```java |
| 196 | +/** |
| 197 | + * Samples for ExtensionTypes Get. |
| 198 | + */ |
| 199 | +public final class ExtensionTypesGetSamples { |
| 200 | + /* |
| 201 | + * x-ms-original-file: |
| 202 | + * specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensionTypes/preview/ |
| 203 | + * 2024-11-01-preview/examples/GetExtensionType.json |
| 204 | + */ |
| 205 | + /** |
| 206 | + * Sample code: Get Extension Types. |
| 207 | + * |
| 208 | + * @param manager Entry point to ExtensionTypesManager. |
| 209 | + */ |
| 210 | + public static void getExtensionTypes( |
| 211 | + com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensiontypes.ExtensionTypesManager manager) { |
| 212 | + manager.extensionTypes() |
| 213 | + .getWithResponse("rg1", "Microsoft.Kubernetes", "connectedClusters", "my-cluster", "my-extension-type", |
| 214 | + com.azure.core.util.Context.NONE); |
| 215 | + } |
| 216 | +} |
| 217 | +``` |
| 218 | + |
0 commit comments