def odps()

in dbt/adapters/maxcompute/credentials.py [0:0]


    def odps(self):
        if self.auth_type == "chain":
            cred = Client()
        else:
            config = Config(
                type=self.auth_type,
                access_key_id=self.access_key_id,
                access_key_secret=self.access_key_secret,
                security_token=self.security_token,
                bearer_token=self.bearer_token,
                duration_seconds=self.duration_seconds,
                role_arn=self.role_arn,
                oidc_provider_arn=self.oidc_provider_arn,
                oidc_token_file_path=self.oidc_token_file_path,
                policy=self.auth_policy,
                role_session_expiration=self.role_session_expiration,
                role_session_name=self.role_session_name,
                public_key_id=self.public_key_id,
                private_key_file=self.private_key_file,
                role_name=self.role_name,
                host=self.auth_host,
                timeout=self.auth_timeout,
                connect_timeout=self.auth_connect_timeout,
                proxy=self.auth_proxy,
                credentials_uri=self.credentials_uri,
                disable_imds_v1=self.disable_imds_v1,
                enable_imds_v2=self.enable_imds_v2,
                metadata_token_duration=self.metadata_token_duration,
                sts_endpoint=self.sts_endpoint,
            )
            cred = Client(config)
        account = CredentialProviderAccount(cred)
        o = ODPS(
            account=account,
            project=self.database,
            endpoint=self.endpoint,
        )
        o.schema = self.schema
        return o