{
  "typeName" : "AWS::EC2::VerifiedAccessTrustProvider",
  "description" : "The AWS::EC2::VerifiedAccessTrustProvider type describes a verified access trust provider",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2-verified-access.aws-ec2-verifiedaccesstrustprovider",
  "definitions" : {
    "OidcOptions" : {
      "description" : "The OpenID Connect details for an oidc -type, user-identity based trust provider.",
      "type" : "object",
      "properties" : {
        "Issuer" : {
          "type" : "string",
          "description" : "The OIDC issuer."
        },
        "AuthorizationEndpoint" : {
          "type" : "string",
          "description" : "The OIDC authorization endpoint."
        },
        "TokenEndpoint" : {
          "type" : "string",
          "description" : "The OIDC token endpoint."
        },
        "UserInfoEndpoint" : {
          "type" : "string",
          "description" : "The OIDC user info endpoint."
        },
        "ClientId" : {
          "type" : "string",
          "description" : "The client identifier."
        },
        "ClientSecret" : {
          "type" : "string",
          "description" : "The client secret."
        },
        "Scope" : {
          "type" : "string",
          "description" : "OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to details of a user. Each scope returns a specific set of user attributes."
        }
      },
      "additionalProperties" : false
    },
    "DeviceOptions" : {
      "description" : "The options for device identity based trust providers.",
      "type" : "object",
      "properties" : {
        "TenantId" : {
          "type" : "string",
          "description" : "The ID of the tenant application with the device-identity provider."
        },
        "PublicSigningKeyUrl" : {
          "type" : "string",
          "description" : "URL Verified Access will use to verify authenticity of the device tokens."
        }
      },
      "additionalProperties" : false
    },
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "SseSpecification" : {
      "description" : "The configuration options for customer provided KMS encryption.",
      "$ref" : "#/definitions/SseSpecification"
    },
    "NativeApplicationOidcOptions" : {
      "description" : "The OpenID Connect details for an oidc -type, user-identity based trust provider for L4.",
      "type" : "object",
      "properties" : {
        "Issuer" : {
          "type" : "string",
          "description" : "The OIDC issuer."
        },
        "AuthorizationEndpoint" : {
          "type" : "string",
          "description" : "The OIDC authorization endpoint."
        },
        "TokenEndpoint" : {
          "type" : "string",
          "description" : "The OIDC token endpoint."
        },
        "UserInfoEndpoint" : {
          "type" : "string",
          "description" : "The OIDC user info endpoint."
        },
        "ClientId" : {
          "type" : "string",
          "description" : "The client identifier."
        },
        "ClientSecret" : {
          "type" : "string",
          "description" : "The client secret."
        },
        "Scope" : {
          "type" : "string",
          "description" : "OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to details of a user. Each scope returns a specific set of user attributes."
        },
        "PublicSigningKeyEndpoint" : {
          "type" : "string",
          "description" : "The public signing key for endpoint"
        }
      },
      "additionalProperties" : false
    }
  },
  "properties" : {
    "TrustProviderType" : {
      "description" : "Type of trust provider. Possible values: user|device",
      "type" : "string"
    },
    "DeviceTrustProviderType" : {
      "description" : "The type of device-based trust provider. Possible values: jamf|crowdstrike",
      "type" : "string"
    },
    "UserTrustProviderType" : {
      "description" : "The type of device-based trust provider. Possible values: oidc|iam-identity-center",
      "type" : "string"
    },
    "OidcOptions" : {
      "$ref" : "#/definitions/OidcOptions"
    },
    "DeviceOptions" : {
      "$ref" : "#/definitions/DeviceOptions"
    },
    "PolicyReferenceName" : {
      "description" : "The identifier to be used when working with policy rules.",
      "type" : "string"
    },
    "CreationTime" : {
      "description" : "The creation time.",
      "type" : "string"
    },
    "LastUpdatedTime" : {
      "description" : "The last updated time.",
      "type" : "string"
    },
    "VerifiedAccessTrustProviderId" : {
      "description" : "The ID of the Amazon Web Services Verified Access trust provider.",
      "type" : "string"
    },
    "Description" : {
      "description" : "A description for the Amazon Web Services Verified Access trust provider.",
      "type" : "string"
    },
    "Tags" : {
      "description" : "An array of key-value pairs to apply to this resource.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "SseSpecification" : {
      "description" : "The configuration options for customer provided KMS encryption.",
      "type" : "object",
      "properties" : {
        "KmsKeyArn" : {
          "description" : "KMS Key Arn used to encrypt the group policy",
          "type" : "string"
        },
        "CustomerManagedKeyEnabled" : {
          "description" : "Whether to encrypt the policy with the provided key or disable encryption",
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "NativeApplicationOidcOptions" : {
      "$ref" : "#/definitions/NativeApplicationOidcOptions"
    }
  },
  "additionalProperties" : false,
  "required" : [ "TrustProviderType", "PolicyReferenceName" ],
  "readOnlyProperties" : [ "/properties/VerifiedAccessTrustProviderId", "/properties/CreationTime", "/properties/LastUpdatedTime" ],
  "createOnlyProperties" : [ "/properties/PolicyReferenceName", "/properties/DeviceOptions", "/properties/DeviceTrustProviderType", "/properties/TrustProviderType", "/properties/UserTrustProviderType" ],
  "writeOnlyProperties" : [ "/properties/NativeApplicationOidcOptions/ClientSecret" ],
  "primaryIdentifier" : [ "/properties/VerifiedAccessTrustProviderId" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "ec2:CreateTags", "ec2:DescribeTags", "ec2:DeleteTags" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "ec2:CreateVerifiedAccessTrustProvider", "ec2:DescribeVerifiedAccessTrustProviders", "ec2:CreateTags", "ec2:DescribeTags", "sso:GetSharedSsoConfiguration", "kms:DescribeKey", "kms:RetireGrant", "kms:CreateGrant", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "read" : {
      "permissions" : [ "ec2:DescribeVerifiedAccessTrustProviders", "ec2:DescribeTags", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "update" : {
      "permissions" : [ "ec2:ModifyVerifiedAccessTrustProvider", "ec2:DescribeVerifiedAccessTrustProviders", "ec2:DescribeTags", "ec2:DeleteTags", "ec2:CreateTags", "kms:DescribeKey", "kms:RetireGrant", "kms:CreateGrant", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "delete" : {
      "permissions" : [ "ec2:DeleteVerifiedAccessTrustProvider", "ec2:DeleteTags", "ec2:DescribeVerifiedAccessTrustProviders", "ec2:DescribeTags", "kms:DescribeKey", "kms:RetireGrant", "kms:CreateGrant", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeVerifiedAccessTrustProviders", "ec2:DescribeTags", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    }
  }
}