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

[ReleasePR azure-resourcemanager-kubernetesconfiguration] Update readme.java.md #28810

Closed
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2022-05-12)

- Azure Resource Manager SourceControlConfiguration client library for Java. This package contains Microsoft Azure SDK for SourceControlConfiguration Management SDK. KubernetesConfiguration Client. Package tag package-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-kubernetesconfiguration</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
Expand Down Expand Up @@ -84,6 +86,19 @@ public static SourceControlConfigurationManager authenticate(TokenCredential cre
return configure().authenticate(credential, profile);
}

/**
* Creates an instance of SourceControlConfiguration service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the SourceControlConfiguration service API instance.
*/
public static SourceControlConfigurationManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return new SourceControlConfigurationManager(httpPipeline, profile, null);
}

/**
* Gets a Configurable instance that can be used to create SourceControlConfigurationManager with optional
* configuration.
Expand All @@ -103,6 +118,7 @@ public static final class Configurable {
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
private final List<String> scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private RetryOptions retryOptions;
private Duration defaultPollInterval;

private Configurable() {
Expand Down Expand Up @@ -163,6 +179,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
*/
public Configurable withRetryOptions(RetryOptions retryOptions) {
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
return this;
}

/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
Expand Down Expand Up @@ -196,7 +225,7 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential
.append("-")
.append("com.azure.resourcemanager.kubernetesconfiguration")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -214,10 +243,15 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
if (retryOptions != null) {
retryPolicy = new RetryPolicy(retryOptions);
} else {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
Expand Down Expand Up @@ -248,31 +282,47 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential
}
}

/** @return Resource collection API of Extensions. */
/**
* Gets the resource collection API of Extensions.
*
* @return Resource collection API of Extensions.
*/
public Extensions extensions() {
if (this.extensions == null) {
this.extensions = new ExtensionsImpl(clientObject.getExtensions(), this);
}
return extensions;
}

/** @return Resource collection API of OperationStatus. */
/**
* Gets the resource collection API of OperationStatus.
*
* @return Resource collection API of OperationStatus.
*/
public OperationStatus operationStatus() {
if (this.operationStatus == null) {
this.operationStatus = new OperationStatusImpl(clientObject.getOperationStatus(), this);
}
return operationStatus;
}

/** @return Resource collection API of FluxConfigurations. */
/**
* Gets the resource collection API of FluxConfigurations.
*
* @return Resource collection API of FluxConfigurations.
*/
public FluxConfigurations fluxConfigurations() {
if (this.fluxConfigurations == null) {
this.fluxConfigurations = new FluxConfigurationsImpl(clientObject.getFluxConfigurations(), this);
}
return fluxConfigurations;
}

/** @return Resource collection API of FluxConfigOperationStatus. */
/**
* Gets the resource collection API of FluxConfigOperationStatus.
*
* @return Resource collection API of FluxConfigOperationStatus.
*/
public FluxConfigOperationStatus fluxConfigOperationStatus() {
if (this.fluxConfigOperationStatus == null) {
this.fluxConfigOperationStatus =
Expand All @@ -281,7 +331,11 @@ public FluxConfigOperationStatus fluxConfigOperationStatus() {
return fluxConfigOperationStatus;
}

/** @return Resource collection API of SourceControlConfigurations. */
/**
* Gets the resource collection API of SourceControlConfigurations.
*
* @return Resource collection API of SourceControlConfigurations.
*/
public SourceControlConfigurations sourceControlConfigurations() {
if (this.sourceControlConfigurations == null) {
this.sourceControlConfigurations =
Expand All @@ -290,7 +344,11 @@ public SourceControlConfigurations sourceControlConfigurations() {
return sourceControlConfigurations;
}

/** @return Resource collection API of Operations. */
/**
* Gets the resource collection API of Operations.
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Mono<Response<Flux<ByteBuffer>>> delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}"
+ "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions"
+ "/{extensionName}")
@ExpectedResponses({202})
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> update(
@HostParam("$host") String endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Mono<Response<Flux<ByteBuffer>>> createOrUpdate(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}"
+ "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations"
+ "/{fluxConfigurationName}")
@ExpectedResponses({202})
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> update(
@HostParam("$host") String endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
Expand Down Expand Up @@ -67,34 +66,34 @@ public SourceControlConfigurationClientBuilder environment(AzureEnvironment envi
}

/*
* The default poll interval for long-running operation
* The HTTP pipeline to send requests through
*/
private Duration defaultPollInterval;
private HttpPipeline pipeline;

/**
* Sets The default poll interval for long-running operation.
* Sets The HTTP pipeline to send requests through.
*
* @param defaultPollInterval the defaultPollInterval value.
* @param pipeline the pipeline value.
* @return the SourceControlConfigurationClientBuilder.
*/
public SourceControlConfigurationClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
public SourceControlConfigurationClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}

/*
* The HTTP pipeline to send requests through
* The default poll interval for long-running operation
*/
private HttpPipeline pipeline;
private Duration defaultPollInterval;

/**
* Sets The HTTP pipeline to send requests through.
* Sets The default poll interval for long-running operation.
*
* @param pipeline the pipeline value.
* @param defaultPollInterval the defaultPollInterval value.
* @return the SourceControlConfigurationClientBuilder.
*/
public SourceControlConfigurationClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
public SourceControlConfigurationClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}

Expand Down Expand Up @@ -126,15 +125,12 @@ public SourceControlConfigurationClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
if (pipeline == null) {
this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
}
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
if (pipeline == null) {
this.pipeline =
new HttpPipelineBuilder()
.policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
.build();
}
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public static ComplianceStateType fromString(String name) {
return fromString(name, ComplianceStateType.class);
}

/** @return known ComplianceStateType values. */
/**
* Gets known ComplianceStateType values.
*
* @return known ComplianceStateType values.
*/
public static Collection<ComplianceStateType> values() {
return values(ComplianceStateType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public static FluxComplianceState fromString(String name) {
return fromString(name, FluxComplianceState.class);
}

/** @return known FluxComplianceState values. */
/**
* Gets known FluxComplianceState values.
*
* @return known FluxComplianceState values.
*/
public static Collection<FluxComplianceState> values() {
return values(FluxComplianceState.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public static LevelType fromString(String name) {
return fromString(name, LevelType.class);
}

/** @return known LevelType values. */
/**
* Gets known LevelType values.
*
* @return known LevelType values.
*/
public static Collection<LevelType> values() {
return values(LevelType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public static MessageLevelType fromString(String name) {
return fromString(name, MessageLevelType.class);
}

/** @return known MessageLevelType values. */
/**
* Gets known MessageLevelType values.
*
* @return known MessageLevelType values.
*/
public static Collection<MessageLevelType> values() {
return values(MessageLevelType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public static OperatorScopeType fromString(String name) {
return fromString(name, OperatorScopeType.class);
}

/** @return known OperatorScopeType values. */
/**
* Gets known OperatorScopeType values.
*
* @return known OperatorScopeType values.
*/
public static Collection<OperatorScopeType> values() {
return values(OperatorScopeType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ public static OperatorType fromString(String name) {
return fromString(name, OperatorType.class);
}

/** @return known OperatorType values. */
/**
* Gets known OperatorType values.
*
* @return known OperatorType values.
*/
public static Collection<OperatorType> values() {
return values(OperatorType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public static ProvisioningState fromString(String name) {
return fromString(name, ProvisioningState.class);
}

/** @return known ProvisioningState values. */
/**
* Gets known ProvisioningState values.
*
* @return known ProvisioningState values.
*/
public static Collection<ProvisioningState> values() {
return values(ProvisioningState.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public static ProvisioningStateType fromString(String name) {
return fromString(name, ProvisioningStateType.class);
}

/** @return known ProvisioningStateType values. */
/**
* Gets known ProvisioningStateType values.
*
* @return known ProvisioningStateType values.
*/
public static Collection<ProvisioningStateType> values() {
return values(ProvisioningStateType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public static ScopeType fromString(String name) {
return fromString(name, ScopeType.class);
}

/** @return known ScopeType values. */
/**
* Gets known ScopeType values.
*
* @return known ScopeType values.
*/
public static Collection<ScopeType> values() {
return values(ScopeType.class);
}
Expand Down
Loading