### YamlMime:JavaType uid: "com.azure.core.client.traits.AzureKeyCredentialTrait" fullName: "com.azure.core.client.traits.AzureKeyCredentialTrait" name: "AzureKeyCredentialTrait" nameWithType: "AzureKeyCredentialTrait" summary: "An providing a consistent interface for setting ." syntax: "public interface **AzureKeyCredentialTrait**" methods: - uid: "com.azure.core.client.traits.AzureKeyCredentialTrait.credential(com.azure.core.credential.AzureKeyCredential)" fullName: "com.azure.core.client.traits.AzureKeyCredentialTrait.credential(AzureKeyCredential credential)" name: "credential(AzureKeyCredential credential)" nameWithType: "AzureKeyCredentialTrait.credential(AzureKeyCredential credential)" summary: "Sets the used for authentication." modifiers: - "abstract" parameters: - description: "the to be used for authentication." name: "credential" type: "" syntax: "public abstract T credential(AzureKeyCredential credential)" desc: "Sets the used for authentication. Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity" returns: description: "Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of\n operations." type: "" type: "interface" typeParameters: - description: "The concrete type that implements the trait. This is required so that fluent operations can continue\n to return the concrete type, rather than the trait type." name: "T" desc: "An providing a consistent interface for setting . Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity" metadata: {} package: "com.azure.core.client.traits" artifact: com.azure:azure-core:1.54.0