

This is the new *Amazon CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [Amazon CloudFormation User Guide](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::CredentialBroker::CredentialProvider OAuthDiscovery

How the authorization server's OAuth endpoints are determined. Set exactly one member: give a discovery URL and let the service fetch the endpoints, or state the endpoints yourself. On reads, this reports the endpoints the service resolved and is using.

## Syntax
<a name="aws-properties-credentialbroker-credentialprovider-oauthdiscovery-syntax"></a>

To declare this entity in your Amazon CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-credentialbroker-credentialprovider-oauthdiscovery-syntax.json"></a>

```json
{
  "[AuthorizationServerMetadata](#cfn-credentialbroker-credentialprovider-oauthdiscovery-authorizationservermetadata)" : {{AuthorizationServerMetadata}},
  "[DiscoveryUrl](#cfn-credentialbroker-credentialprovider-oauthdiscovery-discoveryurl)" : {{String}}
}
```

### YAML
<a name="aws-properties-credentialbroker-credentialprovider-oauthdiscovery-syntax.yaml"></a>

```yaml
  [AuthorizationServerMetadata](#cfn-credentialbroker-credentialprovider-oauthdiscovery-authorizationservermetadata): {{
    AuthorizationServerMetadata}}
  [DiscoveryUrl](#cfn-credentialbroker-credentialprovider-oauthdiscovery-discoveryurl): {{String}}
```

## Properties
<a name="aws-properties-credentialbroker-credentialprovider-oauthdiscovery-properties"></a>

`AuthorizationServerMetadata`  <a name="cfn-credentialbroker-credentialprovider-oauthdiscovery-authorizationservermetadata"></a>
The authorization server's endpoints, supplied explicitly instead of discovered.  
*Required*: No  
*Type*: [AuthorizationServerMetadata](aws-properties-credentialbroker-credentialprovider-authorizationservermetadata.md)  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DiscoveryUrl`  <a name="cfn-credentialbroker-credentialprovider-oauthdiscovery-discoveryurl"></a>
URL of the authorization server's discovery document. The service fetches it and resolves the endpoints from it.  
*Required*: No  
*Type*: String  
*Pattern*: `^https://[^\s?#]+/\.well-known/(openid-configuration|oauth-authorization-server)(/[^\s?#]+)?$`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)