Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-imds-imds] [Hub Generated] Review request for Microsoft.InstanceMetadataService to add version stable/2018-04-02 #11591

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sdk/imds/azure-imds-imds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Release History

## 1.0.0-beta.1 (Unreleased)

- Azure InstanceMetadataClient client library for Java. This package contains Microsoft Azure InstanceMetadataClient client library.

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
63 changes: 63 additions & 0 deletions sdk/imds/azure-imds-imds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Azure InstanceMetadataClient client library for Java

Azure InstanceMetadataClient client library for Java.

This package contains Microsoft Azure InstanceMetadataClient client library.

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]
- [Product documentation][product_documentation]

## Getting started

### Prerequisites

- [Java Development Kit (JDK)][jdk] with version 8 or above
- [Azure Subscription][azure_subscription]

### Adding the package to your product

[//]: # ({x-version-update-start;com.azure:azure-imds-imds;current})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-imds-imds</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

### Authentication

[Azure Identity][azure_identity] package provides the default implementation for authenticating the client.

## Key concepts

## Examples

```java com.azure.imds.imds.readme
```

## Troubleshooting

## Next steps

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request

<!-- LINKS -->
[product_documentation]: https://azure.microsoft.com/services/
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
76 changes: 76 additions & 0 deletions sdk/imds/azure-imds-imds/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.azure</groupId>
<artifactId>azure-client-sdk-parent</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
</parent>

<groupId>com.azure</groupId>
<artifactId>azure-imds-imds</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-imds-imds;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for InstanceMetadataClient Management</name>
<description>This package contains Microsoft Azure InstanceMetadataClient client library.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
<developerConnection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>microsoft</id>
<name>Microsoft</name>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<codesnippet.skip>false</codesnippet.skip>
<javadocDoclet></javadocDoclet>
<javadocDocletOptions></javadocDocletOptions>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.23.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.11.3</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.7.4</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.4.2</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.imds.imds;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.imds.imds.implementation.IdentitiesImpl;
import reactor.core.publisher.Mono;

/** Initializes a new instance of the asynchronous InstanceMetadataClient type. */
@ServiceClient(builder = InstanceMetadataClientBuilder.class, isAsync = true)
public final class IdentityAsyncClient {
@Generated private final IdentitiesImpl serviceClient;

/**
* Initializes an instance of Identities client.
*
* @param serviceClient the service client implementation.
*/
@Generated
IdentityAsyncClient(IdentitiesImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* Get a Token from Azure AD.
*
* <p><strong>Query Parameters</strong>
*
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>resource</td><td>String</td><td>Yes</td><td>This is the urlencoded identifier URI of the sink resource for the requested Azure AD token. The resulting token contains the corresponding aud for this resource.</td></tr>
* <tr><td>apiVersion</td><td>String</td><td>Yes</td><td>Api Version</td></tr>
* <tr><td>clientId</td><td>String</td><td>No</td><td>This identifies, by Azure AD client id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with object_id and msi_res_id.</td></tr>
* <tr><td>objectId</td><td>String</td><td>No</td><td>This identifies, by Azure AD object id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and msi_res_id.</td></tr>
* <tr><td>msiResId</td><td>String</td><td>No</td><td>This identifies, by urlencoded ARM resource id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and object_id.</td></tr>
* <tr><td>authority</td><td>String</td><td>No</td><td>This indicates the authority to request AAD tokens from. Defaults to the known authority of the identity to be used.</td></tr>
* <tr><td>bypassCache</td><td>String</td><td>No</td><td>If provided, the value must be 'true'. This indicates to the server that the token must be retrieved from Azure AD and cannot be retrieved from an internal cache.</td></tr>
* </table>
*
* <p><strong>Header Parameters</strong>
*
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>metadata</td><td>String</td><td>Yes</td><td>This must be set to 'true'.</td></tr>
* </table>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* Object
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @return a Token from Azure AD.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getTokenWithResponse(RequestOptions requestOptions) {
return this.serviceClient.getTokenWithResponseAsync(requestOptions);
}

/**
* Get information about AAD Metadata.
*
* <p><strong>Query Parameters</strong>
*
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>apiVersion</td><td>String</td><td>Yes</td><td>Api Version</td></tr>
* </table>
*
* <p><strong>Header Parameters</strong>
*
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>metadata</td><td>String</td><td>Yes</td><td>This must be set to 'true'.</td></tr>
* </table>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* Object
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @return information about AAD Metadata.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getInfoWithResponse(RequestOptions requestOptions) {
return this.serviceClient.getInfoWithResponseAsync(requestOptions);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.imds.imds;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.imds.imds.implementation.IdentitiesImpl;

/** Initializes a new instance of the synchronous InstanceMetadataClient type. */
@ServiceClient(builder = InstanceMetadataClientBuilder.class)
public final class IdentityClient {
@Generated private final IdentitiesImpl serviceClient;

/**
* Initializes an instance of Identities client.
*
* @param serviceClient the service client implementation.
*/
@Generated
IdentityClient(IdentitiesImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* Get a Token from Azure AD.
*
* <p><strong>Query Parameters</strong>
*
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>resource</td><td>String</td><td>Yes</td><td>This is the urlencoded identifier URI of the sink resource for the requested Azure AD token. The resulting token contains the corresponding aud for this resource.</td></tr>
* <tr><td>apiVersion</td><td>String</td><td>Yes</td><td>Api Version</td></tr>
* <tr><td>clientId</td><td>String</td><td>No</td><td>This identifies, by Azure AD client id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with object_id and msi_res_id.</td></tr>
* <tr><td>objectId</td><td>String</td><td>No</td><td>This identifies, by Azure AD object id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and msi_res_id.</td></tr>
* <tr><td>msiResId</td><td>String</td><td>No</td><td>This identifies, by urlencoded ARM resource id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and object_id.</td></tr>
* <tr><td>authority</td><td>String</td><td>No</td><td>This indicates the authority to request AAD tokens from. Defaults to the known authority of the identity to be used.</td></tr>
* <tr><td>bypassCache</td><td>String</td><td>No</td><td>If provided, the value must be 'true'. This indicates to the server that the token must be retrieved from Azure AD and cannot be retrieved from an internal cache.</td></tr>
* </table>
*
* <p><strong>Header Parameters</strong>
*
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>metadata</td><td>String</td><td>Yes</td><td>This must be set to 'true'.</td></tr>
* </table>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* Object
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @return a Token from Azure AD.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> getTokenWithResponse(RequestOptions requestOptions) {
return this.serviceClient.getTokenWithResponse(requestOptions);
}

/**
* Get information about AAD Metadata.
*
* <p><strong>Query Parameters</strong>
*
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>apiVersion</td><td>String</td><td>Yes</td><td>Api Version</td></tr>
* </table>
*
* <p><strong>Header Parameters</strong>
*
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>metadata</td><td>String</td><td>Yes</td><td>This must be set to 'true'.</td></tr>
* </table>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* Object
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @return information about AAD Metadata.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> getInfoWithResponse(RequestOptions requestOptions) {
return this.serviceClient.getInfoWithResponse(requestOptions);
}
}
Loading